mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-05 02:59:00 +00:00
dd3fb66258
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
(cherry picked from commit 677ce50b24
)
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const {
|
|
iAmLoggedIntoTheMobileWebsite,
|
|
iAmOnPage
|
|
} = require( '../features/step_definitions/common_steps' ),
|
|
{ iSeeALinkToAboutPage, iShouldSeeAUserPageLinkInMenu,
|
|
iShouldSeeLogoutLinkInMenu,
|
|
iClickOnTheMainNavigationButton,
|
|
iShouldSeeALinkInMenu, iShouldSeeALinkToDisclaimer
|
|
} = require( '../features/step_definitions/menu_steps' );
|
|
|
|
// @chrome @en.m.wikipedia.beta.wmflabs.org @firefox @test2.m.wikipedia.org @vagrant @login
|
|
describe( 'Menus open correct page for anonymous users', () => {
|
|
|
|
beforeEach( async () => {
|
|
await iAmLoggedIntoTheMobileWebsite();
|
|
await iAmOnPage( 'Main Page' );
|
|
} );
|
|
|
|
it( 'Check links in menu', async () => {
|
|
await iClickOnTheMainNavigationButton();
|
|
await iShouldSeeALinkToDisclaimer();
|
|
await iShouldSeeAUserPageLinkInMenu();
|
|
await iSeeALinkToAboutPage();
|
|
[ 'Home', 'Random', 'Settings', 'Watchlist' ].forEach( async ( label ) => {
|
|
await iShouldSeeALinkInMenu( label );
|
|
} );
|
|
await iShouldSeeLogoutLinkInMenu();
|
|
try {
|
|
await iShouldSeeALinkInMenu( 'Nearby' );
|
|
} catch ( e ) {
|
|
console.warn( 'Nearby item will only appear in main menu if $wgMFNearby is configured' );
|
|
}
|
|
} );
|
|
} );
|