Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4135823
protect.page.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
776 B
Referenced Files
None
Subscribers
None
protect.page.js
View Options
import
Page
from
'wdio-mediawiki/Page.js'
;
class
ProtectPage
extends
Page
{
get
reason
()
{
return
$
(
'#mwProtect-reason input'
);
}
get
confirmProtectionEdit
()
{
return
$
(
'span=Allow all users'
);
}
get
allowOnlyAdministrators
()
{
return
$
(
'span=Allow only administrators'
);
}
get
editProtectSelect
()
{
return
$
(
'#mwProtect-level-edit select'
);
}
get
submit
()
{
return
$
(
'#mw-Protect-submit'
);
}
async
open
(
title
)
{
return
super
.
openTitle
(
title
,
{
action
:
'protect'
}
);
}
async
protect
(
title
,
reason
)
{
await
this
.
open
(
title
);
await
this
.
reason
.
setValue
(
reason
);
await
this
.
confirmProtectionEdit
.
click
();
await
this
.
allowOnlyAdministrators
.
click
();
await
this
.
submit
.
click
();
}
}
export
default
new
ProtectPage
();
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Wed, Aug 19, 13:24 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9f/8f/8ef27a084bd79978b73350e78071
Default Alt Text
protect.page.js (776 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment