mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
238010dbea
Bug: T269051 Change-Id: I958d1f5035f7d28c70ff19c3db6f3707defa880f
28 lines
749 B
JavaScript
28 lines
749 B
JavaScript
'use strict';
|
|
|
|
const Page = require( 'wdio-mediawiki/Page' );
|
|
|
|
class EditPage extends Page {
|
|
get content() { return $( '#wikitext-editor' ); }
|
|
get displayedContent() { return $( '#mw-content-text .mw-parser-output' ); }
|
|
get editWithoutLoggingIn() { return $( '.anonymous' ); }
|
|
get heading() { return $( '#section_0' ); }
|
|
get next() { return $( '.mw-ui-icon-mf-next-invert' ); }
|
|
get save() { return $( 'button.mw-ui-button' ); }
|
|
|
|
openForEditing( title ) {
|
|
super.openTitle( title, { action: 'edit' } );
|
|
}
|
|
|
|
edit( name, content ) {
|
|
this.openForEditing( name );
|
|
this.editWithoutLoggingIn.click();
|
|
this.content.setValue( content );
|
|
this.next.click();
|
|
this.save.click();
|
|
browser.acceptAlert();
|
|
}
|
|
}
|
|
|
|
module.exports = new EditPage();
|