diff --git a/spec/system/user_uses_the_editor_spec.rb b/spec/system/user_uses_the_editor_spec.rb index 86ed89589..ab7c5a671 100644 --- a/spec/system/user_uses_the_editor_spec.rb +++ b/spec/system/user_uses_the_editor_spec.rb @@ -98,11 +98,12 @@ RSpec.describe "Using the editor", type: :system do describe "using v2 editor", js: true do it "fill out form with rich content and click publish" do visit "/new" - fill_in "article-form-title", with: "This is a test" - fill_in "tag-input", with: "What, Yo" - fill_in "article_body_markdown", with: "Hello" + within "form#article-form" do + fill_in "article-form-title", with: "This is a test" + fill_in "tag-input", with: "What, Yo" + fill_in "article_body_markdown", with: "Hello" + end find("button", text: /\APublish\z/).click - expect(page).to have_xpath("//div[@class='crayons-article__header__meta']//h1") expect(page).to have_text("Hello") expect(page).to have_link("what", href: "/t/what")