2018-01-13 13:52:35 +00:00
|
|
|
'use strict';
|
|
|
|
|
const Page = require( './page' );
|
|
|
|
|
|
|
|
|
|
class RestorePage extends Page {
|
|
|
|
|
|
|
|
|
|
get reason() { return browser.element( '#wpComment' ); }
|
|
|
|
|
get submit() { return browser.element( '#mw-undelete-submit' ); }
|
|
|
|
|
get displayedContent() { return browser.element( '#mw-content-text' ); }
|
|
|
|
|
|
|
|
|
|
open( name ) {
|
2018-03-13 13:30:43 +00:00
|
|
|
super.open( 'Special:Undelete/' + name );
|
2018-01-13 13:52:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
restore( name, reason ) {
|
|
|
|
|
this.open( name );
|
|
|
|
|
this.reason.setValue( reason );
|
|
|
|
|
this.submit.click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
module.exports = new RestorePage();
|