mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-11 13:56:10 +00:00
20bb2bf09c
Bug: T282058 Change-Id: I342a1ba510ea5da85da904c1bec4f26adfc60d33
26 lines
690 B
JavaScript
26 lines
690 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', mobileaction: 'toggle_view_mobile' } );
|
|
}
|
|
|
|
edit( name, content ) {
|
|
this.openForEditing( name );
|
|
this.content.setValue( content );
|
|
this.next.click();
|
|
this.save.click();
|
|
browser.acceptAlert();
|
|
}
|
|
}
|
|
|
|
module.exports = new EditPage();
|