mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +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
34 lines
959 B
JavaScript
34 lines
959 B
JavaScript
'use strict';
|
|
|
|
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 () {
|
|
let content, name;
|
|
|
|
beforeEach( function () {
|
|
content = Util.getTestString( 'beforeEach-content-' );
|
|
name = Util.getTestString( 'BeforeEach-name-' );
|
|
} );
|
|
|
|
it( 'should be creatable', function () {
|
|
BlankPage.open();
|
|
// 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(
|
|
() => EditPage.heading.getText() === name
|
|
);
|
|
assert.strictEqual( EditPage.heading.getText(), name );
|
|
assert.strictEqual( EditPage.displayedContent.getText(), content );
|
|
} );
|
|
} );
|