| 1 |
'use strict'; |
| 2 |
|
| 3 |
const ArticlePage = require( '../support/pages/article_page' ); |
| 4 |
const { iClickTheOverlayCloseButton, iSeeAnOverlay, iDoNotSeeAnOverlay } = require( './common_steps' ); |
| 5 |
|
| 6 |
const iHaveNoNotifications = () => { |
| 7 |
ArticlePage.notifications_button_element.waitForDisplayed(); |
| 8 |
|
| 9 |
|
| 10 |
browser.execute( '$( () => { $( ".notification-count span" ).hide(); } );' ); |
| 11 |
}; |
| 12 |
|
| 13 |
const iClickOnTheNotificationIcon = () => { |
| 14 |
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.scripts' ); |
| 15 |
ArticlePage.notifications_button_element.waitForDisplayed(); |
| 16 |
ArticlePage.notifications_button_element.click(); |
| 17 |
}; |
| 18 |
|
| 19 |
const iShouldSeeTheNotificationsOverlay = () => { |
| 20 |
iSeeAnOverlay(); |
| 21 |
}; |
| 22 |
|
| 23 |
const iClickTheNotificationsOverlayCloseButton = () => { |
| 24 |
iClickTheOverlayCloseButton(); |
| 25 |
}; |
| 26 |
|
| 27 |
const iShouldNotSeeTheNotificationsOverlay = () => { |
| 28 |
iDoNotSeeAnOverlay(); |
| 29 |
}; |
| 30 |
|
| 31 |
module.exports = { |
| 32 |
iHaveNoNotifications, iClickOnTheNotificationIcon, |
| 33 |
iShouldSeeTheNotificationsOverlay, iClickTheNotificationsOverlayCloseButton, |
| 34 |
iShouldNotSeeTheNotificationsOverlay |
| 35 |
}; |