diff options
author | Dan Davison <ddavison@gitlab.com> | 2019-02-01 21:39:38 +0300 |
---|---|---|
committer | Dan Davison <ddavison@gitlab.com> | 2019-02-01 21:39:38 +0300 |
commit | 3a042391ae89b967ce104acf3dbe8191c572ef25 (patch) | |
tree | 48d3b5411f78eff91959f0397d8003b66af35b8a /qa | |
parent | cd4e202517f56cd90baed3605a66b8ae899fc464 (diff) | |
parent | 86a313bb41178db2e3cc205d2f9f193d6e929911 (diff) |
Merge branch 'auto-devops-better-build-debugging' into 'master'
Wait for auto-devops CI jobs on the job page
See merge request gitlab-org/gitlab-ce!24839
Diffstat (limited to 'qa')
4 files changed, 63 insertions, 13 deletions
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index d688f15914c..49c676c01f2 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -16,11 +16,19 @@ module QA::Page element :status_badge end + view 'app/assets/javascripts/jobs/components/stages_dropdown.vue' do + element :pipeline_path + end + def completed? COMPLETED_STATUSES.include?(status_badge) end - def passed? + def successful?(timeout: 60) + wait(reload: false, max: timeout) do + completed? && !trace_loading? + end + status_badge == PASSED_STATUS end diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index b22396fd67a..f192f1fc64b 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -11,7 +11,7 @@ module QA::Page view 'app/assets/javascripts/pipelines/components/graph/job_item.vue' do element :job_component, /class.*ci-job-component.*/ # rubocop:disable QA/ElementWithPattern - element :job_link, /class.*js-pipeline-graph-job-link.*/ # rubocop:disable QA/ElementWithPattern + element :job_link end view 'app/assets/javascripts/vue_shared/components/ci_icon.vue' do @@ -32,6 +32,10 @@ module QA::Page end end + def go_to_job(job_name) + find_element(:job_link, job_name).click + end + def go_to_first_job css = '.js-pipeline-graph-job-link' diff --git a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb index e2320c92343..11a9653db81 100644 --- a/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +++ b/qa/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb @@ -95,11 +95,7 @@ module QA Page::Project::Pipeline::Show.act { go_to_first_job } Page::Project::Job::Show.perform do |job| - job.wait(reload: false) do - job.completed? && !job.trace_loading? - end - - expect(job.passed?).to be_truthy, "Job status did not become \"passed\"." + expect(job).to be_successful, "Job status did not become \"passed\"." expect(job.output).to include(sha1sum) end end diff --git a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb index 553550eef8b..b0ff83db86b 100644 --- a/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +++ b/qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb @@ -75,9 +75,30 @@ module QA Page::Project::Pipeline::Index.act { go_to_latest_pipeline } Page::Project::Pipeline::Show.perform do |pipeline| - expect(pipeline).to have_build('build', status: :success, wait: 600) - expect(pipeline).to have_build('test', status: :success, wait: 600) - expect(pipeline).to have_build('production', status: :success, wait: 1200) + pipeline.go_to_job('build') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 600), "Job did not pass" + + job.click_element(:pipeline_path) + end + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.go_to_job('test') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 600), "Job did not pass" + + job.click_element(:pipeline_path) + end + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.go_to_job('production') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 1200), "Job did not pass" + + job.click_element(:pipeline_path) end Page::Project::Menu.act { click_operations_environments } @@ -115,9 +136,30 @@ module QA Page::Project::Pipeline::Index.act { go_to_latest_pipeline } Page::Project::Pipeline::Show.perform do |pipeline| - expect(pipeline).to have_build('build', status: :success, wait: 600) - expect(pipeline).to have_build('test', status: :success, wait: 600) - expect(pipeline).to have_build('production', status: :success, wait: 1200) + pipeline.go_to_job('build') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 600), "Job did not pass" + + job.click_element(:pipeline_path) + end + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.go_to_job('test') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 600), "Job did not pass" + + job.click_element(:pipeline_path) + end + + Page::Project::Pipeline::Show.perform do |pipeline| + pipeline.go_to_job('production') + end + Page::Project::Job::Show.perform do |job| + expect(job).to be_sucessful(timeout: 1200), "Job did not pass" + + job.click_element(:pipeline_path) end Page::Project::Menu.act { click_operations_environments } |