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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user