From 66d29365628ad846b86a2f4385cc3ce369bc3fd1 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Wed, 2 Apr 2025 10:10:40 +0800 Subject: [PATCH] DEV: Resolve state leak causing flaky test (#205) --- spec/system/docs_index_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/docs_index_spec.rb b/spec/system/docs_index_spec.rb index 9aaa23f..eab9661 100644 --- a/spec/system/docs_index_spec.rb +++ b/spec/system/docs_index_spec.rb @@ -27,7 +27,7 @@ describe "Discourse Docs | Index", type: :system do context "when docs_show_topic_excerpts is false" do before { SiteSetting.always_include_topic_excerpts = false } - xit "does not show the topic excerpts by default" do + it "does not show the topic excerpts by default" do visit("/docs") expect(page).to have_no_css(".topic-excerpt") end @@ -49,6 +49,8 @@ describe "Discourse Docs | Index", type: :system do Theme.clear_cache! end + after { Theme.clear_cache! } + it "shows the excerpts" do visit("/docs") expect(page).to have_css(".topic-excerpt", text: topic_1.excerpt)