X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a894a61cc9004e184bc63f9f0a785f555d6c6829..e7672a0b679659d6ba90d23b4e102fba747fa9ef:/apps/workbench/test/integration_helper.rb diff --git a/apps/workbench/test/integration_helper.rb b/apps/workbench/test/integration_helper.rb index 3d92585135..067a1bdae8 100644 --- a/apps/workbench/test/integration_helper.rb +++ b/apps/workbench/test/integration_helper.rb @@ -221,4 +221,19 @@ class ActionDispatch::IntegrationTest end Capybara.reset_sessions! end + + def accept_alert + if Capybara.current_driver == :selenium + (0..9).each do + begin + page.driver.browser.switch_to.alert.accept + break + rescue Selenium::WebDriver::Error::NoSuchAlertError + sleep 0.1 + end + end + else + # poltergeist returns true for confirm, so no need to accept + end + end end