[
['project with 10 pipelines', 10, 0],
- ['project with 2 pipelines and 200 jobs', 2, 200],
+# ['project with 200 jobs and 10 pipelines', 2, 200],
['project with 25 pipelines', 25, 0],
].each do |project_name, num_pipelines, num_jobs|
test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_jobs} jobs" do
find(".dropdown-menu a", text: project_name).click
my_pipelines = []
- (1..num_pipelines).each do |i|
+ (0..num_pipelines-1).each do |i|
name = "pipeline_#{i}"
my_pipelines << name
end
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