discourse/spec/system/page_objects/pages/admin_badges_groupings.rb
Ted Johansson 59a2a70806
DEV: Move admin page objects to /pages directory (#30812)
A handful of the page objects for admin pages were placed directly under /page_objects rather than under /page_objects/pages with the others. This PR simply moves them.
2025-01-16 11:18:36 +08:00

33 lines
639 B
Ruby

# frozen_string_literal: true
module PageObjects
module Pages
class AdminBadgesGroupings < PageObjects::Pages::Base
def add_grouping(name)
within(modal) do
find(".badge-groupings__add-grouping").click
find(".badge-grouping-name-input").fill_in(with: name)
end
save
self
end
def save
page.find(".badge-groupings__save").click
expect(self).to be_closed
self
end
def modal
page.find(".badge-groupings-modal")
end
def closed?
page.has_no_css?(".badge-groupings-modal")
end
end
end
end