mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 19:21:39 +00:00
a32999e641
Change-Id: Icabf6e065ed5685207731262db72faf848a0a04d
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' );
|
|
const { ArticlePage } = require( '../support/world.js' );
|
|
|
|
const iSeeALinkToAboutPage = () => {
|
|
assert.strictEqual( ArticlePage.menu_element.element( '*=About' ).isVisible(), true );
|
|
};
|
|
|
|
const iClickOnTheMainNavigationButton = () => {
|
|
ArticlePage.menu_button_element.click();
|
|
};
|
|
|
|
const iShouldSeeAUserPageLinkInMenu = () => {
|
|
ArticlePage.menu_element.element( '.primary-action' );
|
|
};
|
|
|
|
const iShouldSeeLogoutLinkInMenu = () => {
|
|
ArticlePage.menu_element.element( '.secondary-action' );
|
|
};
|
|
|
|
const iShouldSeeALinkInMenu = ( text ) => {
|
|
assert.strictEqual( ArticlePage.menu_element.element( `span=${text}` ).isVisible(),
|
|
true, `Link to ${text} is visible.` );
|
|
};
|
|
|
|
const iShouldSeeALinkToDisclaimer = () => {
|
|
ArticlePage.menu_element.element( '=Disclaimers' ).waitForVisible();
|
|
assert.strictEqual( ArticlePage.menu_element.element( '=Disclaimers' ).isVisible(), true );
|
|
};
|
|
|
|
module.exports = {
|
|
iClickOnTheMainNavigationButton,
|
|
iSeeALinkToAboutPage, iShouldSeeAUserPageLinkInMenu,
|
|
iShouldSeeLogoutLinkInMenu,
|
|
iShouldSeeALinkInMenu, iShouldSeeALinkToDisclaimer
|
|
};
|