mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 03:08:12 +00:00
def50f52c1
The test was failing on The Beta Cluster because of two reasons: - Local development environment and CI need to switch to mobile view, The Beta Cluster doesn't. - Local development environment and CI allow anonymous edits, The Beta Cluster doesn't. Bug: T281733 Change-Id: Iedcd94dc5cf1ace14baadfe9d9bd5bed9788f775
26 lines
654 B
JavaScript
26 lines
654 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 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.content.setValue( content );
|
|
this.next.click();
|
|
this.save.click();
|
|
browser.acceptAlert();
|
|
}
|
|
}
|
|
|
|
module.exports = new EditPage();
|