diff options
author | Grzegorz Bizon | off until 20th June <grzegorz@gitlab.com> | 2018-06-11 10:02:04 +0300 |
---|---|---|
committer | Grzegorz Bizon | off until 20th June <grzegorz@gitlab.com> | 2018-06-11 10:02:04 +0300 |
commit | 54a6ca6f38764dd1a863d0035af9541b5a52c583 (patch) | |
tree | cf45ea50b24905943a40cf35c89585d78ce9217f | |
parent | 093c76be318dba9ae2d7e65582bf0ad3e88b524e (diff) | |
parent | 710252104e92c9336b29fddb957f0518d43a74b1 (diff) |
Merge branch 'qa-wait-for-job-trace' into 'master'
Update QA deploy key clone test to wait for job traces
Closes gitlab-qa#269
See merge request gitlab-org/gitlab-ce!19557
-rw-r--r-- | qa/qa/page/project/job/show.rb | 5 | ||||
-rw-r--r-- | qa/qa/specs/features/project/deploy_key_clone_spec.rb | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index f1a859fd8ee..228ffd9d381 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -6,6 +6,7 @@ module QA::Page view 'app/views/shared/builds/_build_output.html.haml' do element :build_output, '.js-build-output' + element :loading_animation, '.js-build-refresh' end view 'app/assets/javascripts/vue_shared/components/ci_badge_link.vue' do @@ -20,6 +21,10 @@ module QA::Page find('.ci-status').text == PASSED_STATUS end + def trace_loading? + has_css?('.js-build-refresh') + end + # Reminder: You may wish to wait for a particular job status before checking output def output find('.js-build-output').text diff --git a/qa/qa/specs/features/project/deploy_key_clone_spec.rb b/qa/qa/specs/features/project/deploy_key_clone_spec.rb index 442ac312b4d..46b3e38c1c5 100644 --- a/qa/qa/specs/features/project/deploy_key_clone_spec.rb +++ b/qa/qa/specs/features/project/deploy_key_clone_spec.rb @@ -92,7 +92,9 @@ module QA Page::Project::Pipeline::Show.act { go_to_first_job } Page::Project::Job::Show.perform do |job| - job.wait(reload: false) { job.completed? } + 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.output).to include(sha1sum) |