refs #4227
[arvados.git] / apps / workbench / test / integration / projects_test.rb
index 7f10e45a762f58d270a079f339e793a1517b52cc..66b62c3daead2bb27664498090e8a8d7c998ac91 100644 (file)
@@ -610,4 +610,24 @@ class ProjectsTest < ActionDispatch::IntegrationTest
     end
   end
 
+  # Move button accessibility
+  [
+    ['admin', true],
+    ['active', true],  # project owner
+    ['project_viewer', false],
+    ].each do |user, can_move|
+    test "#{user} can move subproject under another user's Home #{can_move}" do
+      project = api_fixture('groups')['aproject']
+      collection = api_fixture('collections')['collection_to_move_around_in_aproject']
+
+      # verify the project move button
+      visit page_with_token user, "/projects/#{project['uuid']}"
+      if can_move
+        assert page.has_link? 'Move project...'
+      else
+        assert page.has_no_link? 'Move project...'
+      end
+    end
+  end
+
 end