[ARVADOS] updated: 2332fe41a097d491c7211a64d6d7c02a65952cc4
git at public.curoverse.com
git at public.curoverse.com
Wed Sep 10 10:42:11 EDT 2014
Summary of changes:
apps/workbench/config/application.default.yml | 25 +++++--
apps/workbench/test/diagnostics/pipeline_test.rb | 91 +++++++++++++-----------
2 files changed, 69 insertions(+), 47 deletions(-)
via 2332fe41a097d491c7211a64d6d7c02a65952cc4 (commit)
from 735d5487e328eb51bbaaca0475e4facf6af84567 (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 2332fe41a097d491c7211a64d6d7c02a65952cc4
Author: radhika <radhika at curoverse.com>
Date: Wed Sep 10 10:40:59 2014 -0400
2761: diagnostics testing config in application.yml
diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml
index 7c68648..510dedb 100644
--- a/apps/workbench/config/application.default.yml
+++ b/apps/workbench/config/application.default.yml
@@ -95,10 +95,6 @@ common:
default_openid_prefix: https://www.google.com/accounts/o8/id
send_user_setup_notification_email: true
- # Configuration for diagnostics testing. Use this to enable diagnostics testing for an env.
- diagnostics_testing_active_user_token: false
- # End configuration for diagnostics testing
-
# Set user_profile_form_fields to enable and configure the user profile page.
# Default is set to false. A commented setting with full description is provided below.
user_profile_form_fields: false
@@ -145,3 +141,24 @@ common:
issue_reporter_email_from: arvados at example.com
issue_reporter_email_to: arvados at example.com
support_email_address: arvados at example.com
+
+ # Configuration for diagnostics testing. Use this to enable diagnostics testing for an env.
+ diagnostics_testing_user_tokens: false
+ diagnostics_testing_pipeline_fields: false
+
+ # Below is a sample setting for diagnostics testing.
+ # Configure test user tokens as "diagnostics_testing_user_tokens".
+ # At this time the tests need an "active" user token.
+ # Also, configure the pipelines to be executed as "diagnostics_testing_pipeline_fields".
+ # For each of the pipeline fields:
+ # You
+ #diagnostics_testing_user_tokens:
+ # active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
+ # admin: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r
+ #diagnostics_testing_pipeline_fields:
+ # tutorial pipeline:
+ # template_uuid: zzzzz-p5p6p-rxj8d71854j9idn
+ # input_names: ['Diagnostic testing - Tutorial pipeline input']
+ # tutorial pipeline 2:
+ # template_uuid: zzzzz-p5p6p-kfwus81of6y3ezs
+ # input_names: ['Diagnostic testing - Tutorial pipeline input']
diff --git a/apps/workbench/test/diagnostics/pipeline_test.rb b/apps/workbench/test/diagnostics/pipeline_test.rb
index 431719e..fdc9d20 100644
--- a/apps/workbench/test/diagnostics/pipeline_test.rb
+++ b/apps/workbench/test/diagnostics/pipeline_test.rb
@@ -1,55 +1,60 @@
-require 'integration_helper'
+require 'diagnostics_test_helper'
require 'selenium-webdriver'
require 'headless'
-class PipelineTest < ActionDispatch::IntegrationTest
+class PipelineTest < DiagnosticsTest
+ pipelines_to_run = Rails.configuration.diagnostics_testing_pipeline_fields.andand.keys
+
setup do
headless = Headless.new
headless.start
Capybara.current_driver = :selenium
end
- test 'Run tutorial pipeline' do
- visit page_with_token(Rails.configuration.diagnostics_testing_active_user_token)
-
- # Search for tutorial template
- within('.navbar-fixed-top') do
- page.find_field('search').set 'Diagnostic testing - Tutorial pipeline template'
- page.find('.glyphicon-search').click
- end
-
- within '.modal-content' do
- find('.selectable', text: 'Diagnostic testing - Tutorial pipeline template').click
- click_button 'Show'
- end
-
- # Tun the pipeline
- find('a,button', text: 'Run').click
-
- # Choose project
- within('.modal-dialog') do
- find('.selectable', text: 'Home').click
- find('button', text: 'Choose').click
- end
-
- # This pipeline needs input. So, Run should be disabled
- page.assert_selector 'a.disabled,button.disabled', text: 'Run'
-
- instance_page = current_path
-
- # Choose input for the pipeline
- find('.btn', text: 'Choose').click
- within('.modal-dialog') do
- find('.selectable', text: 'Diagnostic testing - Tutorial pipeline input').click
- find('button', text: 'OK').click
- end
- wait_for_ajax
-
- # 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'
+ pipelines_to_run.andand.each do |pipeline_to_run|
+ test "visit home page for user #{pipeline_to_run}" do
+ visit_page_with_token 'active'
+
+ pipeline_config = diagnostic_test_pipeline_config pipeline_to_run
+
+ # Search for tutorial template
+ within('.navbar-fixed-top') do
+ page.find_field('search').set pipeline_config['template_uuid']
+ 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
+
+ # Choose project
+ within('.modal-dialog') do
+ find('.selectable', text: 'Home').click
+ find('button', text: 'Choose').click
+ end
+
+ # 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
+
+ # Pipeline is running. We have a "Stop" button instead now.
+ page.assert_selector 'a,button', text: 'Stop'
+ end
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list