mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 02:33:44 +08:00
23 lines
517 B
Ruby
23 lines
517 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module PageObjects
|
||
|
module Pages
|
||
|
class GroupActivityPosts < PageObjects::Pages::Base
|
||
|
def visit(group)
|
||
|
page.visit("/g/#{group.name}/activity/posts")
|
||
|
self
|
||
|
end
|
||
|
|
||
|
def has_user_stream_item?(count:)
|
||
|
has_css?(".user-stream-item", count: count)
|
||
|
end
|
||
|
|
||
|
def scroll_to_last_item
|
||
|
page.execute_script <<~JS
|
||
|
document.querySelector('.user-stream-item:last-of-type').scrollIntoView(true);
|
||
|
JS
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|