discourse/spec/system/page_objects/pages/admin_dashboard.rb
Ted Johansson be33363f13
FEATURE: Add ability to dismiss admin notices (#28916)
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.
2024-09-17 14:43:34 +08:00

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