2019-04-08 23:45:11 +00:00
|
|
|
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 = () => {
|
2019-08-30 17:23:55 +00:00
|
|
|
ArticlePage.menu_element.element( '.primary-action' );
|
|
|
|
};
|
|
|
|
|
|
|
|
const iShouldSeeLogoutLinkInMenu = () => {
|
|
|
|
ArticlePage.menu_element.element( '.secondary-action' );
|
2019-04-08 23:45:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const iShouldSeeALinkInMenu = ( text ) => {
|
2019-08-30 17:23:55 +00:00
|
|
|
assert.strictEqual( ArticlePage.menu_element.element( `span=${text}` ).isVisible(),
|
2019-04-08 23:45:11 +00:00
|
|
|
true, `Link to ${text} is visible.` );
|
|
|
|
};
|
|
|
|
|
|
|
|
const iShouldSeeALinkToDisclaimer = () => {
|
2019-08-05 20:41:12 +00:00
|
|
|
ArticlePage.menu_element.element( '=Disclaimers' ).waitForVisible();
|
2019-04-08 23:45:11 +00:00
|
|
|
assert.strictEqual( ArticlePage.menu_element.element( '=Disclaimers' ).isVisible(), true );
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
iClickOnTheMainNavigationButton,
|
|
|
|
iSeeALinkToAboutPage, iShouldSeeAUserPageLinkInMenu,
|
2019-08-30 17:23:55 +00:00
|
|
|
iShouldSeeLogoutLinkInMenu,
|
2019-04-08 23:45:11 +00:00
|
|
|
iShouldSeeALinkInMenu, iShouldSeeALinkToDisclaimer
|
|
|
|
};
|