0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/spec/system/page_objects/modals/discard_draft.rb
chapoi ada0aa0d4e
UX: modal modifier class BEM rename + new modifier (#40369)
- Renames .d-modal modifiers from single-dash (-large, -max) to --large,
--max across SCSS, <DModal>, and all callers (core +
discourse-local-dates plugin) to match Discourse's BEM convention.
- Moves per-modal overrides out of modal.scss into the dedicated
modal-overrides.scss file
- Add new `has-search` modifier, for use in modals with a inline
filter/search element to avoid jumping height
- Move all core `.modal selectors` to `.d-modal`

This commit should not change anything visually (if all goes well).
2026-05-28 17:36:48 +02:00

24 lines
525 B
Ruby
Vendored

# frozen_string_literal: true
module PageObjects
module Modals
class DiscardDraft < PageObjects::Modals::Base
MODAL_SELECTOR = ".discard-draft-modal"
def open?
has_css?(".d-modal#{MODAL_SELECTOR}")
end
def closed?
has_no_css?(".d-modal#{MODAL_SELECTOR}")
end
def click_discard
footer.find(".discard-draft-modal__discard-btn").click
end
def click_cancel
footer.find(".discard-draft-modal__cancel-btn").click
end
end
end
end