DEV: Update tests for new glimmer header flag (#54)

In preparation for https://github.com/discourse/discourse/pull/26467
This commit is contained in:
David Taylor 2024-04-04 17:11:57 +01:00 committed by GitHub
parent 0a837d7c04
commit 80f31b9e8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 3 deletions

View File

@ -8,8 +8,12 @@ RSpec.describe "Viewing Custom Header Links", system: true do
context "when glimmer headers are enabled" do
before do
SiteSetting.experimental_glimmer_header_groups =
Group::AUTO_GROUPS[:everyone]
if SiteSetting.respond_to?(:experimental_glimmer_header_groups)
SiteSetting.experimental_glimmer_header_groups =
Group::AUTO_GROUPS[:everyone]
else
SiteSetting.glimmer_header_mode = "enabled"
end
end
it "should display the custom header links" do
@ -38,7 +42,14 @@ RSpec.describe "Viewing Custom Header Links", system: true do
end
context "when glimmer headers are disabled" do
before { SiteSetting.experimental_glimmer_header_groups = nil }
before do
if SiteSetting.respond_to?(:experimental_glimmer_header_groups)
SiteSetting.experimental_glimmer_header_groups =
nil
else
SiteSetting.glimmer_header_mode = "disabled"
end
end
it "should display the custom header links" do
visit("/")