diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /qa/qa/page/project/job/show.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'qa/qa/page/project/job/show.rb')
-rw-r--r-- | qa/qa/page/project/job/show.rb | 72 |
1 files changed, 38 insertions, 34 deletions
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index 26db2f20c1b..971b8c5e5f8 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -1,51 +1,55 @@ # frozen_string_literal: true -module QA::Page - module Project::Job - class Show < QA::Page::Base - include Component::CiBadgeLink +module QA + module Page + module Project + module Job + class Show < QA::Page::Base + include Component::CiBadgeLink - view 'app/assets/javascripts/jobs/components/log/log.vue' do - element :job_log_content - end + view 'app/assets/javascripts/jobs/components/log/log.vue' do + element :job_log_content + end - view 'app/assets/javascripts/jobs/components/stages_dropdown.vue' do - element :pipeline_path - end + view 'app/assets/javascripts/jobs/components/stages_dropdown.vue' do + element :pipeline_path + end - view 'app/assets/javascripts/jobs/components/sidebar.vue' do - element :retry_button - end + view 'app/assets/javascripts/jobs/components/sidebar.vue' do + element :retry_button + end - def successful?(timeout: 60) - raise "Timed out waiting for the build trace to load" unless loaded? - raise "Timed out waiting for the status to be a valid completed state" unless completed?(timeout: timeout) + def successful?(timeout: 60) + raise "Timed out waiting for the build trace to load" unless loaded? + raise "Timed out waiting for the status to be a valid completed state" unless completed?(timeout: timeout) - passed? - end + passed? + end - # Reminder: You may wish to wait for a particular job status before checking output - def output(wait: 5) - result = '' + # Reminder: You may wish to wait for a particular job status before checking output + def output(wait: 5) + result = '' - wait_until(reload: false, max_duration: wait, sleep_interval: 1) do - result = find_element(:job_log_content).text + wait_until(reload: false, max_duration: wait, sleep_interval: 1) do + result = find_element(:job_log_content).text - result.include?('Job') - end + result.include?('Job') + end - result - end + result + end - def retry! - click_element :retry_button - end + def retry! + click_element :retry_button + end - private + private - def loaded?(wait: 60) - wait_until(reload: true, max_duration: wait, sleep_interval: 1) do - has_element?(:job_log_content, wait: 1) + def loaded?(wait: 60) + wait_until(reload: true, max_duration: wait, sleep_interval: 1) do + has_element?(:job_log_content, wait: 1) + end + end end end end |