- 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']
+ [
+ ['active', true],
+ ['project_viewer', false],
+ ].each do |user, expect_collection_in_aproject|
+ test "combine selected collections into new collection #{user} #{expect_collection_in_aproject}" do
+ my_project = api_fixture('groups')['aproject']
+ my_collection = api_fixture('collections')['collection_to_move_around_in_aproject']
+
+ visit page_with_token user, '/'
+ find("#projects-menu").click
+ find(".dropdown-menu a", 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