mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-12-22 10:33:24 +00:00
a6ab8d6da3
Change-Id: I52b2feacd6216e99e04f193ba963e897b3e1a771
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( '$( () => { $( ".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
|
|
};
|