mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 00:10:52 +08:00
20 lines
422 B
Ruby
20 lines
422 B
Ruby
# frozen_string_literal: true
|
|
module PageObjects
|
|
module Modals
|
|
class DiscardDraft < PageObjects::Modals::Base
|
|
MODAL_SELECTOR = ".discard-draft-modal"
|
|
|
|
def open?
|
|
has_css?(".modal.d-modal#{MODAL_SELECTOR}")
|
|
end
|
|
|
|
def closed?
|
|
has_no_css?(".modal.d-modal#{MODAL_SELECTOR}")
|
|
end
|
|
|
|
def click_save
|
|
footer.find("button.save-draft").click
|
|
end
|
|
end
|
|
end
|
|
end
|