discourse/spec/system/page_objects/pages/review.rb

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