Use JavaScript in tests using the Markdown editor

The markdown editor only works with JavaScript, so in order to test it
we need a JavaScript test.
This commit is contained in:
Javi Martín
2021-03-29 17:31:24 +02:00
parent 287c488734
commit 9d1b3a4da2

View File

@@ -18,7 +18,7 @@ describe "Admin legislation draft versions", :admin do
end
context "Create" do
scenario "Valid legislation draft version" do
scenario "Valid legislation draft version", :js do
create(:legislation_process, title: "An example legislation process")
visit admin_root_path
@@ -35,7 +35,7 @@ describe "Admin legislation draft versions", :admin do
fill_in "Version title", with: "Version 3"
fill_in "Changes", with: "Version 3 changes"
fill_in "Text", with: "Version 3 body"
fill_in_markdown_editor "Text", with: "Version 3 body"
within("form .end") do
click_button "Create version"