DEV: Try fixing flakey spec
This commit is contained in:
parent
d200f6c928
commit
667d2e1647
|
@ -1,7 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
describe "Discourse Docs | Index", type: :system do
|
describe "Discourse Docs | Index", type: :system do
|
||||||
fab!(:current_user) { Fabricate(:user) }
|
|
||||||
fab!(:category)
|
fab!(:category)
|
||||||
fab!(:topic_1) { Fabricate(:topic, category: category) }
|
fab!(:topic_1) { Fabricate(:topic, category: category) }
|
||||||
fab!(:topic_2) { Fabricate(:topic, category: category) }
|
fab!(:topic_2) { Fabricate(:topic, category: category) }
|
||||||
|
@ -11,7 +10,6 @@ describe "Discourse Docs | Index", type: :system do
|
||||||
before do
|
before do
|
||||||
SiteSetting.docs_enabled = true
|
SiteSetting.docs_enabled = true
|
||||||
SiteSetting.docs_categories = category.id.to_s
|
SiteSetting.docs_categories = category.id.to_s
|
||||||
sign_in(current_user)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not error when showing the index" do
|
it "does not error when showing the index" do
|
||||||
|
@ -26,9 +24,12 @@ describe "Discourse Docs | Index", type: :system do
|
||||||
topic_2.update_excerpt(post_2.excerpt_for_topic)
|
topic_2.update_excerpt(post_2.excerpt_for_topic)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not show the topic excerpts by default" do
|
context "when docs_show_topic_excerpts is true" do
|
||||||
visit("/docs")
|
before { SiteSetting.always_include_topic_excerpts = false }
|
||||||
expect(page).to have_no_css(".topic-excerpt")
|
it "does not show the topic excerpts by default" do
|
||||||
|
visit("/docs")
|
||||||
|
expect(page).to have_no_css(".topic-excerpt")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when docs_show_topic_excerpts is true" do
|
context "when docs_show_topic_excerpts is true" do
|
||||||
|
|
Loading…
Reference in New Issue