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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
517 B
Ruby
Raw Normal View History

# 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