From ef0494f09cceefd3ec619371fb25e06e259da0be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 8 Feb 2021 15:45:25 +0100 Subject: [PATCH] Fix missing expectation in budget polls spec We've had a failure in one of our test suite runs [1]. A possible cause could be an HTTP request taking place at the same time as an AJAX request, with both trying to access the database at the same time. We've had several similar issues in the past which have been fixed by checking the AJAX request has finished before requesting another page, so we're applying the same principle here. [1] https://github.com/consul/consul/runs/1855207922 --- spec/system/budget_polls/voter_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/system/budget_polls/voter_spec.rb b/spec/system/budget_polls/voter_spec.rb index b6c71c031..53f31c60d 100644 --- a/spec/system/budget_polls/voter_spec.rb +++ b/spec/system/budget_polls/voter_spec.rb @@ -54,6 +54,8 @@ describe "BudgetPolls", :with_frozen_time do within("#poll_#{poll.id}") do click_button("Confirm vote") + + expect(page).to have_content "Vote introduced" end visit new_officing_residence_path