Skip to content

Commit

Permalink
Fix: attempt to fix flaky autocomplete spec
Browse files Browse the repository at this point in the history
When running in CI we often see the autocomplete specs fail. We think
this might be caused by the suite running faster than the browser can
render the expected elements.

Elsewhere we have put a short sleep in to give the browser time to
load, so we do the same here.
  • Loading branch information
mec committed Oct 16, 2024
1 parent 37df6c9 commit 72d1b55
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@

fill_in "Assign to", with: user.email

# give the autocomplete time to load
sleep(0.5)

within(autocomplete_first_suggestion) do
expect(page).to have_content("#{user.first_name} #{user.last_name} (#{user.email})")
end
Expand Down Expand Up @@ -157,6 +160,9 @@

fill_in "Assign to", with: user.email

# give the autocomplete time to load
sleep(0.5)

within(autocomplete_first_suggestion) do
expect(page).to have_content("#{user.first_name} #{user.last_name} (#{user.email})")
end
Expand Down

0 comments on commit 72d1b55

Please sign in to comment.