From 9a44505d220ea15b4a5d06def16cc37cf698ed0c Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 2 Apr 2025 17:12:21 +0100 Subject: [PATCH] DEV: Resolve excerpt issue in specs --- spec/system/docs_index_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/system/docs_index_spec.rb b/spec/system/docs_index_spec.rb index eab9661..5ceaffc 100644 --- a/spec/system/docs_index_spec.rb +++ b/spec/system/docs_index_spec.rb @@ -10,6 +10,11 @@ describe "Discourse Docs | Index", type: :system do before do SiteSetting.docs_enabled = true SiteSetting.docs_categories = category.id.to_s + + if SiteSetting.respond_to?(:tooltips_enabled) + # Unfortunately this plugin is enabled by default, and it messes with the docs specs + SiteSetting.tooltips_enabled = false + end end it "does not error when showing the index" do @@ -29,6 +34,7 @@ describe "Discourse Docs | Index", type: :system do it "does not show the topic excerpts by default" do visit("/docs") + expect(page).to have_css(".topic-list-item", count: 2) expect(page).to have_no_css(".topic-excerpt") end end