Skip to content

Commit ec751e4

Browse files
authored
DEV: Remove old header widget code (#66)
1 parent 843a579 commit ec751e4

File tree

1 file changed

+18
-62
lines changed

1 file changed

+18
-62
lines changed

spec/system/viewing_custom_header_links_spec.rb

Lines changed: 18 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -40,71 +40,27 @@
4040
theme.save!
4141
end
4242

43-
context "when glimmer headers are enabled" do
44-
before do
45-
if SiteSetting.respond_to?(:experimental_glimmer_header_groups)
46-
SiteSetting.experimental_glimmer_header_groups = Group::AUTO_GROUPS[:everyone]
47-
else
48-
SiteSetting.glimmer_header_mode = "enabled"
49-
end
50-
end
43+
it "should display the custom header links" do
44+
visit("/")
5145

52-
it "should display the custom header links" do
53-
visit("/")
46+
expect(custom_header_link).to be_visible
5447

55-
expect(custom_header_link).to be_visible
56-
57-
expect(custom_header_link).to have_custom_header_link(
58-
"External link",
59-
href: "https://meta.discourse.org",
60-
title: "This link will open in a new tab",
61-
)
62-
63-
expect(custom_header_link).to have_custom_header_link(
64-
"Most Liked",
65-
href: "/latest/?order=op_likes",
66-
title: "Posts with the most amount of likes",
67-
)
68-
69-
expect(custom_header_link).to have_custom_header_link(
70-
"Privacy",
71-
href: "/privacy",
72-
title: "Our Privacy Policy",
73-
)
74-
end
75-
end
76-
77-
context "when glimmer headers are disabled" do
78-
before do
79-
if SiteSetting.respond_to?(:experimental_glimmer_header_groups)
80-
SiteSetting.experimental_glimmer_header_groups = nil
81-
else
82-
SiteSetting.glimmer_header_mode = "disabled"
83-
end
84-
end
85-
86-
it "should display the custom header links" do
87-
visit("/")
88-
89-
expect(custom_header_link).to be_visible
90-
91-
expect(custom_header_link).to have_custom_header_link(
92-
"External link",
93-
href: "https://meta.discourse.org",
94-
title: "This link will open in a new tab",
95-
)
48+
expect(custom_header_link).to have_custom_header_link(
49+
"External link",
50+
href: "https://meta.discourse.org",
51+
title: "This link will open in a new tab",
52+
)
9653

97-
expect(custom_header_link).to have_custom_header_link(
98-
"Most Liked",
99-
href: "/latest/?order=op_likes",
100-
title: "Posts with the most amount of likes",
101-
)
54+
expect(custom_header_link).to have_custom_header_link(
55+
"Most Liked",
56+
href: "/latest/?order=op_likes",
57+
title: "Posts with the most amount of likes",
58+
)
10259

103-
expect(custom_header_link).to have_custom_header_link(
104-
"Privacy",
105-
href: "/privacy",
106-
title: "Our Privacy Policy",
107-
)
108-
end
60+
expect(custom_header_link).to have_custom_header_link(
61+
"Privacy",
62+
href: "/privacy",
63+
title: "Our Privacy Policy",
64+
)
10965
end
11066
end

0 commit comments

Comments
 (0)