A platform for community discussion. Free, open, simple.
DEV: Bump unified new upcoming change to Beta (#41454)
Martin Brennan7b0bc78f8c58
diff --git a/config/site_settings.yml b/config/site_settings.ymlindex 5b0645ec7cd..a879ffb3023 100644--- a/config/site_settings.yml+++ b/config/site_settings.yml@@ -4550,7 +4550,7 @@ experimental:client: truerefresh: trueupcoming_change:- status: "alpha"+ status: "beta"impact: "feature,all_members"learn_more_url: "https://meta.discourse.org/t/-/404728"enable_rich_text_paste:diff --git a/frontend/discourse/tests/acceptance/topic-discovery-tracked-test.js b/frontend/discourse/tests/acceptance/topic-discovery-tracked-test.jsindex ea588732a9f..260a19feff7 100644--- a/frontend/discourse/tests/acceptance/topic-discovery-tracked-test.js+++ b/frontend/discourse/tests/acceptance/topic-discovery-tracked-test.js@@ -12,6 +12,7 @@ import { i18n } from "discourse-i18n";acceptance("Topic Discovery Tracked", function (needs) {needs.user({+ unified_new_enabled: true,tracked_tags: [1],watched_tags: [2],watching_first_post_tags: [3],@@ -95,12 +96,8 @@ acceptance("Topic Discovery Tracked", function (needs) {);assert- .dom("#navigation-bar li.unread a")- .hasAttribute(- "href",- "/unread?f=tracked",- "unread link has tracked filter"- );+ .dom("#navigation-bar li.unread")+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new a")@@ -194,15 +191,12 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title_with_count", { count: 4 }),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new").hasText(- i18n("filters.new.title_with_count", { count: 2 }),+ i18n("filters.new.title_with_count", { count: 6 }),"displays the right content on new link");@@ -210,15 +204,12 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title_with_count", { count: 3 }),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new").hasText(- i18n("filters.new.title_with_count", { count: 1 }),+ i18n("filters.new.title_with_count", { count: 4 }),"displays the right content on new link");@@ -244,15 +235,12 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title_with_count", { count: 2 }),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new").hasText(- i18n("filters.new.title"),+ i18n("filters.new.title_with_count", { count: 2 }),"displays the right content on new link");});@@ -276,10 +264,7 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title"),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new")@@ -292,10 +277,7 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title"),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new")@@ -358,15 +340,12 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title_with_count", { count: 1 }),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new").hasText(- i18n("filters.new.title"),+ i18n("filters.new.title_with_count", { count: 1 }),"displays the right content on new link");@@ -374,10 +353,7 @@ acceptance("Topic Discovery Tracked", function (needs) {assert.dom("#navigation-bar li.unread")- .hasText(- i18n("filters.unread.title"),- "displays the right content on unread link"- );+ .doesNotExist("unread link is not displayed");assert.dom("#navigation-bar li.new")diff --git a/spec/lib/homepage_helper_spec.rb b/spec/lib/homepage_helper_spec.rbindex 029e29b2d91..527e2ea1aa8 100644--- a/spec/lib/homepage_helper_spec.rb+++ b/spec/lib/homepage_helper_spec.rb@@ -46,7 +46,7 @@ RSpec.describe HomepageHelper doendcontext "when first item in top menu is not valid for anons" do- before { SiteSetting.top_menu = "new|top|latest|unread" }+ before { SiteSetting.top_menu = "new|top|latest" }it "distinguishes between auth homepage and anon homepage" doexpect(HomepageHelper.resolve(nil, user)).to eq("new")@@ -59,7 +59,7 @@ RSpec.describe HomepageHelper docontext "with login required" dobefore doSiteSetting.login_required = true- SiteSetting.top_menu = "new|top|latest|unread"+ SiteSetting.top_menu = "new|top|latest"endit "returns a blank route for anon, first result from top menu for authenticated user" dodiff --git a/spec/models/topic_tracking_state_spec.rb b/spec/models/topic_tracking_state_spec.rbindex 54e89971f10..48fc9bff570 100644--- a/spec/models/topic_tracking_state_spec.rb+++ b/spec/models/topic_tracking_state_spec.rb@@ -852,81 +852,59 @@ RSpec.describe TopicTrackingState dodescribe ".report_totals" dofab!(:user2, :user)- it "correctly returns new/unread totals" do+ it "correctly returns combined new + unread totals" doreport = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 0, unread: 0 })+ expect(report).to eq({ new: 0 })post.topic.notifier.watch_topic!(post.topic.user_id)report = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 1, unread: 0 })+ expect(report).to eq({ new: 1 })create_post(user: user, topic: post.topic)- # when user replies, they have 0 new count+ # when user replies, they have 0 combined new+unread countreport = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 0, unread: 0 })+ expect(report).to eq({ new: 0 })- # when we reply the poster will have an unread item+ # when we reply the poster will have one combined new+unread itemreport = TopicTrackingState.report_totals(post.user)- expect(report).to eq({ new: 0, unread: 1 })+ expect(report).to eq({ new: 1 })create_post(user: user2, topic: post.topic)- # when a third user replies, the original user should have an unread item+ # when a third user replies, the original user should have one combined new+unread itemreport = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 0, unread: 1 })+ expect(report).to eq({ new: 1 })- # the post user still has one unread+ # the post user still has one combined new+unread itemreport = TopicTrackingState.report_totals(post.user)- expect(report).to eq({ new: 0, unread: 1 })+ expect(report).to eq({ new: 1 })post2 = create_postpost2.topic.notifier.watch_topic!(user.id)- # watching another new topic bumps the new count+ # watching another new topic bumps the combined new+unread countreport = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 1, unread: 1 })+ expect(report).to eq({ new: 2 })endit "respects treat_as_new_topic_start_date user option" doreport = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 0, unread: 0 })+ expect(report).to eq({ new: 0 })post.topic.notifier.watch_topic!(post.topic.user_id)report = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 1, unread: 0 })+ expect(report).to eq({ new: 1 })user.user_option.new_topic_duration_minutes = 5user.user_option.savepost.topic.created_at = 10.minutes.agopost.topic.save- report = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 0, unread: 0 })- end-- it "respects unified_new_enabled" do- SiteSetting.enable_unified_new = true-report = TopicTrackingState.report_totals(user)expect(report).to eq({ new: 0 })-- post.topic.notifier.watch_topic!(post.topic.user_id)-- post2 = create_post- Fabricate(:post, topic: post2.topic)-- tracking = {- notification_level: TopicUser.notification_levels[:tracking],- last_read_post_number: 1,- }-- TopicUser.change(user.id, post2.topic_id, tracking)-- report = TopicTrackingState.report_totals(user)- expect(report).to eq({ new: 2 })endenddiff --git a/spec/requests/list_controller_spec.rb b/spec/requests/list_controller_spec.rbindex 96485914bc0..9c6add11f8d 100644--- a/spec/requests/list_controller_spec.rb+++ b/spec/requests/list_controller_spec.rb@@ -8,7 +8,7 @@ RSpec.describe ListController dobefore doadmin # to skip welcome wizard at home page `/`- SiteSetting.top_menu = "latest|new|unread|categories"+ SiteSetting.top_menu = "latest|new|categories"enddescribe "#index" dodiff --git a/spec/requests/topics_controller_spec.rb b/spec/requests/topics_controller_spec.rbindex de314af2f2c..f2b6eeba2ba 100644--- a/spec/requests/topics_controller_spec.rb+++ b/spec/requests/topics_controller_spec.rb@@ -5541,7 +5541,9 @@ RSpec.describe TopicsController dotracked_topic = create_post(category: tracked_category).topiccreate_post # This is a new post, but is not tracked so a record will not be created for it- expect do put "/topics/reset-new.json?tracked=true" end.to change {+ expect do+ put "/topics/reset-new.json?tracked=true", params: { dismiss_topics: true }+ end.to change {DismissedTopicUser.where(user_id: user.id, topic_id: tracked_topic.id).count}.by(1)end@@ -5557,7 +5559,7 @@ RSpec.describe TopicsController doit "creates dismissed topic user records if there are > 30 (default pagination) topics" doexpect dostub_const(TopicQuery, "DEFAULT_PER_PAGE_COUNT", 2) do- put "/topics/reset-new.json?tracked=true"+ put "/topics/reset-new.json?tracked=true", params: { dismiss_topics: true }endend.to change {DismissedTopicUser.where(user_id: user.id, topic_id: @tracked_topic_ids).count@@ -5571,6 +5573,7 @@ RSpec.describe TopicsController dostub_const(TopicQuery, "DEFAULT_PER_PAGE_COUNT", 2) doput "/topics/reset-new.json?tracked=true",params: {+ dismiss_topics: true,topic_ids: dismissing_topic_ids,}end@@ -5590,7 +5593,7 @@ RSpec.describe TopicsController doit "updates the user_stat new_since column and dismisses all the new topics" doold_new_since = user.user_stat.new_since- put "/topics/reset-new.json?tracked=false"+ put "/topics/reset-new.json?tracked=false", params: { dismiss_topics: true }expect(DismissedTopicUser.where(user_id: user.id, topic_id: @topic_ids).count).to eq(7,)@@ -5603,9 +5606,9 @@ RSpec.describe TopicsController doDismissedTopicUser.create(user_id: user.id, topic_id: dismiss_ids.first)DismissedTopicUser.create(user_id: user.id, topic_id: dismiss_ids.second)- expect { put "/topics/reset-new.json?tracked=false" }.to change {- DismissedTopicUser.where(user_id: user.id).count- }.by(5)+ expect do+ put "/topics/reset-new.json?tracked=false", params: { dismiss_topics: true }+ end.to change { DismissedTopicUser.where(user_id: user.id).count }.by(5)endendend@@ -5622,7 +5625,7 @@ RSpec.describe TopicsController dotopic_ids: [category_topic.id],)- put "/topics/reset-new.json?category_id=#{category.id}"+ put "/topics/reset-new.json?category_id=#{category.id}", params: { dismiss_topics: true }expect(DismissedTopicUser.where(user_id: user.id).pluck(:topic_id)).to eq([category_topic.id],@@ -5635,7 +5638,10 @@ RSpec.describe TopicsController dotopic_ids: [category_topic.id, subcategory_topic.id],)- put "/topics/reset-new.json?category_id=#{category.id}&include_subcategories=true"+ put "/topics/reset-new.json?category_id=#{category.id}&include_subcategories=true",+ params: {+ dismiss_topics: true,+ }expect(response.status).to eq(200)@@ -5655,7 +5661,10 @@ RSpec.describe TopicsController dotopic_ids: [category_topic.id, subcategory_topic.id, sub_subcategory_topic.id],)- put "/topics/reset-new.json?category_id=#{category.id}&include_subcategories=true"+ put "/topics/reset-new.json?category_id=#{category.id}&include_subcategories=true",+ params: {+ dismiss_topics: true,+ }expect(response.status).to eq(200)@@ -5685,6 +5694,7 @@ RSpec.describe TopicsController doMessageBus.track_publish(TopicTrackingState.unread_channel_key(user.id)) doput "/topics/reset-new.json",params: {+ dismiss_topics: true,category_id: category.id,include_subcategories: true,}@@ -5712,6 +5722,7 @@ RSpec.describe TopicsController doMessageBus.track_publish(TopicTrackingState.unread_channel_key(user.id)) doput "/topics/reset-new.json",params: {+ dismiss_topics: true,category_id: category.id,include_subcategories: true,}@@ -5743,7 +5754,11 @@ RSpec.describe TopicsController doit "doesn't dismiss topics or publish topic IDs via MessageBus if the user can't access the category" domessages =MessageBus.track_publish do- put "/topics/reset-new.json", params: { category_id: private_category.id }+ put "/topics/reset-new.json",+ params: {+ dismiss_topics: true,+ category_id: private_category.id,+ }expect(response.status).to eq(200)end@@ -5755,7 +5770,11 @@ RSpec.describe TopicsController dogroup.add(user)messages =MessageBus.track_publish do- put "/topics/reset-new.json", params: { category_id: private_category.id }+ put "/topics/reset-new.json",+ params: {+ dismiss_topics: true,+ category_id: private_category.id,+ }endexpect(response.status).to eq(200)expect(messages.size).to eq(1)@@ -5778,7 +5797,7 @@ RSpec.describe TopicsController doit "dismisses topics for tag" doTopicTrackingState.expects(:publish_dismiss_new).with(user.id, topic_ids: [tag_topic.id])- put "/topics/reset-new.json?tag_name=#{tag.name}"+ put "/topics/reset-new.json?tag_name=#{tag.name}", params: { dismiss_topics: true }expect(DismissedTopicUser.where(user_id: user.id).pluck(:topic_id)).to eq([tag_topic.id])end@@ -5800,7 +5819,11 @@ RSpec.describe TopicsController dogroup.add(user)messages =MessageBus.track_publish do- put "/topics/reset-new.json", params: { tag_name: restricted_tag.name }+ put "/topics/reset-new.json",+ params: {+ dismiss_topics: true,+ tag_name: restricted_tag.name,+ }endexpect(messages.size).to eq(1)expect(messages[0].data["payload"]["topic_ids"]).to contain_exactly(@@ -5814,7 +5837,11 @@ RSpec.describe TopicsController doit "ignores the tag param and dismisses all topics if the user can't see the tag" domessages =MessageBus.track_publish do- put "/topics/reset-new.json", params: { tag_name: restricted_tag.name }+ put "/topics/reset-new.json",+ params: {+ dismiss_topics: true,+ tag_name: restricted_tag.name,+ }endexpect(messages.size).to eq(1)expect(messages[0].data["payload"]["topic_ids"]).to contain_exactly(@@ -5842,7 +5869,10 @@ RSpec.describe TopicsController douser.id,topic_ids: [tag_and_category_topic.id],)- put "/topics/reset-new.json?tag_name=#{tag.name}&category_id=#{category.id}"+ put "/topics/reset-new.json?tag_name=#{tag.name}&category_id=#{category.id}",+ params: {+ dismiss_topics: true,+ }expect(DismissedTopicUser.where(user_id: user.id).pluck(:topic_id)).to eq([tag_and_category_topic.id],)@@ -5859,7 +5889,8 @@ RSpec.describe TopicsController do.with(user.id, topic_ids: [topic2.id, topic3.id]).at_least_once- put "/topics/reset-new.json", **{ params: { topic_ids: [topic2.id, topic3.id] } }+ put "/topics/reset-new.json",+ **{ params: { dismiss_topics: true, topic_ids: [topic2.id, topic3.id] } }expect(response.status).to eq(200)user.reloadexpect(user.user_stat.new_since.to_date).not_to eq(old_date.to_date)@@ -5883,7 +5914,11 @@ RSpec.describe TopicsController domessages =MessageBus.track_publish do- put "/topics/reset-new.json", params: { topic_ids: [topic2.id, topic3.id] }+ put "/topics/reset-new.json",+ params: {+ dismiss_topics: true,+ topic_ids: [topic2.id, topic3.id],+ }endexpect(messages.size).to eq(1)expect(messages[0].channel).to eq(TopicTrackingState.unread_channel_key(user.id))@@ -5913,7 +5948,12 @@ RSpec.describe TopicsController docreate_post # This is a new post, but is not tracked so a record will not be created for itexpect doput "/topics/reset-new.json?tracked=true",- **{ params: { topic_ids: [tracked_topic.id, topic2.id, topic3.id] } }+ **{+ params: {+ dismiss_topics: true,+ topic_ids: [tracked_topic.id, topic2.id, topic3.id],+ },+ }end.to change { DismissedTopicUser.where(user_id: user.id).count }.by(2)expect(DismissedTopicUser.where(user_id: user.id).pluck(:topic_id)).to match_array([tracked_topic.id, topic2.id],diff --git a/spec/system/dismissing_new_spec.rb b/spec/system/dismissing_new_spec.rbindex f3a57a24b1e..0b03f4a9033 100644--- a/spec/system/dismissing_new_spec.rb+++ b/spec/system/dismissing_new_spec.rb@@ -8,15 +8,17 @@ RSpec.describe "Dismissing New" dolet(:topic_list) { PageObjects::Components::TopicList.new }let(:topic_view) { PageObjects::Components::TopicView.new }- describe "when a user has an unread post" do+ before { SiteSetting.enable_unified_new = true }++ describe "when a user has a new reply" dofab!(:topic) { Fabricate(:topic, user: user) }fab!(:post1) { create_post(user: user, topic: topic) }fab!(:post2) { create_post(topic: topic) }- it "should untrack topics across sessions after the user dismisses it" do+ it "lets the user stop tracking replies across sessions" dosign_in(user)- visit("/unread")+ visit("/new?subset=replies")using_session(:tab_1) dosign_in(user)@@ -26,7 +28,7 @@ RSpec.describe "Dismissing New" doexpect(topic_view).to have_tracking_status("tracking")end- topic_list_controls.dismiss_unread(untrack: true)+ topic_list_controls.dismiss_new_and_stop_trackingusing_session(:tab_1) dotry_until_success(reason: "relies on MessageBus updates") do@@ -35,7 +37,7 @@ RSpec.describe "Dismissing New" doendend- context "when dismissing new on a category's topic list" do+ context "when viewing a category's topic list" dofab!(:category, :category_with_definition)fab!(:subcategory) { Fabricate(:category_with_definition, parent_category: category) }fab!(:category_topic) { Fabricate(:topic, category: category, user: user) }@@ -45,16 +47,16 @@ RSpec.describe "Dismissing New" dofab!(:subcategory_post1) { create_post(user: user, topic: subcategory_topic) }fab!(:subcategory_post2) { create_post(topic: subcategory_topic) }- it "should dismiss unread posts for the category and its subcategories" do+ it "lets the user dismiss replies for the category and subcategories" dosign_in(user)- visit("/c/#{category.id}/l/unread")+ visit("/c/#{category.slug}/#{category.id}/l/new?subset=replies")- expect(topic_list_controls).to have_unread(count: 2)+ expect(topic_list).to have_topics(count: 2)- topic_list_controls.dismiss_unread+ topic_list_controls.dismiss_new- expect(topic_list_controls).to have_unread(count: 0)+ expect(topic_list).to have_no_topicsendendend@@ -62,18 +64,18 @@ RSpec.describe "Dismissing New" dodescribe "when a user has a new topic" dofab!(:topic)- it "should remove the new topic across sessions after the user dismisses it" do+ it "lets the user dismiss the new topic across sessions" dotab_1 = open_new_window(:tab)switch_to_window(tab_1)sign_in(user)- visit("/new")+ visit("/new?subset=topics")expect(topic_list_controls).to have_new(count: 1)tab_2 = open_new_window(:tab)switch_to_window(tab_2)sign_in(user)- visit("/new")+ visit("/new?subset=topics")expect(topic_list_controls).to have_new(count: 1)@@ -87,14 +89,12 @@ RSpec.describe "Dismissing New" doendend- describe "when unified new is enabled" do+ describe "when a user has new topics and replies" dofab!(:new_topic) { Fabricate(:topic, user: user) }fab!(:post1) { create_post(user: user) }fab!(:post2) { create_post(topic: post1.topic) }- before { SiteSetting.enable_unified_new = true }-- it "should remove the new topic and post across sessions after the user dismisses it" do+ it "lets the user dismiss topics and replies across sessions" dotab_1 = open_new_window(:tab)switch_to_window(tab_1)sign_in(user)diff --git a/spec/system/homepage_spec.rb b/spec/system/homepage_spec.rbindex 37774e07d9e..311f73713c1 100644--- a/spec/system/homepage_spec.rb+++ b/spec/system/homepage_spec.rb@@ -40,7 +40,7 @@ describe "Homepage" doendit "defaults to first top_menu item as anonymous homepage" do- SiteSetting.top_menu = "categories|latest|new|unread"+ SiteSetting.top_menu = "categories|latest|new"visit "/"expect(page).to have_css(".navigation-container .categories.active", text: "Categories")diff --git a/spec/system/login_spec.rb b/spec/system/login_spec.rbindex 41c71c2d4dd..e2b3a716a1d 100644--- a/spec/system/login_spec.rb+++ b/spec/system/login_spec.rb@@ -179,7 +179,7 @@ shared_examples "login scenarios" doendit "does not leak category metadata if homepage is /categories" do- SiteSetting.top_menu = "categories|latest|new|unread|top"+ SiteSetting.top_menu = "categories|latest|new|top"visit "/"expect(page).to have_css(".login-welcome")diff --git a/spec/system/page_objects/components/topic_list_controls.rb b/spec/system/page_objects/components/topic_list_controls.rbindex 06fd8172a72..bd25fcdcdb9 100644--- a/spec/system/page_objects/components/topic_list_controls.rb+++ b/spec/system/page_objects/components/topic_list_controls.rb@@ -14,24 +14,6 @@ module PageObjectshas_css?(".nav-item_new", exact_text: text)end- def has_unread?(count:)- text =- if count == 0- I18n.t("js.filters.unread.title")- else- I18n.t("js.filters.unread.title_with_count", count: count)- end-- has_css?(".nav-item_unread", exact_text: text)- end-- def dismiss_unread(untrack: false)- click_button("dismiss-topics-top")- find(".dismiss-read-modal__stop-tracking").click if untrack- click_button("dismiss-read-confirm")- self- end-def dismiss_newclick_button("dismiss-new-top")selfdiff --git a/spec/system/topic_bulk_select_spec.rb b/spec/system/topic_bulk_select_spec.rbindex 8af2c170c73..0420942ce9c 100644--- a/spec/system/topic_bulk_select_spec.rb+++ b/spec/system/topic_bulk_select_spec.rb@@ -25,14 +25,16 @@ describe "Topic bulk select" doexpect(topic_bulk_actions_modal).to be_openend- context "when dismissing unread topics" do+ context "when dismissing new replies" dofab!(:topic) { Fabricate(:topic, user: admin) }fab!(:post1) { create_post(user: admin, topic: topic) }fab!(:post2) { create_post(topic: topic) }+ before { SiteSetting.enable_unified_new = true }+it "removes the topics from the list" dosign_in(admin)- visit("/unread")+ visit("/new?subset=replies")topic_list_header.click_bulk_select_buttonexpect(topic_list).to have_topic_checkbox(topic)@@ -40,11 +42,9 @@ describe "Topic bulk select" dotopic_list.click_topic_checkbox(topic)topic_list_header.click_bulk_select_topics_dropdown- topic_list_header.click_bulk_button("dismiss-unread")-- topic_bulk_actions_modal.click_dismiss_confirm+ topic_list_header.click_bulk_button("dismiss-new")- expect(page).to have_text(I18n.t("js.topics.none.education.unread"))+ expect(topic_list).to have_no_topicsendit "turns off bulk select after dismissing" do@@ -53,15 +53,13 @@ describe "Topic bulk select" docreate_post(topic: other_topic)sign_in(admin)- visit("/unread")+ visit("/new?subset=replies")topic_list_header.click_bulk_select_buttontopic_list.click_topic_checkbox(topic)topic_list_header.click_bulk_select_topics_dropdown- topic_list_header.click_bulk_button("dismiss-unread")-- topic_bulk_actions_modal.click_dismiss_confirm+ topic_list_header.click_bulk_button("dismiss-new")expect(topic_list).to have_topic(other_topic)expect(topic_list).to have_no_topic_checkbox(other_topic)@@ -74,6 +72,8 @@ describe "Topic bulk select" dolet(:topic_list_controls) { PageObjects::Components::TopicListControls.new }+ before { SiteSetting.enable_unified_new = true }+context "with the bulk actions dropdown" doit "removes the topics from the list" dosign_in(admin)@@ -414,6 +414,8 @@ describe "Topic bulk select" doendit "works with keyboard shortcuts" do+ SiteSetting.enable_unified_new = true+sign_in(admin)visit("/latest")@@ -428,14 +430,14 @@ describe "Topic bulk select" dosend_keys("x") # toggle deselectexpect(topic_list).to have_no_checkbox_selected_on_row(1)- # watch topic and add a reply so we have something in /unread+ # watch topic and add a reply so we have something in /new?subset=repliestopic = topics.firstvisit("/t/#{topic.slug}/#{topic.id}")topic_page.watch_topicexpect(topic_page).to have_read_post(1)Fabricate(:post, topic: topic)- visit("/unread")+ visit("/new?subset=replies")expect(topic_list).to have_topicssend_keys([:shift, "b"])@@ -444,8 +446,6 @@ describe "Topic bulk select" dosend_keys("x")send_keys([:shift, "d"])- click_button("dismiss-read-confirm")-expect(topic_list).to have_no_topicsendenddiff --git a/spec/system/viewing_category_spec.rb b/spec/system/viewing_category_spec.rbindex a50d2da9a56..6f71942c54d 100644--- a/spec/system/viewing_category_spec.rb+++ b/spec/system/viewing_category_spec.rb@@ -6,6 +6,8 @@ RSpec.describe "Viewing a category" dolet(:category_page) { PageObjects::Pages::Category.new }let(:topic_list) { PageObjects::Components::TopicList.new }+ before { SiteSetting.enable_unified_new = true }+describe "when a new child category is created with a new category topic" dofab!(:child_category) { Fabricate(:category, parent_category: category) }@@ -15,7 +17,7 @@ RSpec.describe "Viewing a category" doendend- it "should show a new count on the parent and child category when 'show_category_definitions_in_topic_lists' is true" do+ it "shows the category topic on the parent and child new lists when category definitions are shown" doSiteSetting.show_category_definitions_in_topic_lists = truesign_in(user)@@ -33,19 +35,17 @@ RSpec.describe "Viewing a category" doexpect(topic_list).to have_topic(child_category_topic)end- it "should only show a new count on the child category when 'show_category_definitions_in_topic_lists' site setting is false" do+ it "shows the category topic only on the child new list when category definitions are hidden" doSiteSetting.show_category_definitions_in_topic_lists = falsesign_in(user)category_page.visit(category)+ category_page.click_new- expect(category_page).to have_no_new_topics+ expect(topic_list).to have_no_topic(child_category_topic)category_page.visit(child_category)-- expect(category_page).to have_new_topics-category_page.click_newexpect(topic_list).to have_topics(count: 1)diff --git a/spec/system/welcome_banner_spec.rb b/spec/system/welcome_banner_spec.rbindex b17fe165594..6c3c335bd93 100644--- a/spec/system/welcome_banner_spec.rb+++ b/spec/system/welcome_banner_spec.rb@@ -91,8 +91,6 @@ describe "Welcome banner" doexpect(banner).to be_visiblevisit "/new"expect(banner).to be_visible- visit "/unread"- expect(banner).to be_visiblevisit "/hot"expect(banner).to be_visiblevisit "/tags"