mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
selenium: Run tests from desktop site
Bug: T282058 Change-Id: I342a1ba510ea5da85da904c1bec4f26adfc60d33
This commit is contained in:
parent
482df741d6
commit
20bb2bf09c
|
@ -14,7 +14,7 @@
|
|||
"doc": "jsdoc -c jsdoc.json && npm run build-storybook",
|
||||
"test:size": "node ./tests/resource-loader-bundlesize.js",
|
||||
"selenium-test-cucumber": "wdio tests/selenium/wdio.conf.cucumber.js",
|
||||
"selenium-daily": "MW_SERVER=https://en.m.wikipedia.beta.wmflabs.org npm run selenium-test",
|
||||
"selenium-daily": "npm run selenium-test",
|
||||
"selenium-test": "npm -s run test:size && wdio tests/selenium/wdio.conf.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const Page = require( 'wdio-mediawiki/Page' );
|
||||
|
||||
class BlankPage extends Page {
|
||||
get mobileView() { return $( '#footer-places-mobileview' ); }
|
||||
|
||||
open() {
|
||||
super.openTitle( 'Special:BlankPage', { uselang: 'en' } );
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new BlankPage();
|
|
@ -10,7 +10,7 @@ class EditPage extends Page {
|
|||
get save() { return $( 'button.mw-ui-button' ); }
|
||||
|
||||
openForEditing( title ) {
|
||||
super.openTitle( title, { action: 'edit' } );
|
||||
super.openTitle( title, { action: 'edit', mobileaction: 'toggle_view_mobile' } );
|
||||
}
|
||||
|
||||
edit( name, content ) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
'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' );
|
||||
|
@ -15,13 +14,8 @@ describe( 'Page', function () {
|
|||
} );
|
||||
|
||||
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(
|
||||
|
|
Loading…
Reference in a new issue