Keegan George 5d4bb4b54e
UX: Improvements to posts route (#30968)
This update makes some small improvements to the posts route front-end.
Specifically, it adds a title to the page, and it improves the
positioning of expand/collapse caret.
2025-01-23 19:04:43 -08:00

23 lines
465 B
Ruby

# frozen_string_literal: true
module PageObjects
module Pages
class Posts < PageObjects::Pages::Base
POSTS_PAGE_SELECTOR = ".posts-page"
def visit
page.visit("/posts")
self
end
def has_page_title?
page.find("#{POSTS_PAGE_SELECTOR} .posts-page__title")
end
def has_posts?(count)
page.has_css?("#{POSTS_PAGE_SELECTOR} .post-list .post-list-item", count: count)
end
end
end
end