Flaky Spec Fix:Clear Article Content Before Filling In (#10810)

This commit is contained in:
Molly Struve 2020-10-12 10:46:25 -05:00 committed by GitHub
parent c37b283865
commit e42b6d6b46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,7 +25,7 @@ RSpec.describe "Editing with an editor", type: :system, js: true do
it "user unpublishes their post" do
visit "/#{user.username}/#{article.slug}/edit"
fill_in "article_body_markdown", with: template.gsub("true", "false")
fill_in("article_body_markdown", with: template.gsub("true", "false"), fill_options: { clear: :backspace })
click_button("Save changes")
expect(page).to have_text("Unpublished Post.")
end