mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Revert "Move Selenium test from mediawiki/core"
This reverts commit 68292ad0a8
.
This test seems to be running on other skins that it should
not run on - for example Minerva. I'm not sure if this
is configuration related or test related.
I will follow up and restore these personally.
Bug: T188553
Change-Id: I4aa58fd021aceab1a01c288782111faeb52723f2
This commit is contained in:
parent
68292ad0a8
commit
4d63b91152
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"extends": "../../.eslintrc.json",
|
||||
"env": {
|
||||
"es6": true,
|
||||
"mocha": true,
|
||||
"node": true
|
||||
},
|
||||
"globals": {
|
||||
"browser": false
|
||||
}
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
# Selenium tests
|
||||
|
||||
Please see tests/selenium/README.md file in mediawiki/core repository (usually at mediawiki/vagrant/mediawiki).
|
||||
|
||||
## Usage
|
||||
|
||||
Set up MediaWiki-Vagrant:
|
||||
|
||||
cd mediawiki/vagrant
|
||||
vagrant up
|
||||
vagrant provision
|
||||
cd mediawiki
|
||||
npm install
|
||||
|
||||
Run both mediawiki/core and skin tests from mediawiki/core folder:
|
||||
|
||||
npm run selenium
|
||||
|
||||
To run only skin tests, first in one terminal tab (or window) start Chromedriver:
|
||||
|
||||
chromedriver --url-base=wd/hub --port=4444
|
||||
|
||||
Then, in another terminal tab (or window) go to mediawiki/core folder:
|
||||
|
||||
./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec skins/SKIN-NAME/tests/selenium/specs/*.js
|
||||
|
||||
Run only one skin test file from mediawiki/core folder:
|
||||
|
||||
./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec skins/SKIN-NAME/tests/selenium/specs/FILE-NAME.js
|
||||
|
||||
To run only one skin test from mediawiki/core folder (name contains string 'TEST-NAME'):
|
||||
|
||||
./node_modules/.bin/wdio tests/selenium/wdio.conf.js --spec skins/SKIN-NAME/tests/selenium/specs/FILE-NAME.js --mochaOpts.grep preferences TEST-NAME
|
|
@ -1,7 +0,0 @@
|
|||
'use strict';
|
||||
const Page = require( '../../../../../tests/selenium/pageobjects/page' );
|
||||
|
||||
class UserMessagePage extends Page {
|
||||
get usermessage() { return browser.element( 'div.usermessage' ); }
|
||||
}
|
||||
module.exports = new UserMessagePage();
|
|
@ -1,45 +0,0 @@
|
|||
'use strict';
|
||||
const assert = require( 'assert' ),
|
||||
CreateAccountPage = require( '../../../../../tests/selenium/pageobjects/createaccount.page' ),
|
||||
EditPage = require( '../../../../../tests/selenium/pageobjects/edit.page' ),
|
||||
UserLoginPage = require( '../../../../../tests/selenium/pageobjects/userlogin.page' ),
|
||||
UserMessagePage = require( '../pageobjects/usermessage.page' );
|
||||
|
||||
describe( 'User', function () {
|
||||
|
||||
var password,
|
||||
username;
|
||||
|
||||
before( function () {
|
||||
// disable VisualEditor welcome dialog
|
||||
UserLoginPage.open();
|
||||
browser.localStorage( 'POST', { key: 've-beta-welcome-dialog', value: '1' } );
|
||||
} );
|
||||
|
||||
beforeEach( function () {
|
||||
browser.deleteCookie();
|
||||
username = `User-${Math.random().toString()}`;
|
||||
password = Math.random().toString();
|
||||
} );
|
||||
|
||||
it( 'should be able to view new message banner', function () {
|
||||
|
||||
// create user
|
||||
browser.call( function () {
|
||||
return CreateAccountPage.apiCreateAccount( username, password );
|
||||
} );
|
||||
|
||||
// create talk page with content
|
||||
browser.call( function () {
|
||||
return EditPage.apiEdit( 'User_talk:' + username, Math.random().toString() );
|
||||
} );
|
||||
|
||||
// log in
|
||||
UserLoginPage.login( username, password );
|
||||
|
||||
// check
|
||||
assert.equal( UserMessagePage.usermessage.getText(), 'You have a new message (last change).' );
|
||||
|
||||
} );
|
||||
|
||||
} );
|
Loading…
Reference in a new issue