mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 12:13:58 -06:00
af74cf5c77
Display modal for combined new and unread view with options: - [x] Dismiss new topics - [x] Dismiss new posts - [ ] Stop tracking these topics so they stop appearing in my new list
24 lines
783 B
Ruby
24 lines
783 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Filtering topics", type: :system, js: true do
|
|
fab!(:user) { Fabricate(:user) }
|
|
let(:topic_list) { PageObjects::Components::TopicList.new }
|
|
let(:dismiss_new_modal) { PageObjects::Modals::DismissNew.new }
|
|
fab!(:group) { Fabricate(:group).tap { |g| g.add(user) } }
|
|
fab!(:topic) { Fabricate(:topic) }
|
|
|
|
before { SiteSetting.experimental_new_new_view_groups = group.id }
|
|
|
|
it "displays confirmation modal with preselected options" do
|
|
sign_in(user)
|
|
|
|
visit("/new")
|
|
|
|
expect(topic_list).to have_topic(topic)
|
|
find(".dismiss-read").click
|
|
expect(dismiss_new_modal).to have_dismiss_topics_checked
|
|
expect(dismiss_new_modal).to have_dismiss_posts_checked
|
|
expect(dismiss_new_modal).to have_untrack_unchecked
|
|
end
|
|
end
|