Skip to content

Commit

Permalink
[5055] use implicit waits to make sure we are good
Browse files Browse the repository at this point in the history
plus this will more explicitly tell us whats going on if this doesnt work

https://medium.com/doctolib/hunting-flaky-tests-2-waiting-for-ajax-bd76d79d9ee9
  • Loading branch information
Ian Norris authored and Ian Norris committed Jul 30, 2023
1 parent 3b65a03 commit 9fa7d1d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/system/notifications/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,14 @@

before do
click_button "Make Reminder"
click_button "Confirm"
end

it "lists followup notifications showing admin current name" do
# Wait until page reloads
sleep(1)
expect(page).to have_content "Resolve Reminder"
click_button "Confirm"

within("#resolve", wait: 5) do
expect(page).to have_content "Resolve Reminder"
end

visit edit_users_path
fill_in "Display name", with: created_by_name
Expand Down

0 comments on commit 9fa7d1d

Please sign in to comment.