mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-19 01:01:00 +00:00
677ce50b24
WebdriverIO has dropped support of sync mode, hence changed to async. Update npm packages: @wdio/*, wdio-mediawiki because async mode needs at least @wdio v7.9. Remove npm packages: @wdio/dot-reporter and @wdio/sync. Bug: T293084 Change-Id: I5babbdadf21e9f951f69de93bfca5213a50965aa
39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' );
|
|
const { ArticlePage } = require( '../support/world.js' );
|
|
|
|
const iSeeALinkToAboutPage = async () => {
|
|
assert.strictEqual( await ArticlePage.menu_element.$( '*=About' ).isDisplayed(), true );
|
|
};
|
|
|
|
const iClickOnTheMainNavigationButton = async () => {
|
|
await ArticlePage.menu_button_element.waitForDisplayed();
|
|
await ArticlePage.menu_button_element.click();
|
|
};
|
|
|
|
const iShouldSeeAUserPageLinkInMenu = async () => {
|
|
await ArticlePage.menu_element.$( '.menu__item--user' );
|
|
};
|
|
|
|
const iShouldSeeLogoutLinkInMenu = async () => {
|
|
await ArticlePage.menu_element.$( '.menu__item--logout' );
|
|
};
|
|
|
|
const iShouldSeeALinkInMenu = async ( text ) => {
|
|
assert.strictEqual( await ArticlePage.menu_element.$( `span=${text}` ).isDisplayed(),
|
|
true, `Link to ${text} is visible.` );
|
|
};
|
|
|
|
const iShouldSeeALinkToDisclaimer = async () => {
|
|
await ArticlePage.menu_element.$( 'span=Disclaimers' ).waitForDisplayed();
|
|
assert.strictEqual( await ArticlePage.menu_element.$( 'span=Disclaimers' ).isDisplayed(), true );
|
|
};
|
|
|
|
module.exports = {
|
|
iClickOnTheMainNavigationButton,
|
|
iSeeALinkToAboutPage, iShouldSeeAUserPageLinkInMenu,
|
|
iShouldSeeLogoutLinkInMenu,
|
|
iShouldSeeALinkInMenu, iShouldSeeALinkToDisclaimer
|
|
};
|