7753: Now that there are 1+ "Log" links in the pipeline instance page, update tests...
authorradhika <radhika@curoverse.com>
Fri, 4 Dec 2015 14:49:22 +0000 (09:49 -0500)
committerradhika <radhika@curoverse.com>
Fri, 4 Dec 2015 20:08:04 +0000 (15:08 -0500)
apps/workbench/test/integration/anonymous_access_test.rb
apps/workbench/test/integration/jobs_test.rb
apps/workbench/test/integration/pipeline_instances_test.rb

index 5a685b3ca7c22cdaef7dc29262728798b1a630c6..14dda0c0051add282d9eb5b751556bf474dd485c 100644 (file)
@@ -237,7 +237,6 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
 
       if objects_readable
         assert_selector 'a[href="#Log"]', text: 'Log'
-
         assert_no_selector 'a[data-toggle="disabled"]', text: 'Log'
         assert_no_text 'Output data not available'
         if pipeline_page
index 2cae500027aeebd8f79270a4ba26f61e4496373f..b8d38903797d56eae4b01169efce1c4b169f232b 100644 (file)
@@ -41,7 +41,7 @@ class JobsTest < ActionDispatch::IntegrationTest
     visit page_with_token("active", "/jobs/#{job['uuid']}")
     assert page.has_text? job['script_version']
 
-    click_link 'Log'
+    find(:xpath, "//a[@href='#Log']").click
     wait_for_ajax
     assert page.has_text? 'Started at'
     assert page.has_text? 'Finished at'
@@ -61,7 +61,7 @@ class JobsTest < ActionDispatch::IntegrationTest
     visit page_with_token("active", "/jobs/#{job['uuid']}")
     assert page.has_text? job['script_version']
 
-    click_link 'Log'
+    find(:xpath, "//a[@href='#Log']").click
     wait_for_ajax
     assert page.has_text? 'Showing only 100 bytes of this log'
   end
index 612493adf0f6f2ec2ecdb991b8144e9eb5a973af..2ab8beb294ab8f2ae99e1c6866d2ad7efbcb0822 100644 (file)
@@ -545,7 +545,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
   test "job logs linked for running pipeline" do
     pi = api_fixture("pipeline_instances", "running_pipeline_with_complete_job")
     visit(page_with_token("active", "/pipeline_instances/#{pi['uuid']}"))
-    click_on "Log"
+    find(:xpath, "//a[@href='#Log']").click
     within "#Log" do
       assert_text "Log for previous"
       log_link = find("a", text: "Log for previous")
@@ -558,7 +558,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
   test "job logs linked for complete pipeline" do
     pi = api_fixture("pipeline_instances", "complete_pipeline_with_two_jobs")
     visit(page_with_token("active", "/pipeline_instances/#{pi['uuid']}"))
-    click_on "Log"
+    find(:xpath, "//a[@href='#Log']").click
     within "#Log" do
       assert_text "Log for previous"
       pi["components"].each do |cname, cspec|
@@ -572,7 +572,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
   test "job logs linked for failed pipeline" do
     pi = api_fixture("pipeline_instances", "failed_pipeline_with_two_jobs")
     visit(page_with_token("active", "/pipeline_instances/#{pi['uuid']}"))
-    click_on "Log"
+    find(:xpath, "//a[@href='#Log']").click
     within "#Log" do
       assert_text "Log for previous"
       pi["components"].each do |cname, cspec|