mediawiki-skins-MinervaNeue/tests/selenium/specs/mainmenu_loggedin.js
Moh'd Khier Abualruz 9c94cb9b52 Special contribute Selenium Test
Fix Beta tests on Minerva, to accept both cases of enabled and disabled contribute special page.

Change-Id: Ic538655d63347a432029e7d637e9251662d560aa
2022-11-15 09:49:31 +01:00

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( () => {
iAmLoggedIntoTheMobileWebsite();
iAmOnPage( 'Main Page' );
} );
it( 'Check links in menu', () => {
iClickOnTheMainNavigationButton();
iShouldSeeALinkToDisclaimer();
iShouldSeeAUserPageLinkInMenu();
iSeeALinkToAboutPage();
[ 'Home', 'Random', 'Settings', 'Watchlist' ].forEach( ( label ) => {
iShouldSeeALinkInMenu( label );
} );
iShouldSeeLogoutLinkInMenu();
try {
iShouldSeeALinkInMenu( 'Nearby' );
} catch ( e ) {
console.warn( 'Nearby item will only appear in main menu if $wgMFNearby is configured' );
}
} );
} );