From a46f285b46962bbca7930d4d3e884c8d5f9a2f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Saquetim?= <1108771+megothss@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:26:30 -0300 Subject: [PATCH] DEV: Remove old header widget code --- .../viewing_custom_header_links_spec.rb | 80 +++++-------------- 1 file changed, 18 insertions(+), 62 deletions(-) diff --git a/spec/system/viewing_custom_header_links_spec.rb b/spec/system/viewing_custom_header_links_spec.rb index a1ec1d8..ba91ba9 100644 --- a/spec/system/viewing_custom_header_links_spec.rb +++ b/spec/system/viewing_custom_header_links_spec.rb @@ -40,71 +40,27 @@ theme.save! end - context "when glimmer headers are enabled" do - before do - 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 + visit("/") - it "should display the custom header links" do - visit("/") + expect(custom_header_link).to be_visible - expect(custom_header_link).to be_visible - - expect(custom_header_link).to have_custom_header_link( - "External link", - href: "https://meta.discourse.org", - title: "This link will open in a new tab", - ) - - expect(custom_header_link).to have_custom_header_link( - "Most Liked", - href: "/latest/?order=op_likes", - title: "Posts with the most amount of likes", - ) - - expect(custom_header_link).to have_custom_header_link( - "Privacy", - href: "/privacy", - title: "Our Privacy Policy", - ) - end - end - - context "when glimmer headers are disabled" do - 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("/") - - expect(custom_header_link).to be_visible - - expect(custom_header_link).to have_custom_header_link( - "External link", - href: "https://meta.discourse.org", - title: "This link will open in a new tab", - ) + expect(custom_header_link).to have_custom_header_link( + "External link", + href: "https://meta.discourse.org", + title: "This link will open in a new tab", + ) - expect(custom_header_link).to have_custom_header_link( - "Most Liked", - href: "/latest/?order=op_likes", - title: "Posts with the most amount of likes", - ) + expect(custom_header_link).to have_custom_header_link( + "Most Liked", + href: "/latest/?order=op_likes", + title: "Posts with the most amount of likes", + ) - expect(custom_header_link).to have_custom_header_link( - "Privacy", - href: "/privacy", - title: "Our Privacy Policy", - ) - end + expect(custom_header_link).to have_custom_header_link( + "Privacy", + href: "/privacy", + title: "Our Privacy Policy", + ) end end