DEV: Avoid waiting full capybara default wait time (#21842)

Avoid using negated matchers with custom RSpec matchers that rely on
`has_css?` as it'll result in Capybara waiting the full default wait
time.
This commit is contained in:
Alan Guo Xiang Tan
2023-05-31 08:00:16 +09:00
committed by GitHub
parent 852086e888
commit 83af25179d
2 changed files with 16 additions and 4 deletions

View File

@ -88,7 +88,7 @@ describe "Composer Form Templates", type: :system, js: true do
it "shows a form when a form template is assigned to the category" do
category_page.visit(category_with_template_1)
category_page.new_topic_button.click
expect(composer).not_to have_composer_input
expect(composer).to have_no_composer_input
expect(composer).to have_form_template
expect(composer).to have_form_template_field("checkbox")
end
@ -115,7 +115,7 @@ describe "Composer Form Templates", type: :system, js: true do
it "does not show form template chooser when a category only has form template" do
category_page.visit(category_with_template_1)
category_page.new_topic_button.click
expect(composer).not_to have_form_template_chooser
expect(composer).to have_no_form_template_chooser
end
it "shows form template chooser when a category has multiple form templates" do