1 require 'integration_helper'
2 require 'helpers/share_object_helper'
3 require_relative 'integration_test_utils'
5 class ProjectsTest < ActionDispatch::IntegrationTest
6 include ShareObjectHelper
12 test 'Check collection count for A Project in the tab pane titles' do
13 project_uuid = api_fixture('groups')['aproject']['uuid']
14 visit page_with_token 'active', '/projects/' + project_uuid
15 click_link 'Data collections'
17 collection_count = page.all("[data-pk*='collection']").count
18 assert_selector '#Data_collections-tab span', text: "(#{collection_count})"
21 test 'Find a project and edit its description' do
22 visit page_with_token 'active', '/'
23 find("#projects-menu").click
24 find(".dropdown-menu a", text: "A Project").click
25 within('.container-fluid', text: api_fixture('groups')['aproject']['name']) do
26 find('span', text: api_fixture('groups')['aproject']['name']).click
27 within('.arv-description-as-subtitle') do
28 find('.fa-pencil').click
29 find('.editable-input textarea').set('I just edited this.')
30 find('.editable-submit').click
35 assert(find?('.container-fluid', text: 'I just edited this.'),
36 "Description update did not survive page refresh")
39 test 'Add a new name, then edit it, without creating a duplicate' do
40 project_uuid = api_fixture('groups')['aproject']['uuid']
41 specimen_uuid = api_fixture('traits')['owned_by_aproject_with_no_name']['uuid']
42 visit page_with_token 'active', '/projects/' + project_uuid
43 click_link 'Other objects'
44 within '.selection-action-container' do
45 # Wait for the tab to load:
46 assert_selector 'tr[data-kind="arvados#trait"]'
47 within first('tr', text: 'Trait') do
48 find(".fa-pencil").click
49 find('.editable-input input').set('Now I have a name.')
50 find('.glyphicon-ok').click
51 assert_selector '.editable', text: 'Now I have a name.'
52 find(".fa-pencil").click
53 find('.editable-input input').set('Now I have a new name.')
54 find('.glyphicon-ok').click
57 assert_selector '.editable', text: 'Now I have a new name.'
60 click_link 'Other objects'
61 within '.selection-action-container' do
62 find '.editable', text: 'Now I have a new name.'
63 assert_no_selector '.editable', text: 'Now I have a name.'
67 test 'Create a project and move it into a different project' do
68 visit page_with_token 'active', '/projects'
69 find("#projects-menu").click
70 find(".dropdown-menu a", text: "Home").click
71 find('.btn', text: "Add a subproject").click
74 find('.fa-pencil').click
75 find('.editable-input input').set('Project 1234')
76 find('.glyphicon-ok').click
81 find("#projects-menu").click
82 find(".dropdown-menu a", text: "Home").click
83 find('.btn', text: "Add a subproject").click
85 find('.fa-pencil').click
86 find('.editable-input input').set('Project 5678')
87 find('.glyphicon-ok').click
91 click_link 'Move project...'
92 find('.selectable', text: 'Project 1234').click
93 find('.modal-footer a,button', text: 'Move').click
96 # Wait for the page to refresh and show the new parent in Sharing panel
98 assert(page.has_link?("Project 1234"),
99 "Project 5678 should now be inside project 1234")
102 def open_groups_sharing(project_name="aproject", token_name="active")
103 project = api_fixture("groups", project_name)
104 visit(page_with_token(token_name, "/projects/#{project['uuid']}"))
106 click_on "Share with groups"
109 def group_name(group_key)
110 api_fixture("groups", group_key, "name")
113 test "projects not publicly sharable when anonymous browsing disabled" do
114 Rails.configuration.anonymous_user_token = false
116 # Check for a group we do expect first, to make sure the modal's loaded.
117 assert_selector(".modal-container .selectable",
118 text: group_name("all_users"))
119 assert_no_selector(".modal-container .selectable",
120 text: group_name("anonymous_group"))
123 test "projects publicly sharable when anonymous browsing enabled" do
124 Rails.configuration.anonymous_user_token = "testonlytoken"
126 assert_selector(".modal-container .selectable",
127 text: group_name("anonymous_group"))
130 test "project viewer can't see project sharing tab" do
131 show_object_using('project_viewer', 'groups', 'aproject', 'A Project')
132 assert(page.has_no_link?("Sharing"),
133 "read-only project user sees sharing tab")
136 test "project owner can manage sharing for another user" do
137 add_user = api_fixture('users')['future_project_user']
138 new_name = ["first_name", "last_name"].map { |k| add_user[k] }.join(" ")
140 show_object_using('active', 'groups', 'aproject', 'A Project')
142 add_share_and_check("users", new_name, add_user)
143 modify_share_and_check(new_name)
146 test "project owner can manage sharing for another group" do
147 new_name = api_fixture('groups')['future_project_viewing_group']['name']
149 show_object_using('active', 'groups', 'aproject', 'A Project')
151 add_share_and_check("groups", new_name)
152 modify_share_and_check(new_name)
155 test "'share with group' listing does not offer projects" do
156 show_object_using('active', 'groups', 'aproject', 'A Project')
158 click_on "Share with groups"
159 good_uuid = api_fixture("groups")["private"]["uuid"]
160 assert(page.has_selector?(".selectable[data-object-uuid=\"#{good_uuid}\"]"),
161 "'share with groups' listing missing owned user group")
162 bad_uuid = api_fixture("groups")["asubproject"]["uuid"]
163 assert(page.has_no_selector?(".selectable[data-object-uuid=\"#{bad_uuid}\"]"),
164 "'share with groups' listing includes project")
168 ['Move',api_fixture('collections')['collection_to_move_around_in_aproject'],
169 api_fixture('groups')['aproject'],api_fixture('groups')['asubproject']],
170 ['Remove',api_fixture('collections')['collection_to_move_around_in_aproject'],
171 api_fixture('groups')['aproject']],
172 ['Copy',api_fixture('collections')['collection_to_move_around_in_aproject'],
173 api_fixture('groups')['aproject'],api_fixture('groups')['asubproject']],
174 ['Remove',api_fixture('collections')['collection_in_aproject_with_same_name_as_in_home_project'],
175 api_fixture('groups')['aproject'],nil,true],
176 ].each do |action, my_collection, src, dest=nil, expect_name_change=nil|
177 test "selection #{action} -> #{expect_name_change.inspect} for project" do
178 perform_selection_action src, dest, my_collection, action
182 assert page.has_text?(my_collection['name']), 'Collection not found in src project after copy'
183 visit page_with_token 'active', '/'
184 find("#projects-menu").click
185 find(".dropdown-menu a", text: dest['name']).click
186 click_link 'Data collections'
187 assert page.has_text?(my_collection['name']), 'Collection not found in dest project after copy'
190 assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after move'
191 visit page_with_token 'active', '/'
192 find("#projects-menu").click
193 find(".dropdown-menu a", text: dest['name']).click
194 click_link 'Data collections'
195 assert page.has_text?(my_collection['name']), 'Collection not found in dest project after move'
198 assert page.has_no_text?(my_collection['name']), 'Collection still found in src project after remove'
203 def perform_selection_action src, dest, item, action
204 visit page_with_token 'active', '/'
205 find("#projects-menu").click
206 find(".dropdown-menu a", text: src['name']).click
207 click_link 'Data collections'
208 assert page.has_text?(item['name']), 'Collection not found in src project'
210 within('tr', text: item['name']) do
211 find('input[type=checkbox]').click
214 click_button 'Selection'
216 within('.selection-action-container') do
217 assert page.has_text?("Compare selected"), "Compare selected link text not found"
218 assert page.has_link?("Copy selected"), "Copy selected link not found"
219 assert page.has_link?("Move selected"), "Move selected link not found"
220 assert page.has_link?("Remove selected"), "Remove selected link not found"
222 click_link "#{action} selected"
225 # select the destination project if a Copy or Move action is being performed
226 if action == 'Copy' || action == 'Move'
227 within(".modal-container") do
228 find('.selectable', text: dest['name']).click
229 find('.modal-footer a,button', text: action).click
235 # Test copy action state. It should not be available when a subproject is selected.
236 test "copy action is disabled when a subproject is selected" do
237 my_project = api_fixture('groups')['aproject']
238 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
239 my_subproject = api_fixture('groups')['asubproject']
241 # verify that selection options are disabled on the project until an item is selected
242 visit page_with_token 'active', '/'
243 find("#projects-menu").click
244 find(".dropdown-menu a", text: my_project['name']).click
246 click_link 'Data collections'
247 click_button 'Selection'
248 within('.selection-action-container') do
249 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
250 assert_selector 'li.disabled', text: 'Compare selected'
251 assert_selector 'li.disabled', text: 'Copy selected'
252 assert_selector 'li.disabled', text: 'Move selected'
253 assert_selector 'li.disabled', text: 'Remove selected'
256 # select collection and verify links are enabled
257 visit page_with_token 'active', '/'
258 find("#projects-menu").click
259 find(".dropdown-menu a", text: my_project['name']).click
260 click_link 'Data collections'
261 assert page.has_text?(my_collection['name']), 'Collection not found in project'
263 within('tr', text: my_collection['name']) do
264 find('input[type=checkbox]').click
267 click_button 'Selection'
268 within('.selection-action-container') do
269 assert_no_selector 'li.disabled', text: 'Create new collection with selected collections'
270 assert_selector 'li', text: 'Create new collection with selected collections'
271 assert_selector 'li.disabled', text: 'Compare selected'
272 assert_no_selector 'li.disabled', text: 'Copy selected'
273 assert_selector 'li', text: 'Copy selected'
274 assert_no_selector 'li.disabled', text: 'Move selected'
275 assert_selector 'li', text: 'Move selected'
276 assert_no_selector 'li.disabled', text: 'Remove selected'
277 assert_selector 'li', text: 'Remove selected'
280 # select subproject and verify that copy action is disabled
281 visit page_with_token 'active', '/'
282 find("#projects-menu").click
283 find(".dropdown-menu a", text: my_project['name']).click
285 click_link 'Subprojects'
286 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
288 within('tr', text: my_subproject['name']) do
289 find('input[type=checkbox]').click
292 click_button 'Selection'
293 within('.selection-action-container') do
294 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
295 assert_selector 'li.disabled', text: 'Compare selected'
296 assert_selector 'li.disabled', text: 'Copy selected'
297 assert_no_selector 'li.disabled', text: 'Move selected'
298 assert_selector 'li', text: 'Move selected'
299 assert_no_selector 'li.disabled', text: 'Remove selected'
300 assert_selector 'li', text: 'Remove selected'
303 # select subproject and a collection and verify that copy action is still disabled
304 visit page_with_token 'active', '/'
305 find("#projects-menu").click
306 find(".dropdown-menu a", text: my_project['name']).click
308 click_link 'Subprojects'
309 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
311 within('tr', text: my_subproject['name']) do
312 find('input[type=checkbox]').click
315 click_link 'Data collections'
316 assert page.has_text?(my_collection['name']), 'Collection not found in project'
318 within('tr', text: my_collection['name']) do
319 find('input[type=checkbox]').click
322 click_link 'Subprojects'
323 click_button 'Selection'
324 within('.selection-action-container') do
325 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
326 assert_selector 'li.disabled', text: 'Compare selected'
327 assert_selector 'li.disabled', text: 'Copy selected'
328 assert_no_selector 'li.disabled', text: 'Move selected'
329 assert_selector 'li', text: 'Move selected'
330 assert_no_selector 'li.disabled', text: 'Remove selected'
331 assert_selector 'li', text: 'Remove selected'
335 # When project tabs are switched, only options applicable to the current tab's selections are enabled.
336 test "verify selection options when tabs are switched" do
337 my_project = api_fixture('groups')['aproject']
338 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
339 my_subproject = api_fixture('groups')['asubproject']
341 # select subproject and a collection and verify that copy action is still disabled
342 visit page_with_token 'active', '/'
343 find("#projects-menu").click
344 find(".dropdown-menu a", text: my_project['name']).click
346 # Select a sub-project
347 click_link 'Subprojects'
348 assert page.has_text?(my_subproject['name']), 'Subproject not found in project'
350 within('tr', text: my_subproject['name']) do
351 find('input[type=checkbox]').click
354 # Select a collection
355 click_link 'Data collections'
356 assert page.has_text?(my_collection['name']), 'Collection not found in project'
358 within('tr', text: my_collection['name']) do
359 find('input[type=checkbox]').click
362 # Go back to Subprojects tab
363 click_link 'Subprojects'
364 click_button 'Selection'
365 within('.selection-action-container') do
366 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
367 assert_selector 'li.disabled', text: 'Compare selected'
368 assert_selector 'li.disabled', text: 'Copy selected'
369 assert_no_selector 'li.disabled', text: 'Move selected'
370 assert_selector 'li', text: 'Move selected'
371 assert_no_selector 'li.disabled', text: 'Remove selected'
372 assert_selector 'li', text: 'Remove selected'
375 # Close the dropdown by clicking outside it.
376 find('.dropdown-toggle', text: 'Selection').find(:xpath, '..').click
378 # Go back to Data collections tab
379 find('.nav-tabs a', text: 'Data collections').click
380 click_button 'Selection'
381 within('.selection-action-container') do
382 assert_no_selector 'li.disabled', text: 'Create new collection with selected collections'
383 assert_selector 'li', text: 'Create new collection with selected collections'
384 assert_selector 'li.disabled', text: 'Compare selected'
385 assert_no_selector 'li.disabled', text: 'Copy selected'
386 assert_selector 'li', text: 'Copy selected'
387 assert_no_selector 'li.disabled', text: 'Move selected'
388 assert_selector 'li', text: 'Move selected'
389 assert_no_selector 'li.disabled', text: 'Remove selected'
390 assert_selector 'li', text: 'Remove selected'
394 # "Move selected" and "Remove selected" options should not be
395 # available when current user cannot write to the project
396 test "move selected and remove selected actions not available when current user cannot write to project" do
397 my_project = api_fixture('groups')['anonymously_accessible_project']
398 visit page_with_token 'active', "/projects/#{my_project['uuid']}"
400 click_link 'Data collections'
401 click_button 'Selection'
402 within('.selection-action-container') do
403 assert_selector 'li', text: 'Create new collection with selected collections'
404 assert_selector 'li', text: 'Compare selected'
405 assert_selector 'li', text: 'Copy selected'
406 assert_no_selector 'li', text: 'Move selected'
407 assert_no_selector 'li', text: 'Remove selected'
413 ['project_viewer', false],
414 ].each do |user, expect_collection_in_aproject|
415 test "combine selected collections into new collection #{user} #{expect_collection_in_aproject}" do
416 my_project = api_fixture('groups')['aproject']
417 my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
419 visit page_with_token user, '/'
420 find("#projects-menu").click
421 find(".dropdown-menu a", text: my_project['name']).click
422 click_link 'Data collections'
423 assert page.has_text?(my_collection['name']), 'Collection not found in project'
425 within('tr', text: my_collection['name']) do
426 find('input[type=checkbox]').click
429 click_button 'Selection'
430 within('.selection-action-container') do
431 click_link 'Create new collection with selected collections'
434 # now in the new collection page
435 if expect_collection_in_aproject
436 assert page.has_text?("Created new collection in the project #{my_project['name']}"),
437 'Not found flash message that new collection is created in aproject'
439 assert page.has_text?("Created new collection in your Home project"),
440 'Not found flash message that new collection is created in Home project'
447 ["pipelines", "/pipeline_instances"],
448 ["collections", "/collections"]
449 ].each do |target,path|
450 test "Test dashboard button all #{target}" do
451 visit page_with_token 'active', '/'
452 click_link "All #{target}"
453 assert_equal path, current_path
457 def scroll_setup(project_name,
461 sort_parameters = nil)
462 project_uuid = api_fixture('groups')[project_name]['uuid']
463 visit page_with_token 'user1_with_load', '/projects/' + project_uuid
465 assert(page.has_text?("#{item_list_parameter.humanize} (#{total_nbr_items})"), "Number of #{item_list_parameter.humanize} did not match the input amount")
467 click_link item_list_parameter.humanize
471 find("th[data-sort-order='#{sort_parameters.gsub(/\s/,'')}']").click
476 def scroll_items_check(nbr_items,
482 for i in 1..nbr_items
483 items << "#{fixture_prefix}#{i}"
486 verify_items = items.dup
487 unexpected_items = []
489 within(".arv-project-#{item_list_parameter}") do
490 page.execute_script "window.scrollBy(0,999000)"
496 # Visit all rows. If not all expected items are found, retry
497 found_items = page.all(item_selector)
498 item_count = found_items.count
501 (0..item_count-1).each do |i|
502 # Found row text using the fixture string e.g. "Show Collection_#{n} "
503 item_name = found_items[i].text.split[1]
504 if !items.include? item_name
505 unexpected_items << item_name
507 verify_items.delete item_name
511 assert_operator( previous.downcase, :<=, item_name.downcase) if previous
516 assert_equal true, unexpected_items.empty?, "Found unexpected #{item_list_parameter.humanize} #{unexpected_items.inspect}"
517 assert_equal nbr_items, item_count, "Found different number of #{item_list_parameter.humanize}"
518 assert_equal true, verify_items.empty?, "Did not find all the #{item_list_parameter.humanize}"
523 ['project_with_10_collections', 10],
524 ['project_with_201_collections', 201], # two pages of data
525 ].each do |project_name, nbr_items|
526 test "scroll collections tab for #{project_name} with #{nbr_items} objects" do
527 item_list_parameter = "Data_collections"
528 scroll_setup project_name,
531 scroll_items_check nbr_items,
534 'tr[data-kind="arvados#collection"]'
539 ['project_with_10_collections', 10],
540 ['project_with_201_collections', 201], # two pages of data
541 ].each do |project_name, nbr_items|
542 test "scroll collections tab for #{project_name} with #{nbr_items} objects with ascending sort (case insensitive)" do
543 item_list_parameter = "Data_collections"
544 scroll_setup project_name,
549 scroll_items_check nbr_items,
552 'tr[data-kind="arvados#collection"]',
558 ['project_with_10_pipelines', 10, 0],
559 ['project_with_2_pipelines_and_60_jobs', 2, 60],
560 ['project_with_25_pipelines', 25, 0],
561 ].each do |project_name, num_pipelines, num_jobs|
562 test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_jobs} jobs" do
563 item_list_parameter = "Jobs_and_pipelines"
564 scroll_setup project_name,
565 num_pipelines + num_jobs,
567 # check the general scrolling and the pipelines
568 scroll_items_check num_pipelines,
571 'tr[data-kind="arvados#pipelineInstance"]'
572 # Check job count separately
573 jobs_found = page.all('tr[data-kind="arvados#job"]')
574 found_job_count = jobs_found.count
575 assert_equal num_jobs, found_job_count, 'Did not find expected number of jobs'
579 # Move button accessibility
582 ['active', true], # project owner
583 ['project_viewer', false],
584 ].each do |user, can_move|
585 test "#{user} can move subproject under another user's Home #{can_move}" do
586 project = api_fixture('groups')['aproject']
587 collection = api_fixture('collections')['collection_to_move_around_in_aproject']
589 # verify the project move button
590 visit page_with_token user, "/projects/#{project['uuid']}"
592 assert page.has_link? 'Move project...'
594 assert page.has_no_link? 'Move project...'
599 test "error while loading tab" do
600 original_arvados_v1_base = Rails.configuration.arvados_v1_base
602 visit page_with_token 'active', '/projects/' + api_fixture('groups')['aproject']['uuid']
604 # Point to a bad api server url to generate error
605 Rails.configuration.arvados_v1_base = "https://[::1]:1/"
606 click_link 'Other objects'
607 within '#Other_objects' do
609 assert_selector('a', text: 'Reload tab')
611 # Now point back to the orig api server and reload tab
612 Rails.configuration.arvados_v1_base = original_arvados_v1_base
613 click_link 'Reload tab'
614 assert_no_selector('a', text: 'Reload tab')
615 assert_selector('button', text: 'Selection')
616 within '.selection-action-container' do
617 assert_selector 'tr[data-kind="arvados#trait"]'
622 test "add new project using projects dropdown" do
623 # verify that selection options are disabled on the project until an item is selected
624 visit page_with_token 'active', '/'
627 find("#projects-menu").click
628 click_link 'Add a new project'
629 assert_text 'New project'
630 assert_text 'No description provided'
632 # Add one more new project
633 find("#projects-menu").click
634 click_link 'Add a new project'
635 match = /New project \(\d\)/.match page.text
636 assert match, 'Expected project name not found'
637 assert_text 'No description provided'
640 test "first tab loads data when visiting other tab directly" do
641 # As of 2014-12-19, the first tab of project#show uses infinite scrolling.
642 # Make sure that it loads data even if we visit another tab directly.
643 need_selenium 'to land on specified tab using {url}#Advanced'
644 user = api_fixture("users", "active")
645 visit(page_with_token("active_trustedclient",
646 "/projects/#{user['uuid']}#Advanced"))
647 assert_text("API response")
648 find("#page-wrapper .nav-tabs :first-child a").click
649 assert_text("Collection modified at")
652 # "Select all" and "Unselect all" options
653 test "select all and unselect all actions" do
654 need_selenium 'to check and uncheck checkboxes'
656 visit page_with_token 'active', '/projects/' + api_fixture('groups')['aproject']['uuid']
658 # Go to "Data collections" tab and click on "Select all"
659 click_link 'Data collections'
662 # Initially, all selection options for this tab should be disabled
663 click_button 'Selection'
664 within('.selection-action-container') do
665 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
666 assert_selector 'li.disabled', text: 'Copy selected'
670 click_button 'Select all'
672 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
674 # Now the selection options should be enabled
675 click_button 'Selection'
676 within('.selection-action-container') do
677 assert_selector 'li', text: 'Create new collection with selected collections'
678 assert_no_selector 'li.disabled', text: 'Copy selected'
679 assert_selector 'li', text: 'Create new collection with selected collections'
680 assert_no_selector 'li.disabled', text: 'Copy selected'
683 # Go to Jobs and pipelines tab and assert none selected
684 click_link 'Jobs and pipelines'
687 # Since this is the first visit to this tab, all selection options should be disabled
688 click_button 'Selection'
689 within('.selection-action-container') do
690 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
691 assert_selector 'li.disabled', text: 'Copy selected'
694 assert_checkboxes_state('input[type=checkbox]', false, '"select all" should check all checkboxes')
697 click_button 'Select all'
698 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
700 # Applicable selection options should be enabled
701 click_button 'Selection'
702 within('.selection-action-container') do
703 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
704 assert_selector 'li', text: 'Copy selected'
705 assert_no_selector 'li.disabled', text: 'Copy selected'
709 click_button 'Unselect all'
710 assert_checkboxes_state('input[type=checkbox]', false, '"select all" should check all checkboxes')
712 # All selection options should be disabled again
713 click_button 'Selection'
714 within('.selection-action-container') do
715 assert_selector 'li.disabled', text: 'Create new collection with selected collections'
716 assert_selector 'li.disabled', text: 'Copy selected'
719 # Go back to Data collections tab and verify all are still selected
720 click_link 'Data collections'
723 # Selection options should be enabled based on the fact that all collections are still selected in this tab
724 click_button 'Selection'
725 within('.selection-action-container') do
726 assert_selector 'li', text: 'Create new collection with selected collections'
727 assert_no_selector 'li.disabled', text: 'Copy selected'
728 assert_selector 'li', text: 'Create new collection with selected collections'
729 assert_no_selector 'li.disabled', text: 'Copy selected'
732 assert_checkboxes_state('input[type=checkbox]', true, '"select all" should check all checkboxes')
735 find('button#unselect-all').click
736 assert_checkboxes_state('input[type=checkbox]', false, '"unselect all" should clear all checkboxes')
738 # Now all selection options should be disabled because none of the collections are checked
739 click_button 'Selection'
740 within('.selection-action-container') do
741 assert_selector 'li.disabled', text: 'Copy selected'
742 assert_selector 'li.disabled', text: 'Copy selected'
745 # Verify checking just one checkbox still works as expected
746 within('tr', text: api_fixture('collections')['collection_to_move_around_in_aproject']['name']) do
747 find('input[type=checkbox]').click
750 click_button 'Selection'
751 within('.selection-action-container') do
752 assert_selector 'li', text: 'Create new collection with selected collections'
753 assert_no_selector 'li.disabled', text: 'Copy selected'
754 assert_selector 'li', text: 'Create new collection with selected collections'
755 assert_no_selector 'li.disabled', text: 'Copy selected'