mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-04 18:48:15 +00:00
c16c20a394
Uncover a bug and fix it in the process \o/ - it seems that the close icon is misplaced between clicking the notifications icon and loading the contents of the overlay - this confuses the webdriver as the button is not clickable. Bug: T219920 Change-Id: Ib4d076fd9b7ea1cd48b6b58940a50560eacd51a0
33 lines
1 KiB
JavaScript
33 lines
1 KiB
JavaScript
const ArticlePage = require( '../support/pages/article_page' );
|
|
const { iClickTheOverlayCloseButton, iSeeAnOverlay, iDoNotSeeAnOverlay } = require( './common_steps' );
|
|
|
|
const iHaveNoNotifications = () => {
|
|
ArticlePage.notifications_button_element.waitForVisible();
|
|
// 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.notifications' );
|
|
ArticlePage.notifications_button_element.click();
|
|
};
|
|
|
|
const iShouldSeeTheNotificationsOverlay = () => {
|
|
iSeeAnOverlay();
|
|
};
|
|
|
|
const iClickTheNotificationsOverlayCloseButton = () => {
|
|
iClickTheOverlayCloseButton();
|
|
};
|
|
|
|
const iShouldNotSeeTheNotificationsOverlay = () => {
|
|
iDoNotSeeAnOverlay();
|
|
};
|
|
|
|
module.exports = {
|
|
iHaveNoNotifications, iClickOnTheNotificationIcon,
|
|
iShouldSeeTheNotificationsOverlay, iClickTheNotificationsOverlayCloseButton,
|
|
iShouldNotSeeTheNotificationsOverlay
|
|
};
|