[ARVADOS] updated: 1.2.0-266-gcb4e95b68

Git user git at public.curoverse.com
Thu Oct 25 20:51:57 EDT 2018


Summary of changes:
 apps/workbench/test/integration_helper.rb | 11 +++++++++++
 1 file changed, 11 insertions(+)

       via  cb4e95b683eda5c503956818ce8bbc2af7d8414b (commit)
      from  dd5efa11702934a9e00ae05b76f3f0279e1c36df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit cb4e95b683eda5c503956818ce8bbc2af7d8414b
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Thu Oct 25 20:49:48 2018 -0400

    Fix crash in test cleanup.
    
    refs #14407
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/apps/workbench/test/integration_helper.rb b/apps/workbench/test/integration_helper.rb
index 1af7245a4..85c929fdb 100644
--- a/apps/workbench/test/integration_helper.rb
+++ b/apps/workbench/test/integration_helper.rb
@@ -223,6 +223,17 @@ class ActionDispatch::IntegrationTest
       screenshot
     end
     if Capybara.current_driver == :selenium
+      # Clearing localStorage crashes on a page where JS isn't
+      # executed. We also need to make sure we're clearing
+      # localStorage for the test server's origin, even if we finished
+      # the test on a different origin.
+      host = Capybara.current_session.server.host
+      port = Capybara.current_session.server.port
+      base = "http://#{host}:#{port}"
+      if page.evaluate_script("window.document.contentType") != "text/html" ||
+         !page.evaluate_script("window.location.toString()").start_with?(base)
+        visit "#{base}/404"
+      end
       page.execute_script("window.localStorage.clear()")
     else
       page.driver.restart if defined?(page.driver.restart)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list