mediawiki-skins-MinervaNeue/tests/selenium/pageobjects/edit.page.js
Jon Robson 952789bc17 Switch Minerva button template to use Codex and remove mw-ui-button
- Removes 'mw-ui-icon-with-label-desktop' as that is now the default behavior for icon only buttons in Minerva
- Removes icon flushing classes, use codex mixins instead

80 Visual changes relating to minor icon/button subpixel changes in the heading, edit section links, and page actions

Bug: T319260
Change-Id: I503b643d33e43196483af4b5f9dd312237322ac8
2023-08-24 15:57:01 -05:00

26 lines
697 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' ); }
get next() { return $( '.mw-ui-icon-mf-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();