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