- # Visit all rows. Repeat if not all expected my_pipelines are found (inifinite scrolling should kick in)
- pipelines_found = page.all('tr[data-kind="arvados#pipelineInstance"]')
- pipeline_count = pipelines_found.count
- (0..pipeline_count-1).each do |i|
- name = pipelines_found[i].text.split[1]
- if !my_pipelines.include? name
- unexpected_items << name
- else
- verify_pipelines.delete name
- end
-
- assert_equal true, unexpected_items.empty?, "Found unexpected items #{unexpected_items.inspect}"
- end
- assert_equal num_pipelines, pipeline_count, "Found different number of pipelines"
- assert_equal true, verify_pipelines.empty?, "Did not find all the pipelines"
+ [
+ ['project_with_10_pipelines', 10, 0],
+ ['project_with_2_pipelines_and_60_jobs', 2, 60],
+ ['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
+ item_list_parameter = "Jobs_and_pipelines"
+ scroll_setup project_name,
+ num_pipelines + num_jobs,
+ item_list_parameter
+ # check the general scrolling and the pipelines
+ scroll_items_check num_pipelines,
+ "pipeline_",
+ item_list_parameter,
+ 'tr[data-kind="arvados#pipelineInstance"]'
+ # Check job count separately
+ jobs_found = page.all('tr[data-kind="arvados#job"]')
+ found_job_count = jobs_found.count
+ assert_equal num_jobs, found_job_count, 'Did not find expected number of jobs'
+ end
+ end