[ARVADOS] updated: fe9b1b2c25f69a9169478e2c6cd2cf368866d006
Git user
git at public.curoverse.com
Tue Aug 23 16:13:04 EDT 2016
Summary of changes:
.../controllers/work_unit_templates_controller.rb | 4 ++--
.../app/controllers/work_units_controller.rb | 9 ++++----
.../app/views/projects/_show_dashboard.html.erb | 2 +-
.../test/integration/application_layout_test.rb | 25 ++++++++++++++++++++++
services/api/test/fixtures/workflows.yml | 5 ++++-
5 files changed, 37 insertions(+), 8 deletions(-)
via fe9b1b2c25f69a9169478e2c6cd2cf368866d006 (commit)
from 8d37eefb14b5bea1044063affa6e299d8ca92c37 (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 fe9b1b2c25f69a9169478e2c6cd2cf368866d006
Author: radhika <radhika at curoverse.com>
Date: Tue Aug 23 16:12:34 2016 -0400
9767: add test to run a workflow from dashboard
diff --git a/apps/workbench/app/controllers/work_unit_templates_controller.rb b/apps/workbench/app/controllers/work_unit_templates_controller.rb
index b9a92b0..6b5f114 100644
--- a/apps/workbench/app/controllers/work_unit_templates_controller.rb
+++ b/apps/workbench/app/controllers/work_unit_templates_controller.rb
@@ -2,7 +2,7 @@ class WorkUnitTemplatesController < ApplicationController
def find_objects_for_index
return if !params[:partial]
- @limit = 20
+ @limit = 40
@filters = @filters || []
# get next page of pipeline_templates
@@ -14,7 +14,7 @@ class WorkUnitTemplatesController < ApplicationController
workflows = Workflow.limit(@limit).order(["created_at desc"]).filter(filters)
@objects = (pipelines.to_a + workflows.to_a).sort_by(&:created_at).reverse.first(@limit)
-
+
if @objects.any?
@next_page_filters = next_page_filters('<=')
@next_page_href = url_for(partial: :choose_rows,
diff --git a/apps/workbench/app/controllers/work_units_controller.rb b/apps/workbench/app/controllers/work_units_controller.rb
index 6cda2e8..49226e0 100644
--- a/apps/workbench/app/controllers/work_units_controller.rb
+++ b/apps/workbench/app/controllers/work_units_controller.rb
@@ -39,11 +39,11 @@ class WorkUnitsController < ApplicationController
template_uuid = params['work_unit']['template_uuid']
attrs = {}
- res = resource_class_for_uuid(template_uuid)
- if res == PipelineTemplate
+ rc = resource_class_for_uuid(template_uuid)
+ if rc == PipelineTemplate
model_class = PipelineInstance
attrs['pipeline_template_uuid'] = template_uuid
- elsif res == Workflow
+ elsif rc == Workflow
# workflow json
workflow = Workflow.find? template_uuid
if workflow.workflow
@@ -86,7 +86,8 @@ class WorkUnitsController < ApplicationController
mounts["/var/lib/cwl/workflow.json"] = {
"kind" => "json",
"content" => {
- "class" => wf_json
+ "class" => "Workflow",
+ "workflow" => wf_json
}
}
end
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index ef947ed..e935307 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -8,7 +8,7 @@
<span>
<%= link_to(
choose_work_unit_templates_path(
- title: 'Choose a pipeline or process to run:',
+ title: 'Choose a pipeline to run:',
action_name: 'Next: choose inputs <i class="fa fa-fw fa-arrow-circle-right"></i>',
action_href: work_units_path,
action_method: 'post',
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index 40ec31d..d1d2494 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -335,4 +335,29 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
assert page.has_text? 'Textile description for object'
end
end
+
+ [
+ ['Two Part Pipeline Template', 'part-one', 'Provide a value for the following'],
+ ['Valid workflow with name and desc', 'name: foo', 'This container is uncommitted'],
+ ].each do |template_name, preview_txt, process_txt|
+ test "run a process using template #{template_name} from dashboard" do
+ visit page_with_token('admin')
+ assert_text 'Recent pipelines and processes' # seeing dashboard now
+
+ within('.recent-processes-actions') do
+ assert page.has_link?('All processes')
+ find('a', text: 'Run a pipeline').click
+ end
+
+ # in the chooser, verify preview and click Next button
+ within('.modal-dialog') do
+ find('.selectable', text: template_name).click
+ assert_text preview_txt
+ find('.btn', text: 'Next: choose inputs').click
+ end
+
+ # in the process page now
+ assert_text process_txt
+ end
+ end
end
diff --git a/services/api/test/fixtures/workflows.yml b/services/api/test/fixtures/workflows.yml
index d7818f2..2fba560 100644
--- a/services/api/test/fixtures/workflows.yml
+++ b/services/api/test/fixtures/workflows.yml
@@ -1,17 +1,20 @@
workflow_with_workflow_yml:
uuid: zzzzz-7fd4e-validworkfloyml
owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
- name: Valid workflow
+ name: Valid workflow with name and desc
description: this work has a valid workflow yaml
workflow: "name: foo\ndesc: bar"
+ created_at: <%= 1.minute.ago.to_s(:db) %>
workflow_with_no_workflow_yml:
uuid: zzzzz-7fd4e-validbutnoyml00
owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
name: Valid workflow with no workflow yaml
description: this workflow does not have a workflow yaml
+ created_at: 2016-08-15 12:00:00
workflow_with_no_name_and_desc:
uuid: zzzzz-7fd4e-validnonamedesc
owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
workflow: this is valid yaml
+ created_at: 2016-08-15 12:00:01
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list