DEV: Resolve state leak causing flaky test (#205)

This commit is contained in:
Alan Guo Xiang Tan 2025-04-02 10:10:40 +08:00 committed by GitHub
parent 7014d6707e
commit 66d2936562
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -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)