mirror of
https://github.com/discourse/discourse.git
synced 2025-01-08 20:46:19 +08:00
31 lines
731 B
Ruby
31 lines
731 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class Review < PageObjects::Pages::Base
|
|
POST_BODY_TOGGLE_SELECTOR = ".post-body__toggle-btn"
|
|
POST_BODY_COLLAPSED_SELECTOR = ".post-body.is-collapsed"
|
|
|
|
def click_post_body_toggle
|
|
find(POST_BODY_TOGGLE_SELECTOR).click
|
|
end
|
|
|
|
def has_post_body_toggle?
|
|
page.has_css?(POST_BODY_TOGGLE_SELECTOR)
|
|
end
|
|
|
|
def has_no_post_body_toggle?
|
|
page.has_no_css?(POST_BODY_TOGGLE_SELECTOR)
|
|
end
|
|
|
|
def has_post_body_collapsed?
|
|
page.has_css?(POST_BODY_COLLAPSED_SELECTOR)
|
|
end
|
|
|
|
def has_no_post_body_collapsed?
|
|
page.has_no_css?(POST_BODY_COLLAPSED_SELECTOR)
|
|
end
|
|
end
|
|
end
|
|
end
|