Fill in the right field in phases test
Before clicking the "Edit phase" link, there's already a "Name" field present in the page (the name of the budget). With the rack driver, there's no problem since the `fill_in` action waits until the page is loaded. However, the test will be a flaky spec if we use a driver supporting JavaScript, since clicking the "Edit phase" link will cause an AJAX request and the `fill_in` action might be executed before the AJAX request is finished.
This commit is contained in:
@@ -32,6 +32,8 @@ describe "Admin budget phases" do
|
|||||||
within("tr", text: "Accepting projects") { click_link "Edit phase" }
|
within("tr", text: "Accepting projects") { click_link "Edit phase" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
expect(page).to have_css "h2", exact_text: "Edit Participatory budget - Accepting projects"
|
||||||
|
|
||||||
fill_in "Name", with: "My phase custom name"
|
fill_in "Name", with: "My phase custom name"
|
||||||
click_button "Save changes"
|
click_button "Save changes"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user