mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
d407d1054c
Most of these are captured in other bugs The anon talk message style doesn't do anything. Bug: T344022 Change-Id: Iba1fce98ea05931fe07b2b20f07c62d198039d1b
28 lines
817 B
JavaScript
28 lines
817 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 $( 'h1.mw-first-heading' ); }
|
|
// Sync with src/mobile.editor.overlay/EditorOverlayBase.js in MobileFrontend
|
|
// FIXME: T346184
|
|
get next() { return $( '.mw-ui-icon-mf-next-invert, .mf-icon-next-invert' ); }
|
|
get save() { return $( 'button.cdx-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();
|