33 lines
561 B
JavaScript
33 lines
561 B
JavaScript
'use strict';
|
|
|
|
const Page = require( 'wdio-mediawiki/Page' );
|
|
|
|
class DeletePage extends Page {
|
|
get reason() {
|
|
return $( '#wpReason input' );
|
|
}
|
|
|
|
get watch() {
|
|
return $( '#wpWatch' );
|
|
}
|
|
|
|
get submit() {
|
|
return $( '#wpConfirmB' );
|
|
}
|
|
|
|
get displayedContent() {
|
|
return $( '#mw-content-text' );
|
|
}
|
|
|
|
async open( title ) {
|
|
return super.openTitle( title, { action: 'delete' } );
|
|
}
|
|
|
|
async delete( title, reason ) {
|
|
await this.open( title );
|
|
await this.reason.setValue( reason );
|
|
await this.submit.click();
|
|
}
|
|
}
|
|
|
|
module.exports = new DeletePage();
|