mirror of
https://github.com/discourse/discourse.git
synced 2024-12-21 04:04:42 +08:00
be33363f13
his is a new feature that lets admins dismiss notices from the dashboard. This helps with self-service in cases where a notice is "stuck", while we work on provisions to prevent "sticking" in the first place.
25 lines
527 B
Ruby
25 lines
527 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminDashboard < PageObjects::Pages::Base
|
|
def visit
|
|
page.visit("/admin")
|
|
self
|
|
end
|
|
|
|
def has_admin_notice?(message)
|
|
has_css?(".dashboard-problem", text: message)
|
|
end
|
|
|
|
def has_no_admin_notice?(message)
|
|
has_no_css?(".dashboard-problem", text: message)
|
|
end
|
|
|
|
def dismiss_notice(message)
|
|
find(".dashboard-problem", text: message).find(".btn").click
|
|
end
|
|
end
|
|
end
|
|
end
|