X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/91dc5f1d7f5ad9eb2640f6089e2d0476cbf87c8e..9f1ce358ac564abf62965cccf2bf3afa3bcfef95:/apps/workbench/test/integration/pipeline_instances_test.rb?ds=inline diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb index d97850c991..338280684e 100644 --- a/apps/workbench/test/integration/pipeline_instances_test.rb +++ b/apps/workbench/test/integration/pipeline_instances_test.rb @@ -16,14 +16,21 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest # Note: Even with all this help, phantomjs seem to behave badly # when parsing timestamps on the other side of a DST transition. # See skipped tests below. + + # In some locales (e.g., en_CA.UTF-8) Firefox can't parse what its + # own toLocaleString() puts out. + t.sub!(/(\d\d\d\d)-(\d\d)-(\d\d)/, '\2/\3/\1') + if /(\d+:\d+ [AP]M) (\d+\/\d+\/\d+)/ =~ t # Currently dates.js renders timestamps as # '{t.toLocaleTimeString()} {t.toLocaleDateString()}' which even - # browsers can't make sense of. First we need to flip it around - # so it looks like what toLocaleString() would have made. + # en_US browsers can't make sense of. First we need to flip it + # around so it looks like what toLocaleString() would have made. t = $~[2] + ', ' + $~[1] end - DateTime.parse(page.evaluate_script "new Date('#{t}').toUTCString()").to_time + + utc = page.evaluate_script("new Date('#{t}').toUTCString()") + DateTime.parse(utc).to_time end if false @@ -384,7 +391,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest collection = api_fixture('collections', collection_fixture) # create a pipeline instance - find('.btn', text: 'Run a pipeline').click + find('.btn', text: 'Run a process').click within('.modal-dialog') do find('.selectable', text: template_name).click find('.btn', text: 'Next: choose inputs').click