mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 05:18:57 +08:00
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
|