1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 require 'integration_helper'
6 require 'helpers/share_object_helper'
7 require_relative 'integration_test_utils'
9 class ProjectsTest < ActionDispatch::IntegrationTest
10 include ShareObjectHelper
16 test 'Check collection count for A Project in the tab pane titles' do
17 project_uuid = api_fixture('groups')['aproject']['uuid']
18 visit page_with_token 'active', '/projects/' + project_uuid
19 click_link 'Data collections'
21 collection_count = page.all("[data-pk*='collection']").count
22 assert_selector '#Data_collections-tab span', text: "(#{collection_count})"
25 test 'Find a project and edit its description' do
26 visit page_with_token 'active', '/'
27 find("#projects-menu").click
28 find(".dropdown-menu a", text: "A Project").click
29 within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
30 find('span', text: api_fixture('groups')['aproject']['name']).click
31 within('.arv-description-as-subtitle') do
32 find('.fa-pencil').click
33 find('.editable-input textarea').set('I just edited this.')
34 find('.editable-submit').click
39 assert(find?('.container-fluid', text: 'I just edited this.'),
40 "Description update did not survive page refresh")
43 test 'Create a project and move it into a different project' do
44 visit page_with_token 'active', '/projects'
45 find("#projects-menu").click
46 within('.dropdown-menu') do
47 first('li', text: 'Home').click
50 find('.btn', text: "Add a subproject").click
53 find('.fa-pencil').click
54 find('.editable-input input').set('Project 1234')
55 find('.glyphicon-ok').click
60 find("#projects-menu").click
61 within('.dropdown-menu') do
62 first('li', text: 'Home').click
65 find('.btn', text: "Add a subproject").click
67 find('.fa-pencil').click
68 find('.editable-input input').set('Project 5678')
69 find('.glyphicon-ok').click
73 click_link 'Move project...'
74 find('.selectable', text: 'Project 1234').click
75 find('.modal-footer a,button', text: 'Move').click
78 # Wait for the page to refresh and show the new parent in Sharing panel
80 assert(page.has_link?("Project 1234"),
81 "Project 5678 should now be inside project 1234")
84 def open_groups_sharing(project_name="aproject", token_name="active")
85 project = api_fixture("groups", project_name)
86 visit(page_with_token(token_name, "/projects/#{project['uuid']}"))
88 click_on "Share with groups"
91 def group_name(group_key)
92 api_fixture("groups", group_key, "name")
95 test "projects not publicly sharable when anonymous browsing disabled" do
96 Rails.configuration.Users.AnonymousUserToken = ""
98 # Check for a group we do expect first, to make sure the modal's loaded.
99 assert_selector(".modal-container .selectable",
100 text: group_name("all_users"))
101 assert_no_selector(".modal-container .selectable",
102 text: group_name("anonymous_group"))
105 test "projects publicly sharable when anonymous browsing enabled" do
106 Rails.configuration.Users.AnonymousUserToken = "testonlytoken"
108 assert_selector(".modal-container .selectable",
109 text: group_name("anonymous_group"))
112 test "project owner can manage sharing for another user" do
113 add_user = api_fixture('users')['future_project_user']
114 new_name = ["first_name", "last_name"].map { |k| add_user[k] }.join(" ")
116 show_object_using('active', 'groups', 'aproject', 'A Project')
118 add_share_and_check("users", new_name, add_user)
119 modify_share_and_check(new_name)
122 test "project owner can manage sharing for another group" do
123 new_name = api_fixture('groups')['future_project_viewing_group']['name']
125 show_object_using('active', 'groups', 'aproject', 'A Project')
127 add_share_and_check("groups", new_name)
128 modify_share_and_check(new_name)
131 test "'share with group' listing does not offer projects" do
132 show_object_using('active', 'groups', 'aproject', 'A Project')
134 click_on "Share with groups"
135 good_uuid = api_fixture("groups")["private"]["uuid"]
136 assert(page.has_selector?(".selectable[data-object-uuid=\"#{good_uuid}\"]"),
137 "'share with groups' listing missing owned user group")
138 bad_uuid = api_fixture("groups")["asubproject"]["uuid"]
139 assert(page.has_no_selector?(".selectable[data-object-uuid=\"#{bad_uuid}\"]"),
140 "'share with groups' listing includes project")
144 ['Move',api_fixture('collections')['collection_to_move_around_in_aproject'],
145 api_fixture('groups')['aproject'],api_fixture('groups')['asubproject']],
146 ['Remove',api_fixture('collections')['collection_to_move_around_in_aproject'],
147 api_fixture('groups')['aproject']],
148 ['Copy',api_fixture('collections')['collection_to_move_around_in_aproject'],
149 api_fixture('groups')['aproject'],api_fixture('groups')['asubproject']],
150 ['Remove',api_fixture('collections')['collection_in_aproject_with_same_name_as_in_home_project'],
151 api_fixture('groups')['aproject'],nil,true],
152 ].each do |action, my_collection, src, dest=nil, expect_name_change=nil|
153 test "selection #{action} -> #{expect_name_change.inspect} for project" do
154 perform_selection_action src, dest, my_collection, action
158 assert page.has_text?(my_collection['name']), 'Collection not found in src project after copy'
159 visit page_with_token 'active', '/'
160 find("#projects-menu").click
161 find(".dropdown-menu a", text: dest['name']).click
162 click_link 'Data collections'
163 assert page.has_text?(my_collection['name']), 'Collection not found in dest project after copy'
166 assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after move'
167 visit page_with_token 'active', '/'
168 find("#projects-menu").click
169 find(".dropdown-menu a", text: dest['name']).click
170 click_link 'Data collections'
171 assert page.has_text?(my_collection['name']), 'Collection not found in dest project after move'
174 assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after remove'
179 def perform_selection_action src, dest, item, action
180 visit page_with_token 'active', '/'
181 find("#projects-menu").click
182 find(".dropdown-menu a", text: src['name']).click
183 click_link 'Data collections'
184 assert page.has_text?(item['name']), 'Collection not found in src project'
186 within('tr', text: item['name']) do
187 find('input[type=checkbox]').click
190 click_button 'Selection'
192 within('.selection-action-container') do
193 assert page.has_text?("Compare selected"), "Compare selected link text not found"
194 assert page.has_link?("Copy selected"), "Copy selected link not found"
195 assert page.has_link?("Move selected"), "Move selected link not found"
196 assert page.has_link?("Remove selected"), "Remove selected link not found"
198 click_link "#{action} selected"
201 # select the destination project if a Copy or Move action is being performed
202 if action == 'Copy' || action == 'Move'
203 within(".modal-container") do
204 find('.selectable', text: dest['name']).click
205 find('.modal-footer a,button', text: action).click
211 # Test copy action state. It should not be available when a subproject is selected.
212 test "copy action is disabled when a subproject is selected" do
213 my_project = api_fixture('groups')['aproject']
214 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
215 my_subproject = api_fixture('groups')['asubproject']
217 # verify that selection options are disabled on the project until an item is selected
218 visit page_with_token 'active', '/'
219 find("#projects-menu").click
220 find(".dropdown-menu a", text: my_project['name']).click
222 click_link 'Data collections'
223 click_button 'Selection'
224 within('.selection-action-container') do
225 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
226 assert_selector 'li.disabled', text: 'Compare selected'
227 assert_selector 'li.disabled', text: 'Copy selected'
228 assert_selector 'li.disabled', text: 'Move selected'
229 assert_selector 'li.disabled', text: 'Remove selected'
232 # select collection and verify links are enabled
233 visit page_with_token 'active', '/'
234 find("#projects-menu").click
235 find(".dropdown-menu a", text: my_project['name']).click
236 click_link 'Data collections'
237 assert page.has_text?(my_collection['name']), 'Collection not found in project'
239 within('tr', text: my_collection['name']) do
240 find('input[type=checkbox]').click
243 click_button 'Selection'
244 within('.selection-action-container') do
245 assert_no_selector 'li.disabled', text: 'Create new collection with selected collections'
246 assert_selector 'li', text: 'Create new collection with selected collections'
247 assert_selector 'li.disabled', text: 'Compare selected'
248 assert_no_selector 'li.disabled', text: 'Copy selected'
249 assert_selector 'li', text: 'Copy selected'
250 assert_no_selector 'li.disabled', text: 'Move selected'
251 assert_selector 'li', text: 'Move selected'
252 assert_no_selector 'li.disabled', text: 'Remove selected'
253 assert_selector 'li', text: 'Remove selected'
256 # select subproject and verify that copy action is disabled
257 visit page_with_token 'active', '/'
258 find("#projects-menu").click
259 find(".dropdown-menu a", text: my_project['name']).click
261 click_link 'Subprojects'
262 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
264 within('tr', text: my_subproject['name']) do
265 find('input[type=checkbox]').click
268 click_button 'Selection'
269 within('.selection-action-container') do
270 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
271 assert_selector 'li.disabled', text: 'Compare selected'
272 assert_selector 'li.disabled', text: 'Copy selected'
273 assert_no_selector 'li.disabled', text: 'Move selected'
274 assert_selector 'li', text: 'Move selected'
275 assert_no_selector 'li.disabled', text: 'Remove selected'
276 assert_selector 'li', text: 'Remove selected'
279 # select subproject and a collection and verify that copy action is still disabled
280 visit page_with_token 'active', '/'
281 find("#projects-menu").click
282 find(".dropdown-menu a", text: my_project['name']).click
284 click_link 'Subprojects'
285 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
287 within('tr', text: my_subproject['name']) do
288 find('input[type=checkbox]').click
291 click_link 'Data collections'
292 assert page.has_text?(my_collection['name']), 'Collection not found in project'
294 within('tr', text: my_collection['name']) do
295 find('input[type=checkbox]').click
298 click_link 'Subprojects'
299 click_button 'Selection'
300 within('.selection-action-container') do
301 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
302 assert_selector 'li.disabled', text: 'Compare selected'
303 assert_selector 'li.disabled', text: 'Copy selected'
304 assert_no_selector 'li.disabled', text: 'Move selected'
305 assert_selector 'li', text: 'Move selected'
306 assert_no_selector 'li.disabled', text: 'Remove selected'
307 assert_selector 'li', text: 'Remove selected'
311 # When project tabs are switched, only options applicable to the current tab's selections are enabled.
312 test "verify selection options when tabs are switched" do
313 my_project = api_fixture('groups')['aproject']
314 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
315 my_subproject = api_fixture('groups')['asubproject']
317 # select subproject and a collection and verify that copy action is still disabled
318 visit page_with_token 'active', '/'
319 find("#projects-menu").click
320 find(".dropdown-menu a", text: my_project['name']).click
322 # Select a sub-project
323 click_link 'Subprojects'
324 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
326 within('tr', text: my_subproject['name']) do
327 find('input[type=checkbox]').click
330 # Select a collection
331 click_link 'Data collections'
332 assert page.has_text?(my_collection['name']), 'Collection not found in project'
334 within('tr', text: my_collection['name']) do
335 find('input[type=checkbox]').click
338 # Go back to Subprojects tab
339 click_link 'Subprojects'
340 click_button 'Selection'
341 within('.selection-action-container') do
342 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
343 assert_selector 'li.disabled', text: 'Compare selected'
344 assert_selector 'li.disabled', text: 'Copy selected'
345 assert_no_selector 'li.disabled', text: 'Move selected'
346 assert_selector 'li', text: 'Move selected'
347 assert_no_selector 'li.disabled', text: 'Remove selected'
348 assert_selector 'li', text: 'Remove selected'
351 # Close the dropdown by clicking outside it.
352 find('.dropdown-toggle', text: 'Selection').find(:xpath, '..').click
354 # Go back to Data collections tab
355 find('.nav-tabs a', text: 'Data collections').click
356 click_button 'Selection'
357 within('.selection-action-container') do
358 assert_no_selector 'li.disabled', text: 'Create new collection with selected collections'
359 assert_selector 'li', text: 'Create new collection with selected collections'
360 assert_selector 'li.disabled', text: 'Compare selected'
361 assert_no_selector 'li.disabled', text: 'Copy selected'
362 assert_selector 'li', text: 'Copy selected'
363 assert_no_selector 'li.disabled', text: 'Move selected'
364 assert_selector 'li', text: 'Move selected'
365 assert_no_selector 'li.disabled', text: 'Remove selected'
366 assert_selector 'li', text: 'Remove selected'
370 # "Move selected" and "Remove selected" options should not be
371 # available when current user cannot write to the project
372 test "move selected and remove selected actions not available when current user cannot write to project" do
373 my_project = api_fixture('groups')['anonymously_accessible_project']
374 visit page_with_token 'active', "/projects/#{my_project['uuid']}"
376 click_link 'Data collections'
377 click_button 'Selection'
378 within('.selection-action-container') do
379 assert_selector 'li', text: 'Create new collection with selected collections'
380 assert_selector 'li', text: 'Compare selected'
381 assert_selector 'li', text: 'Copy selected'
382 assert_no_selector 'li', text: 'Move selected'
383 assert_no_selector 'li', text: 'Remove selected'
389 ['project_viewer', false],
390 ].each do |user, expect_collection_in_aproject|
391 test "combine selected collections into new collection #{user} #{expect_collection_in_aproject}" do
392 my_project = api_fixture('groups')['aproject']
393 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
395 visit page_with_token user, "/projects/#{my_project['uuid']}"
396 click_link 'Data collections'
397 assert page.has_text?(my_collection['name']), 'Collection not found in project'
399 within('tr', text: my_collection['name']) do
400 find('input[type=checkbox]').click
403 click_button 'Selection'
404 within('.selection-action-container') do
405 click_link 'Create new collection with selected collections'
408 # now in the new collection page
409 if expect_collection_in_aproject
410 assert page.has_text?("Created new collection in the project #{my_project['name']}"),
411 'Not found flash message that new collection is created in aproject'
413 assert page.has_text?("Created new collection in your Home project"),
414 'Not found flash message that new collection is created in Home project'
419 def scroll_setup(project_name,
423 sort_parameters = nil)
424 project_uuid = api_fixture('groups')[project_name]['uuid']
425 visit page_with_token 'user1_with_load', '/projects/' + project_uuid
427 assert(page.has_text?("#{item_list_parameter.humanize} (#{total_nbr_items})"), "Number of #{item_list_parameter.humanize} did not match the input amount")
429 click_link item_list_parameter.humanize
433 find("th[data-sort-order='#{sort_parameters.gsub(/\s/,'')}']").click
438 def scroll_items_check(nbr_items,
444 for i in 1..nbr_items
445 items << "#{fixture_prefix}#{i}"
448 verify_items = items.dup
449 unexpected_items = []
451 within(".arv-project-#{item_list_parameter}") do
452 page.execute_script "window.scrollBy(0,999000)"
458 # Visit all rows. If not all expected items are found, retry
459 found_items = page.all(item_selector)
460 item_count = found_items.count
463 (0..item_count-1).each do |i|
464 # Found row text using the fixture string e.g. "Show Collection_#{n} "
465 item_name = found_items[i].text.split[1]
466 if !items.include? item_name
467 unexpected_items << item_name
469 verify_items.delete item_name
473 assert_operator( previous.downcase, :<=, item_name.downcase) if previous
478 assert_equal true, unexpected_items.empty?, "Found unexpected #{item_list_parameter.humanize} #{unexpected_items.inspect}"
479 assert_equal nbr_items, item_count, "Found different number of #{item_list_parameter.humanize}"
480 assert_equal true, verify_items.empty?, "Did not find all the #{item_list_parameter.humanize}"
485 ['project_with_10_collections', 10],
486 ['project_with_201_collections', 201], # two pages of data
487 ].each do |project_name, nbr_items|
488 test "scroll collections tab for #{project_name} with #{nbr_items} objects" do
489 item_list_parameter = "Data_collections"
490 scroll_setup project_name,
493 scroll_items_check nbr_items,
496 'tr[data-kind="arvados#collection"]'
501 ['project_with_10_collections', 10],
502 ['project_with_201_collections', 201], # two pages of data
503 ].each do |project_name, nbr_items|
504 test "scroll collections tab for #{project_name} with #{nbr_items} objects with ascending sort (case insensitive)" do
505 item_list_parameter = "Data_collections"
506 scroll_setup project_name,
511 scroll_items_check nbr_items,
514 'tr[data-kind="arvados#collection"]',
520 ['project_with_10_pipelines', 10, 0],
521 ['project_with_2_pipelines_and_60_crs', 2, 60],
522 ['project_with_25_pipelines', 25, 0],
523 ].each do |project_name, num_pipelines, num_crs|
524 test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_crs} container requests" do
525 item_list_parameter = "Pipelines_and_processes"
526 scroll_setup project_name,
527 num_pipelines + num_crs,
529 # check the general scrolling and the pipelines
530 scroll_items_check num_pipelines,
533 'tr[data-kind="arvados#pipelineInstance"]'
534 # Check container request count separately
535 crs_found = page.all('tr[data-kind="arvados#containerRequest"]')
536 found_cr_count = crs_found.count
537 assert_equal num_crs, found_cr_count, 'Did not find expected number of container requests'
541 test "error while loading tab" do
542 original_arvados_v1_base = Rails.configuration.Services.Controller.ExternalURL
544 visit page_with_token 'active', '/projects/' + api_fixture('groups')['aproject']['uuid']
546 # Point to a bad api server url to generate error
547 Rails.configuration.Services.Controller.ExternalURL = "https://[::1]:1/"
548 click_link 'Other objects'
549 within '#Other_objects' do
551 assert_selector('a', text: 'Reload tab')
553 # Now point back to the orig api server and reload tab
554 Rails.configuration.Services.Controller.ExternalURL = original_arvados_v1_base
555 click_link 'Reload tab'
556 assert_no_selector('a', text: 'Reload tab')
557 assert_selector('button', text: 'Selection')
558 within '.selection-action-container' do
559 assert_selector 'tr[data-kind="arvados#trait"]'
564 test "add new project using projects dropdown" do
565 visit page_with_token 'active', '/'
568 find("#projects-menu").click
569 click_link 'Add a new project'
570 assert_text 'New project'
571 assert_text 'No description provided'
574 test "first tab loads data when visiting other tab directly" do
575 # As of 2014-12-19, the first tab of project#show uses infinite scrolling.
576 # Make sure that it loads data even if we visit another tab directly.
577 need_selenium 'to land on specified tab using {url}#Advanced'
578 user = api_fixture("users", "active")
579 visit(page_with_token("active_trustedclient",
580 "/projects/#{user['uuid']}#Advanced"))
581 assert_text("API response")
582 find("#page-wrapper .nav-tabs :first-child a").click
583 assert_text("Collection modified at")
586 # "Select all" and "Unselect all" options
587 test "select all and unselect all actions" do
588 need_selenium 'to check and uncheck checkboxes'
590 visit page_with_token 'active', '/projects/' + api_fixture('groups')['aproject']['uuid']
592 # Go to "Data collections" tab and click on "Select all"
593 click_link 'Data collections'
596 # Initially, all selection options for this tab should be disabled
597 click_button 'Selection'
598 within('.selection-action-container') do
599 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
600 assert_selector 'li.disabled', text: 'Copy selected'
604 click_button 'Select all'
606 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
608 # Now the selection options should be enabled
609 click_button 'Selection'
610 within('.selection-action-container') do
611 assert_selector 'li', text: 'Create new collection with selected collections'
612 assert_no_selector 'li.disabled', text: 'Copy selected'
613 assert_selector 'li', text: 'Create new collection with selected collections'
614 assert_no_selector 'li.disabled', text: 'Copy selected'
617 # Go to Pipelines and processes tab and assert none selected
618 click_link 'Pipelines and processes'
621 # Since this is the first visit to this tab, all selection options should be disabled
622 click_button 'Selection'
623 within('.selection-action-container') do
624 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
625 assert_selector 'li.disabled', text: 'Copy selected'
628 assert_checkboxes_state('input[type=checkbox]', false, '"select all" should check all checkboxes')
631 click_button 'Select all'
632 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
634 # Applicable selection options should be enabled
635 click_button 'Selection'
636 within('.selection-action-container') do
637 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
638 assert_selector 'li', text: 'Copy selected'
639 assert_no_selector 'li.disabled', text: 'Copy selected'
643 click_button 'Unselect all'
644 assert_checkboxes_state('input[type=checkbox]', false, '"select all" should check all checkboxes')
646 # All selection options should be disabled again
647 click_button 'Selection'
648 within('.selection-action-container') do
649 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
650 assert_selector 'li.disabled', text: 'Copy selected'
653 # Go back to Data collections tab and verify all are still selected
654 click_link 'Data collections'
657 # Selection options should be enabled based on the fact that all collections are still selected in this tab
658 click_button 'Selection'
659 within('.selection-action-container') do
660 assert_selector 'li', text: 'Create new collection with selected collections'
661 assert_no_selector 'li.disabled', text: 'Copy selected'
662 assert_selector 'li', text: 'Create new collection with selected collections'
663 assert_no_selector 'li.disabled', text: 'Copy selected'
666 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
669 find('button#unselect-all').click
670 assert_checkboxes_state('input[type=checkbox]', false, '"unselect all" should clear all checkboxes')
672 # Now all selection options should be disabled because none of the collections are checked
673 click_button 'Selection'
674 within('.selection-action-container') do
675 assert_selector 'li.disabled', text: 'Copy selected'
676 assert_selector 'li.disabled', text: 'Copy selected'
679 # Verify checking just one checkbox still works as expected
680 within('tr', text: api_fixture('collections')['collection_to_move_around_in_aproject']['name']) do
681 find('input[type=checkbox]').click
684 click_button 'Selection'
685 within('.selection-action-container') do
686 assert_selector 'li', text: 'Create new collection with selected collections'
687 assert_no_selector 'li.disabled', text: 'Copy selected'
688 assert_selector 'li', text: 'Create new collection with selected collections'
689 assert_no_selector 'li.disabled', text: 'Copy selected'
693 test "test search all projects menu item in projects menu" do
695 visit page_with_token('active')
696 find('#projects-menu').click
697 within('.dropdown-menu') do
698 assert_selector 'a', text: 'Search all projects'
699 find('a', text: 'Search all projects').click
701 within('.modal-content') do
702 assert page.has_text?('All projects'), 'No text - All projects'
703 assert page.has_text?('Search'), 'No text - Search'
704 assert page.has_text?('Cancel'), 'No text - Cancel'
705 fill_in "Search", with: 'Unrestricted public data'
707 assert_selector 'div', text: 'Unrestricted public data'
708 find(:xpath, '//*[@id="choose-scroll"]/div[2]/div').click
711 assert page.has_text?('Unrestricted public data'), 'No text - Unrestricted public data'
712 assert page.has_text?('An anonymously accessible project'), 'No text - An anonymously accessible project'
715 test "test star and unstar project" do
716 visit page_with_token 'active', "/projects/#{api_fixture('groups')['anonymously_accessible_project']['uuid']}"
719 find('.fa-star-o').click
722 find("#projects-menu").click
723 within('.dropdown-menu') do
724 assert_selector 'li', text: 'Unrestricted public data'
727 # remove from favotires
728 find('.fa-star').click
731 find("#projects-menu").click
732 within('.dropdown-menu') do
733 assert_no_selector 'li', text: 'Unrestricted public data'
738 ['Workflow with input specifications', 'this workflow has inputs specified', 'Provide a value for the following'],
739 ].each do |template_name, preview_txt, process_txt|
740 test "run a process using template #{template_name} in a project" do
741 project = api_fixture('groups')['aproject']
742 visit page_with_token 'active', '/projects/' + project['uuid']
744 find('.btn', text: 'Run a process').click
746 # in the chooser, verify preview and click Next button
747 within('.modal-dialog') do
748 find('.selectable', text: template_name).click
749 assert_text preview_txt
750 find('.btn', text: 'Next: choose inputs').click
753 # in the process page now
754 assert_text process_txt
755 assert_text project['name']