discourse/spec/system/page_objects/components/topic_view.rb
Joffrey JAFFEUX 41df705188
DEV: replaces topic-notifications-options by DMenu (#30298)
This commit introduces <NotificationsTracking /> which is a wrapper component around <DMenu /> which replaces the select-kit component <TopicNotificationsButton />.

Each tracking case has its dedicated component:

- topic -> `<TopicNotificationsTracking />`
- group -> `<GroupNotificationsTracking />`
- tag -> `<TagNotificationsTracking />`
- category -> `<CategoryNotificationsTracking />`
- chat thread -> `<ThreadNotificationsTracking />`
2024-12-16 19:59:18 +01:00

20 lines
493 B
Ruby

# frozen_string_literal: true
module PageObjects
module Components
class TopicView < PageObjects::Components::Base
def has_read_post?(post)
page.has_css?(
"#post_#{post.post_number} .read-state.read",
visible: false,
wait: Capybara.default_max_wait_time * 2,
)
end
def has_tracking_status?(name)
find("#topic-footer-buttons .notifications-tracking-trigger[data-level-name='#{name}']")
end
end
end
end