diff options
Diffstat (limited to 'qa/qa/page/project/job/show.rb')
-rw-r--r-- | qa/qa/page/project/job/show.rb | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/qa/qa/page/project/job/show.rb b/qa/qa/page/project/job/show.rb index 5baf6439cfc..d688f15914c 100644 --- a/qa/qa/page/project/job/show.rb +++ b/qa/qa/page/project/job/show.rb @@ -4,30 +4,39 @@ module QA::Page COMPLETED_STATUSES = %w[passed failed canceled blocked skipped manual].freeze # excludes created, pending, running PASSED_STATUS = 'passed'.freeze - view 'app/views/shared/builds/_build_output.html.haml' do - element :build_output, '.js-build-output' # rubocop:disable QA/ElementWithPattern - element :loading_animation, '.js-build-refresh' # rubocop:disable QA/ElementWithPattern + view 'app/assets/javascripts/jobs/components/job_app.vue' do + element :loading_animation + end + + view 'app/assets/javascripts/jobs/components/job_log.vue' do + element :build_trace end view 'app/assets/javascripts/vue_shared/components/ci_badge_link.vue' do - element :status_badge, 'ci-status' # rubocop:disable QA/ElementWithPattern + element :status_badge end def completed? - COMPLETED_STATUSES.include? find('.ci-status').text + COMPLETED_STATUSES.include?(status_badge) end def passed? - find('.ci-status').text == PASSED_STATUS + status_badge == PASSED_STATUS end def trace_loading? - has_css?('.js-build-refresh') + has_element?(:loading_animation) end # Reminder: You may wish to wait for a particular job status before checking output def output - find('.js-build-output').text + find_element(:build_trace).text + end + + private + + def status_badge + find_element(:status_badge).text end end end |