X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/56d21dc3d5823117729df3db6186da96f277b328..011cdc12d3d3a664e8a8ef09bc0e7f5223afa6df:/apps/workbench/test/integration_helper.rb diff --git a/apps/workbench/test/integration_helper.rb b/apps/workbench/test/integration_helper.rb index ebfbc584e8..febcfcfec0 100644 --- a/apps/workbench/test/integration_helper.rb +++ b/apps/workbench/test/integration_helper.rb @@ -25,11 +25,6 @@ class ActionDispatch::IntegrationTest @@API_AUTHS = self.api_fixture('api_client_authorizations') - def setup - reset_session! - super - end - def page_with_token(token, path='/') # Generate a page path with an embedded API token. # Typical usage: visit page_with_token('token_name', page) @@ -54,11 +49,17 @@ class ActionDispatch::IntegrationTest end end - @@screenshot_count = 0 + @@screenshot_count = 1 def screenshot - image_file = "./tmp/workbench-fail-#{@@screenshot_count += 1}.png" - page.save_screenshot image_file - puts "Saved #{image_file}" + image_file = "./tmp/workbench-fail-#{@@screenshot_count}.png" + begin + page.save_screenshot image_file + rescue Capybara::NotSupportedByDriverError + # C'est la vie. + else + puts "Saved #{image_file}" + @@screenshot_count += 1 + end end teardown do @@ -68,5 +69,6 @@ class ActionDispatch::IntegrationTest if Capybara.current_driver == :selenium page.execute_script("window.localStorage.clear()") end + Capybara.reset_sessions! end end