X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/91dc5f1d7f5ad9eb2640f6089e2d0476cbf87c8e..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