mirror of
https://github.com/discourse/discourse.git
synced 2025-03-14 10:33:43 +00:00
FIX: Double wait timeout for mail deliver in email_change_spec.rb (#31818)
The tests have been flaky on CI so just double the timeouts for now. We will investigate further if it continues to flake with the doubled timeout.
This commit is contained in:
committed by
GitHub
parent
5aa1e58492
commit
f3f2ae1ae7
@ -20,7 +20,9 @@ describe "Changing email", type: :system do
|
||||
|
||||
find(".save-button button").click
|
||||
|
||||
wait_for(timeout: Capybara.default_max_wait_time) { ActionMailer::Base.deliveries.count === 1 }
|
||||
wait_for(timeout: Capybara.default_max_wait_time * 2) do
|
||||
ActionMailer::Base.deliveries.count === 1
|
||||
end
|
||||
|
||||
if user.admin?
|
||||
get_link_from_email(:old)
|
||||
@ -141,7 +143,10 @@ describe "Changing email", type: :system do
|
||||
find(".dialog-footer .btn-primary").click
|
||||
|
||||
# Confirm new email
|
||||
wait_for(timeout: Capybara.default_max_wait_time) { ActionMailer::Base.deliveries.count === 2 }
|
||||
wait_for(timeout: Capybara.default_max_wait_time * 2) do
|
||||
ActionMailer::Base.deliveries.count === 2
|
||||
end
|
||||
|
||||
confirm_new_link = get_link_from_email(:new)
|
||||
|
||||
visit confirm_new_link
|
||||
@ -172,7 +177,10 @@ describe "Changing email", type: :system do
|
||||
find(".dialog-footer .btn-primary").click
|
||||
|
||||
# Confirm new email
|
||||
wait_for(timeout: Capybara.default_max_wait_time) { ActionMailer::Base.deliveries.count === 2 }
|
||||
wait_for(timeout: Capybara.default_max_wait_time * 2) do
|
||||
ActionMailer::Base.deliveries.count === 2
|
||||
end
|
||||
|
||||
confirm_new_link = get_link_from_email(:new)
|
||||
|
||||
visit confirm_new_link
|
||||
|
Reference in New Issue
Block a user