Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4156508
block.page.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
block.page.js
View Options
import
Page
from
'wdio-mediawiki/Page.js'
;
class
BlockPage
extends
Page
{
get
target
()
{
return
$
(
'.mw-block-target input[name=wpTarget]'
);
}
get
messages
()
{
return
$
(
'.mw-block-messages'
);
}
get
userLookupItem
()
{
return
$
(
'.cdx-menu-item--enabled'
);
}
get
activeBlocksHeader
()
{
return
$
(
'.mw-block-log__type-active .cdx-accordion__header'
);
}
get
addBlockButton
()
{
return
$
(
'.mw-block__create-button'
);
}
get
otherReasonInput
()
{
return
$
(
'input[name=wpReason-other]'
);
}
get
submitButton
()
{
return
$
(
'.mw-block-submit'
);
}
async
open
(
expiry
)
{
return
super
.
openTitle
(
'Special:Block'
,
{
// Pass only the expiry and not also the target;
// This effectively asserts wpExpiry gets set correctly in SpecialBlock.vue
wpExpiry
:
expiry
,
usecodex
:
1
}
);
}
async
block
(
target
,
expiry
,
reason
)
{
await
this
.
open
(
expiry
);
await
this
.
target
.
waitForDisplayed
();
await
this
.
target
.
setValue
(
target
);
await
this
.
userLookupItem
.
waitForClickable
();
// Remove focus from input. Temporary workaround until T382093 is resolved.
await
$
(
'body'
).
click
();
await
this
.
otherReasonInput
.
setValue
(
reason
);
await
this
.
submitButton
.
click
();
}
}
export
default
new
BlockPage
();
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Aug 19 2026, 22:20 (8 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
28/80/63bfcdc735b697423b00e8da0093
Default Alt Text
block.page.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment