mediawiki-skins-MinervaNeue/tests/selenium/features/step_definitions/menu_steps.js
Stephen Niedzielski bfdfc1165c [UI] [menu] slide the main menu over the page
Slide the main menu over the page instead of sliding the page over the
menu. Also, use viewport units for the main and notification menus.

Note, this lays foundation work for T225213.

Bug: T206354
Change-Id: I14b67d1e97b84086ea13e28df8148824a1f493e3
2019-08-12 18:22:45 +00:00

31 lines
979 B
JavaScript

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( '.mw-ui-icon-minerva-profile' );
};
const iShouldSeeALinkInMenu = ( text ) => {
assert.strictEqual( ArticlePage.menu_element.element( `=${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,
iShouldSeeALinkInMenu, iShouldSeeALinkToDisclaimer
};