Page MenuHomeWickedGov Phorge

protect.page.js
No OneTemporary

Size
776 B
Referenced Files
None
Subscribers
None

protect.page.js

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

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)

Event Timeline