2019-04-08 23:45:11 +00:00
|
|
|
const {
|
|
|
|
iAmLoggedIntoTheMobileWebsite,
|
|
|
|
iAmOnPage
|
|
|
|
} = require( '../features/step_definitions/common_steps' ),
|
|
|
|
{ iSeeALinkToAboutPage, iShouldSeeAUserPageLinkInMenu,
|
2019-08-30 17:23:55 +00:00
|
|
|
iShouldSeeLogoutLinkInMenu,
|
2019-04-08 23:45:11 +00:00
|
|
|
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();
|
2019-08-30 17:23:55 +00:00
|
|
|
[ 'Home', 'Random', 'Settings', 'Contributions',
|
2019-04-08 23:45:11 +00:00
|
|
|
'Watchlist' ].forEach( ( label ) => {
|
|
|
|
iShouldSeeALinkInMenu( label );
|
|
|
|
} );
|
2019-08-30 17:23:55 +00:00
|
|
|
iShouldSeeLogoutLinkInMenu();
|
2019-04-08 23:45:11 +00:00
|
|
|
try {
|
|
|
|
iShouldSeeALinkInMenu( 'Nearby' );
|
|
|
|
} catch ( e ) {
|
|
|
|
console.warn( 'Nearby item will only appear in main menu if $wgMFNearby is configured' );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
} );
|