mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
Merge "selenium: Fix 'Page should be creatable' test"
This commit is contained in:
commit
e28a177dca
|
@ -5,7 +5,6 @@ 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' ); }
|
||||
|
@ -16,7 +15,6 @@ class EditPage extends Page {
|
|||
|
||||
edit( name, content ) {
|
||||
this.openForEditing( name );
|
||||
this.editWithoutLoggingIn.click();
|
||||
this.content.setValue( content );
|
||||
this.next.click();
|
||||
this.save.click();
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
const assert = require( 'assert' );
|
||||
const BlankPage = require( '../pageobjects/blank.page' );
|
||||
const EditPage = require( '../pageobjects/edit.page' );
|
||||
const UserLoginPage = require( 'wdio-mediawiki/LoginPage' );
|
||||
const Util = require( 'wdio-mediawiki/Util' );
|
||||
|
||||
describe( 'Page', function () {
|
||||
|
@ -15,8 +16,12 @@ describe( 'Page', function () {
|
|||
|
||||
it( 'should be creatable', function () {
|
||||
BlankPage.open();
|
||||
BlankPage.mobileView.click();
|
||||
// FIXME: This check should be redundant when T282058 is resolved.
|
||||
if ( BlankPage.mobileView.isDisplayed() ) {
|
||||
BlankPage.mobileView.click();
|
||||
}
|
||||
|
||||
UserLoginPage.loginAdmin();
|
||||
EditPage.edit( name, content );
|
||||
|
||||
browser.waitUntil(
|
||||
|
|
Loading…
Reference in a new issue