[ARVADOS] updated: bf775ee6fbbfec9b7d8736aea57dcb0f2b770f60
git at public.curoverse.com
git at public.curoverse.com
Mon Sep 15 10:54:55 EDT 2014
Summary of changes:
apps/workbench/test/integration/jobs_test.rb | 29 ++++++++++++++++++++
.../test/integration/pipeline_instances_test.rb | 27 ++++++++++++++++++-
.../test/integration/pipeline_templates_test.rb | 31 ++++++++++++++++++++++
services/api/test/fixtures/pipeline_instances.yml | 8 ++++++
4 files changed, 94 insertions(+), 1 deletion(-)
create mode 100644 apps/workbench/test/integration/jobs_test.rb
via bf775ee6fbbfec9b7d8736aea57dcb0f2b770f60 (commit)
from a6e1c4ee0d72d0b3f5443dcf309135a4d609c0c2 (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 bf775ee6fbbfec9b7d8736aea57dcb0f2b770f60
Author: radhika <radhika at curoverse.com>
Date: Mon Sep 15 10:54:10 2014 -0400
2875: integration tests to verify description on pipeline templates, instances, and jobs.
diff --git a/apps/workbench/test/integration/jobs_test.rb b/apps/workbench/test/integration/jobs_test.rb
new file mode 100644
index 0000000..b5fc56a
--- /dev/null
+++ b/apps/workbench/test/integration/jobs_test.rb
@@ -0,0 +1,29 @@
+require 'integration_helper'
+
+class JobsTest < ActionDispatch::IntegrationTest
+ test "add job description" do
+ Capybara.current_driver = Capybara.javascript_driver
+ visit page_with_token("active", "/jobs")
+
+ # go to job running the script "doesnotexist"
+ within first('tr', text: 'doesnotexist') do
+ find("a").click
+ end
+
+ # edit job description
+ within('.arv-description-as-subtitle') do
+ find('.fa-pencil').click
+ find('.editable-input textarea').set('*Textile description for job* - "Go to dashboard":/')
+ find('.editable-submit').click
+ end
+ wait_for_ajax
+
+ # Verify edited description
+ assert page.has_no_text? '*Textile description for job*'
+ assert page.has_text? 'Textile description for job'
+ assert page.has_link? 'Go to dashboard'
+ click_link 'Go to dashboard'
+ assert page.has_text? 'My projects'
+ assert page.has_text? 'Projects shared with me'
+ end
+end
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index e019813..dfd65ec 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -158,6 +158,31 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
assert page.has_text? 'script_version'
end
+ test 'pipeline description' do
+ visit page_with_token('active_trustedclient')
+
+ visit '/pipeline_instances'
+ assert page.has_text? 'pipeline_with_template'
+
+ find('a', text: 'pipeline_with_job').click
+
+ within('.arv-description-as-subtitle') do
+ find('.fa-pencil').click
+ find('.editable-input textarea').set('*Textile description for pipeline instance* - "link to template":' + api_fixture('pipeline_templates')['two_part']['uuid'])
+ find('.editable-submit').click
+ end
+ wait_for_ajax
+
+ # verify description
+ assert page.has_no_text? '*Textile description for pipeline instance*'
+ assert page.has_text? 'Textile description for pipeline instance'
+ assert page.has_link? 'link to template'
+ click_link 'link to template'
+
+ # in template page
+ assert page.has_text? 'Two Part Pipeline Template'
+ end
+
test "JSON popup available for strange components" do
uuid = api_fixture("pipeline_instances")["components_is_jobspec"]["uuid"]
visit page_with_token("active", "/pipeline_instances/#{uuid}")
@@ -179,7 +204,7 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
find(".selectable", text: proj_name).click
click_on "Choose"
end
- assert(has_text?("From template"), "did not land on pipeline instance page")
+ assert(has_text?("This pipeline has been created from the template"), "did not land on pipeline instance page")
first("a.btn,button", text: "Choose").click
within(".modal-body") do
if (proj_name != PROJECT_WITH_SEARCH_COLLECTION)
diff --git a/apps/workbench/test/integration/pipeline_templates_test.rb b/apps/workbench/test/integration/pipeline_templates_test.rb
index d131986..56d6f4a 100644
--- a/apps/workbench/test/integration/pipeline_templates_test.rb
+++ b/apps/workbench/test/integration/pipeline_templates_test.rb
@@ -12,4 +12,35 @@ class PipelineTemplatesTest < ActionDispatch::IntegrationTest
assert(page.has_text?("script_parameters"),
"components JSON not found")
end
+
+ test "pipeline template description" do
+ Capybara.current_driver = Capybara.javascript_driver
+ visit page_with_token("active", "/pipeline_templates")
+
+ # go to Two Part pipeline template
+ within first('tr', text: 'Two Part Pipeline Template') do
+ find(".fa-gears").click
+ end
+
+ # edit template description
+ within('.arv-description-as-subtitle') do
+ find('.fa-pencil').click
+ find('.editable-input textarea').set('*Textile description for pipeline template* - "Go to dashboard":/')
+ find('.editable-submit').click
+ end
+ wait_for_ajax
+
+ # Verfiy edited description
+ assert page.has_no_text? '*Textile description for pipeline template*'
+ assert page.has_text? 'Textile description for pipeline template'
+ assert page.has_link? 'Go to dashboard'
+ click_link 'Go to dashboard'
+ assert page.has_text? 'My projects'
+ assert page.has_text? 'Projects shared with me'
+
+ # again visit recent templates page and verify edited description
+ visit page_with_token("active", "/pipeline_templates")
+ assert page.has_no_text? '*Textile description for pipeline template*'
+ assert page.has_text? 'Textile description for pipeline template'
+ end
end
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index 7bfc2e1..d4172b7 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -62,3 +62,11 @@ components_is_jobspec:
dataclass: Collection
title: "Foo/bar pair"
description: "Provide a collection containing at least two files."
+
+pipeline_with_template:
+ state: New
+ uuid: zzzzz-d1hrv-1234eyn6br1abcd
+ name: pipeline_with_template
+ owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ created_at: <%= 1.minute.ago.to_s(:db) %>
+ pipeline_template_uuid: zzzzz-p5p6p-aox0k0ofxrystgw
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list