mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 03:53:43 +08:00
6459922993
c.f. https://meta.discourse.org/t/converting-modals-from-legacy-controllers-to-new-dmodal-component-api/268057 This also converts the Bookmark component to a Glimmer component.
28 lines
531 B
Ruby
28 lines
531 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Components
|
|
class Dialog < PageObjects::Components::Base
|
|
def closed?
|
|
has_no_css?(".dialog-container")
|
|
end
|
|
|
|
def open?
|
|
has_css?(".dialog-container")
|
|
end
|
|
|
|
def has_content?(content)
|
|
find(".dialog-container").has_content?(content)
|
|
end
|
|
|
|
def click_yes
|
|
find(".dialog-footer .btn-primary").click
|
|
end
|
|
|
|
def click_no
|
|
find(".dialog-footer .btn-default").click
|
|
end
|
|
end
|
|
end
|
|
end
|