mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-04 12:18:30 +00:00
b3c07eedeb
Target page entries used to exist for each user that was notified for an event. They were removed as the notifications were marked as read. Now they remain so that the association between pages and events can be used for moderation regardless of the notifications read status. This patch removes everything about echo_target_page.etp_user from sql and php code. Bug: T143959 Change-Id: Ib57510e6b0e9202a7e035f8ea59955dca8a0b24a
22 lines
737 B
Ruby
22 lines
737 B
Ruby
class Notifications
|
|
include PageObject
|
|
|
|
link(:badge, css: '.mw-echo-notifications-badge')
|
|
link(:badge_unseen, css: '.mw-echo-unseen-notifications')
|
|
link(:mark_all_as_read, css: '.mw-echo-ui-notificationsListWidget-markAllReadButton > a')
|
|
div(:popup, css: '.mw-echo-ui-notificationBadgeButtonPopupWidget-popup')
|
|
span(:title, css: '.oo-ui-popupWidget-head > .oo-ui-labelElement-label')
|
|
div(
|
|
:notifications_container,
|
|
css: '.mw-echo-ui-notificationsListWidget > .mw-echo-ui-notificationItemWidget')
|
|
|
|
def when_loaded
|
|
title_element.when_present
|
|
notifications_container_element.when_present
|
|
end
|
|
|
|
def num_unread_notifications
|
|
div_elements(css: '.mw-echo-ui-notificationItemWidget-unread').size
|
|
end
|
|
end
|