DEV: Remove `experimental_topics_filter` setting (#29902)

This commit is contained in:
Penar Musaraj 2024-11-25 10:49:40 -05:00 committed by GitHub
parent 433543a516
commit e6fdfcdcd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 34 deletions

View File

@ -126,8 +126,6 @@ class ListController < ApplicationController
end
def filter
raise Discourse::NotFound if !SiteSetting.experimental_topics_filter
topic_query_opts = { no_definitions: !SiteSetting.show_category_definitions_in_topic_lists }
%i[page q].each do |key|

View File

@ -693,7 +693,7 @@ RSpec.configure do |config|
RspecErrorTracker.exceptions.each_with_index do |(path, ex), index|
lines << "\n"
lines << "Error encountered while proccessing #{path}"
lines << "Error encountered while processing #{path}"
lines << " #{ex.class}: #{ex.message}"
ex.backtrace.each_with_index do |line, backtrace_index|
if ENV["RSPEC_EXCLUDE_GEMS_IN_BACKTRACE"]

View File

@ -1321,8 +1321,6 @@ RSpec.describe ListController do
fab!(:private_message_topic)
fab!(:topic_in_private_category) { Fabricate(:topic, category: private_category) }
before { SiteSetting.experimental_topics_filter = true }
it "should not return topics that the user is not allowed to view" do
sign_in(user)
@ -1345,16 +1343,6 @@ RSpec.describe ListController do
).to contain_exactly(topic.id)
end
it "should respond with 404 response code when `experimental_topics_filter` site setting has not been enabled" do
SiteSetting.experimental_topics_filter = false
sign_in(user)
get "/filter.json"
expect(response.status).to eq(404)
end
it "returns category definition topics if `show_category_definitions_in_topic_lists` site setting is enabled" do
category_topic = Fabricate(:topic, category: category)
category.update!(topic: category_topic)

View File

@ -6,28 +6,20 @@ describe "Filtering topics", type: :system do
let(:topic_query_filter) { PageObjects::Components::TopicQueryFilter.new }
let(:sidebar) { PageObjects::Components::NavigationMenu::Sidebar.new }
before { SiteSetting.experimental_topics_filter = true }
it "updates the input field when the query string is changed" do
sidebar_section = Fabricate(:sidebar_section, user: user)
sidebar_section_link_1 =
Fabricate(
:sidebar_section_link,
sidebar_section: sidebar_section,
linkable: Fabricate(:sidebar_url, name: "filter tags", value: "/filter?q=tag%3Atag1"),
)
sidebar_section_link_2 =
Fabricate(
:sidebar_section_link,
sidebar_section: sidebar_section,
linkable:
Fabricate(
:sidebar_url,
name: "filter categories",
value: "/filter?q=category%3Acategory1",
),
Fabricate(:sidebar_url, name: "filter categories", value: "/filter?q=category%3Acategory1"),
)
sign_in(user)