mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 11:13:34 +00:00
26e413e04d
Porting first selenium test from Ruby to Node.js using the mocha framework. Starting with `category.feature` test. Tests are placed in a new `tests/selenium` folder with their own eslint config. Bug: T190710 Change-Id: Iad954405a5ae0608fd5dc90dd5dfa434b3781037
32 lines
678 B
JavaScript
32 lines
678 B
JavaScript
const assert = require( 'assert' ),
|
|
{ ArticlePage, UserLoginPage } = require( '../support/world' );
|
|
|
|
const iAmUsingTheMobileSite = () => {
|
|
ArticlePage.setMobileMode();
|
|
};
|
|
|
|
const iAmInBetaMode = () => {
|
|
ArticlePage.setBetaMode();
|
|
};
|
|
|
|
const iAmOnPage = ( article ) => {
|
|
ArticlePage.open( article );
|
|
};
|
|
|
|
const iAmLoggedIn = () => {
|
|
UserLoginPage.open();
|
|
UserLoginPage.loginAdmin();
|
|
assert.strictEqual( ArticlePage.is_authenticated_element.isExisting(), true );
|
|
};
|
|
|
|
const iAmLoggedIntoTheMobileWebsite = () => {
|
|
iAmUsingTheMobileSite();
|
|
iAmLoggedIn();
|
|
};
|
|
|
|
module.exports = {
|
|
iAmLoggedIntoTheMobileWebsite,
|
|
iAmUsingTheMobileSite,
|
|
iAmLoggedIn, iAmOnPage, iAmInBetaMode
|
|
};
|