Fix flaky unselecting an investment spec

In this spec, we were doing to request at the same time; one to unselect
an investment and another one to filter the investments. If the second
request finished before the first one, the test failed.

Adding an expectation to check the first request has finished before the
second one starts solves the problem.
This commit is contained in:
Javi Martín
2020-02-26 17:22:51 +01:00
parent 6b9b531776
commit 25bc4f1103

View File

@@ -1525,6 +1525,8 @@ describe "Admin budget investments" do
within("#budget_investment_#{selected_bi.id}") do
click_link("Selected")
expect(page).to have_link("Select")
end
click_button("Filter")