Skip to content

Commit

Permalink
DEV: Update tests for new glimmer header flag (#54)
Browse files Browse the repository at this point in the history
In preparation for discourse/discourse#26467
  • Loading branch information
davidtaylorhq authored Apr 4, 2024
1 parent 0a837d7 commit 80f31b9
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions spec/system/viewing_custom_header_links_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@

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
Expand Down Expand Up @@ -38,7 +42,14 @@
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("/")
Expand Down

0 comments on commit 80f31b9

Please sign in to comment.