|
40 | 40 | theme.save! |
41 | 41 | end |
42 | 42 |
|
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("/") |
51 | 45 |
|
52 | | - it "should display the custom header links" do |
53 | | - visit("/") |
| 46 | + expect(custom_header_link).to be_visible |
54 | 47 |
|
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 | + ) |
96 | 53 |
|
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 | + ) |
102 | 59 |
|
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 | + ) |
109 | 65 | end |
110 | 66 | end |
0 commit comments