mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 00:58:57 +08:00

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.
23 lines
465 B
Ruby
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
|