mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-26 14:00:42 +08:00
…otifications and mentions shown in emails (#32848)"
This reverts commit e147d2afe6. The
original commit has a bug, it replaces multiple usernames mentioned in a
post with the name of the first user in email templates.
Reverting temporarily, will need to re-roll a fix.
36 lines
919 B
Ruby
Vendored
36 lines
919 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class UserNotifications < PageObjects::Pages::Base
|
|
def visit(user)
|
|
page.visit("/u/#{user.username}/notifications")
|
|
self
|
|
end
|
|
|
|
def filter_dropdown
|
|
PageObjects::Components::SelectKit.new(".notifications-filter")
|
|
end
|
|
|
|
def set_filter_value(value)
|
|
filter_dropdown.select_row_by_value(value)
|
|
end
|
|
|
|
def has_selected_filter_value?(value)
|
|
expect(filter_dropdown).to have_selected_value(value)
|
|
end
|
|
|
|
def has_notification?(notification)
|
|
page.has_css?(".notification a[href='#{notification.url}']")
|
|
end
|
|
|
|
def has_no_notification?(notification)
|
|
page.has_no_css?(".notification a[href='#{notification.url}']")
|
|
end
|
|
|
|
def has_notification_count_of?(count)
|
|
page.has_css?(".notification", count: count)
|
|
end
|
|
end
|
|
end
|
|
end
|