mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 11:13:34 +00:00
791cb1081a
Avoid time outs Error in "Opening and closing the reference drawer.Opening a nested reference" Error: waitUntil condition timed out after 5000ms at Browser.<anonymous> (/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24) at iShouldSeeDrawerWithText (/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:25:10) at Context.<anonymous> (/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:44:3) FAILED in chrome - /tests/selenium/specs/references.js Change-Id: Ia5d493fba4995c1122721b76ae98d6ba60399238
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
const ArticlePage = require( '../support/pages/article_page' );
|
|
const { iClickTheOverlayCloseButton, iSeeAnOverlay, iDoNotSeeAnOverlay } = require( './common_steps' );
|
|
|
|
const iHaveNoNotifications = () => {
|
|
ArticlePage.notifications_button_element.waitForDisplayed();
|
|
// This is somewhat hacky, but we don't want this test making use of
|
|
// Echo's APIs which may change
|
|
browser.execute( '$( function () { $( ".notification-count span" ).hide(); } );' );
|
|
};
|
|
|
|
const iClickOnTheNotificationIcon = () => {
|
|
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.scripts' );
|
|
ArticlePage.notifications_button_element.waitForDisplayed();
|
|
ArticlePage.notifications_button_element.click();
|
|
};
|
|
|
|
const iShouldSeeTheNotificationsOverlay = () => {
|
|
iSeeAnOverlay();
|
|
};
|
|
|
|
const iClickTheNotificationsOverlayCloseButton = () => {
|
|
iClickTheOverlayCloseButton();
|
|
};
|
|
|
|
const iShouldNotSeeTheNotificationsOverlay = () => {
|
|
iDoNotSeeAnOverlay();
|
|
};
|
|
|
|
module.exports = {
|
|
iHaveNoNotifications, iClickOnTheNotificationIcon,
|
|
iShouldSeeTheNotificationsOverlay, iClickTheNotificationsOverlayCloseButton,
|
|
iShouldNotSeeTheNotificationsOverlay
|
|
};
|