X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0fdafcb846ec6bb34e4b8ae91ad62c1ccd328355..ff9f9c7e1a664a36bcffd54c7269c08d5bf1d436:/apps/workbench/test/integration/projects_test.rb diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb index 100f3bbf2b..3b7f7a43be 100644 --- a/apps/workbench/test/integration/projects_test.rb +++ b/apps/workbench/test/integration/projects_test.rb @@ -339,6 +339,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest click_button 'Selection...' within('.selection-action-container') do + page.assert_selector 'li.disabled', text: 'Create new collection with selected collections' page.assert_selector 'li.disabled', text: 'Compare selected' page.assert_selector 'li.disabled', text: 'Copy selected' page.assert_selector 'li.disabled', text: 'Move selected' @@ -356,6 +357,8 @@ class ProjectsTest < ActionDispatch::IntegrationTest click_button 'Selection...' within('.selection-action-container') do + page.assert_no_selector 'li.disabled', text: 'Create new collection with selected collections' + page.assert_selector 'li', text: 'Create new collection with selected collections' page.assert_selector 'li.disabled', text: 'Compare selected' page.assert_no_selector 'li.disabled', text: 'Copy selected' page.assert_selector 'li', text: 'Copy selected' @@ -378,6 +381,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest click_button 'Selection...' within('.selection-action-container') do + page.assert_selector 'li.disabled', text: 'Create new collection with selected collections' page.assert_selector 'li.disabled', text: 'Compare selected' page.assert_selector 'li.disabled', text: 'Copy selected' page.assert_no_selector 'li.disabled', text: 'Move selected' @@ -406,6 +410,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest click_button 'Selection...' within('.selection-action-container') do + page.assert_selector 'li.disabled', text: 'Create new collection with selected collections' page.assert_selector 'li.disabled', text: 'Compare selected' page.assert_selector 'li.disabled', text: 'Copy selected' page.assert_no_selector 'li.disabled', text: 'Move selected' @@ -415,4 +420,26 @@ class ProjectsTest < ActionDispatch::IntegrationTest end end + test "combine selected collections into new collection" do + my_project = api_fixture('groups')['aproject'] + my_collection = api_fixture('collections')['collection_to_move_around_in_aproject'] + + visit page_with_token 'active', '/' + find('.arv-project-list a,button', text: my_project['name']).click + assert page.has_text?(my_collection['name']), 'Collection not found in project' + + within('tr', text: my_collection['name']) do + find('input[type=checkbox]').click + end + + click_button 'Selection...' + within('.selection-action-container') do + click_link 'Create new collection with selected collections' + end + + # back in project page + assert page.has_text?(my_collection['name']), 'Collection not found in project' + assert page.has_link?('Jobs and pipelines'), 'Jobs and pipelines link not found in project' + end + end