2015-11-12 17:06:11 +00:00
|
|
|
class Notifications
|
|
|
|
include PageObject
|
|
|
|
|
2016-07-20 00:24:17 +00:00
|
|
|
link(:badge, css: '.mw-echo-notifications-badge')
|
2015-11-12 17:06:11 +00:00
|
|
|
link(:badge_unseen, css: '.mw-echo-unseen-notifications')
|
2016-07-20 00:24:17 +00:00
|
|
|
link(:mark_all_as_read, css: '.mw-echo-ui-notificationsListWidget-markAllReadButton > a')
|
2015-11-12 17:06:11 +00:00
|
|
|
div(:popup, css: '.mw-echo-ui-notificationBadgeButtonPopupWidget-popup')
|
|
|
|
span(:title, css: '.oo-ui-popupWidget-head > .oo-ui-labelElement-label')
|
2016-09-07 17:38:12 +00:00
|
|
|
div(
|
|
|
|
:notifications_container,
|
|
|
|
css: '.mw-echo-ui-notificationsListWidget > .mw-echo-ui-notificationItemWidget')
|
2015-11-12 17:06:11 +00:00
|
|
|
|
|
|
|
def when_loaded
|
|
|
|
title_element.when_present
|
|
|
|
notifications_container_element.when_present
|
|
|
|
end
|
|
|
|
|
|
|
|
def num_unread_notifications
|
2015-11-12 19:37:56 +00:00
|
|
|
div_elements(css: '.mw-echo-ui-notificationItemWidget-unread').size
|
2015-11-12 17:06:11 +00:00
|
|
|
end
|
|
|
|
end
|