Skip to content

A platform for community discussion. Free, open, simple.

DEV: Move a plugin related system spec to footnote plugin (#31230)

Ted Johanssonb46718f62876
diff --git a/plugins/footnote/spec/system/admin_sidebar_navigation_spec.rb b/plugins/footnote/spec/system/admin_sidebar_navigation_spec.rb
new file mode 100644
index 00000000000..30e67dc169c
--- /dev/null
+++ b/plugins/footnote/spec/system/admin_sidebar_navigation_spec.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+RSpec.describe "Admin | Sidebar Navigation", type: :system do
+ fab!(:admin)
+
+ let(:sidebar) { PageObjects::Components::NavigationMenu::Sidebar.new }
+
+ before do
+ SiteSetting.navigation_menu = "sidebar"
+ SiteSetting.admin_sidebar_enabled_groups = [Group::AUTO_GROUPS[:admins]]
+
+ sign_in(admin)
+ end
+
+ it "adds an auto-generated plugin link to the admin sidebar" do
+ SiteSetting.enable_markdown_footnotes = true
+
+ visit("/admin")
+
+ sidebar.toggle_section(:plugins)
+
+ expect(page).to have_css(
+ ".sidebar-section-link-content-text",
+ text: I18n.t("js.footnote.title"),
+ )
+ end
+end
diff --git a/spec/system/admin_sidebar_navigation_spec.rb b/spec/system/admin_sidebar_navigation_spec.rb
index e3638f62d96..68670ed11cc 100644
--- a/spec/system/admin_sidebar_navigation_spec.rb
+++ b/spec/system/admin_sidebar_navigation_spec.rb
@@ -337,19 +337,4 @@ describe "Admin | Sidebar Navigation", type: :system do
],
)
end
-
- it "adds auto-generated plugin links for plugins with settings" do
- skip if Discourse.plugins.empty?
-
- SiteSetting.enable_markdown_footnotes = true
-
- visit("/admin")
-
- sidebar.toggle_section(:plugins)
-
- expect(page).to have_css(
- ".sidebar-section-link-content-text",
- text: I18n.t("js.footnote.title"),
- )
- end
end