diff options
author | Michael Kozono <mkozono@gmail.com> | 2018-05-08 11:56:35 -0700 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2018-05-08 11:56:43 -0700 |
commit | 39bddd386c65d1c594ed231bff75c0b79fd6cd3f (patch) | |
tree | 582683e330b57241f33fdad86c5bc88dca0fecf4 /qa/qa/specs/features/project | |
parent | 09747ecd3317fc2e1be54f4c944b718f5edf4ae9 (diff) | |
download | gitlab-ce-39bddd386c65d1c594ed231bff75c0b79fd6cd3f.tar.gz |
Succeed or fail fast based on job status first
Also, move wait block into the correct page block.
Diffstat (limited to 'qa/qa/specs/features/project')
-rw-r--r-- | qa/qa/specs/features/project/deploy_key_clone_spec.rb | 12 |
1 files changed, 4 insertions, 8 deletions
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 98ea86bf75e..bf8fa230244 100644 --- a/qa/qa/specs/features/project/deploy_key_clone_spec.rb +++ b/qa/qa/specs/features/project/deploy_key_clone_spec.rb @@ -87,16 +87,12 @@ module QA Page::Project::Show.act { wait_for_push } Page::Menu::Side.act { click_ci_cd_pipelines } Page::Project::Pipeline::Index.act { go_to_latest_pipeline } - - Page::Project::Pipeline::Show.act do - go_to_first_job - - wait do - !has_content?('running') - end - end + Page::Project::Pipeline::Show.act { go_to_first_job } Page::Project::Job::Show.perform do |job| + job.wait(reload: false) { job.completed? } + + expect(job.passed?).to be_truthy, "Job status did not become \"passed\"." expect(job.output).to include(sha1sum) end end |