[ARVADOS] updated: bdaaaf2330d43200f5e9f14172ca0591d7314aaf
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 10 11:45:59 EDT 2014
Summary of changes:
apps/workbench/test/diagnostics/pipeline_test.rb | 41 +++++++++++++-----------
apps/workbench/test/diagnostics_test_helper.rb | 15 +++++++++
2 files changed, 38 insertions(+), 18 deletions(-)
create mode 100644 apps/workbench/test/diagnostics_test_helper.rb
via bdaaaf2330d43200f5e9f14172ca0591d7314aaf (commit)
from 2332fe41a097d491c7211a64d6d7c02a65952cc4 (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 bdaaaf2330d43200f5e9f14172ca0591d7314aaf
Author: radhika <radhika at curoverse.com>
Date: Wed Sep 10 11:45:19 2014 -0400
2761: load inputs dynamically
diff --git a/apps/workbench/test/diagnostics/pipeline_test.rb b/apps/workbench/test/diagnostics/pipeline_test.rb
index fdc9d20..126b6a6 100644
--- a/apps/workbench/test/diagnostics/pipeline_test.rb
+++ b/apps/workbench/test/diagnostics/pipeline_test.rb
@@ -23,12 +23,6 @@ class PipelineTest < DiagnosticsTest
page.find('.glyphicon-search').click
end
-# within '.modal-content' do
-# find('.selectable', text: pipeline_config['template_name']).click
-# find(:xpath, "//div[./span[contains(.,'zzzzz-p5p6p-rxj8d71854j9idn')]]").click
-# click_button 'Show'
-# end
-
# Run the pipeline
find('a,button', text: 'Run').click
@@ -38,23 +32,34 @@ class PipelineTest < DiagnosticsTest
find('button', text: 'Choose').click
end
+ if pipeline_config['input_names'].andand.any?
# This pipeline needs input. So, Run should be disabled
page.assert_selector 'a.disabled,button.disabled', text: 'Run'
- # Choose input for the pipeline
- find('.btn', text: 'Choose').click
- within('.modal-dialog') do
- find('.selectable', text: pipeline_config['input_names'][0]).click
- find('button', text: 'OK').click
- end
- wait_for_ajax
-
- # Run this pipeline instance
- find('a,button', text: 'Run').click
+ inputs = page.all('.btn', text: 'Choose')
+ inputs.each_with_index do |input, index|
+ # Choose input for the pipeline
+ input.click
+ within('.modal-dialog') do
+ input_found = page.has_text?(pipeline_config['input_names'][index])
+ if input_found
+ find('.selectable', text: pipeline_config['input_names'][index]).click
+ else
+ fill_in('Search', with: pipeline_config['input_names'][index], exact: true)
+ wait_for_ajax
+ find('.selectable', text: pipeline_config['input_names'][index]).click
+ end
+ find('button', text: 'OK').click
+ wait_for_ajax
+ end
- # Pipeline is running. We have a "Stop" button instead now.
- page.assert_selector 'a,button', text: 'Stop'
+ # Run this pipeline instance
+ find('a,button', text: 'Run').click
+ # Pipeline is running. We have a "Stop" button instead now.
+ page.assert_selector 'a,button', text: 'Stop'
+ end
end
+ end
end
end
diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb
new file mode 100644
index 0000000..2d378f3
--- /dev/null
+++ b/apps/workbench/test/diagnostics_test_helper.rb
@@ -0,0 +1,15 @@
+require 'integration_helper'
+require 'yaml'
+
+class DiagnosticsTest < ActionDispatch::IntegrationTest
+
+ def visit_page_with_token token_name, path='/'
+ tokens = Rails.configuration.diagnostics_testing_user_tokens
+ visit page_with_token(tokens[token_name], path)
+ end
+
+ def diagnostic_test_pipeline_config pipeline_to_run
+ Rails.configuration.diagnostics_testing_pipeline_fields[pipeline_to_run]
+ end
+
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list