[QA] Fix the 'clone using deploy key' tests
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
4ef9bb6a04
commit
105a8c177f
4 changed files with 22 additions and 13 deletions
|
@ -165,7 +165,7 @@
|
||||||
<gl-loading-icon
|
<gl-loading-icon
|
||||||
v-if="isLoading"
|
v-if="isLoading"
|
||||||
:size="2"
|
:size="2"
|
||||||
class="js-job-loading prepend-top-20"
|
class="js-job-loading qa-loading-animation prepend-top-20"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<template v-else-if="shouldRenderContent">
|
<template v-else-if="shouldRenderContent">
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<pre class="js-build-trace build-trace">
|
<pre class="js-build-trace build-trace qa-build-trace">
|
||||||
<code
|
<code
|
||||||
class="bash"
|
class="bash"
|
||||||
v-html="trace"
|
v-html="trace"
|
||||||
|
|
|
@ -43,7 +43,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
cssClass() {
|
cssClass() {
|
||||||
const className = this.status.group;
|
const className = this.status.group;
|
||||||
return className ? `ci-status ci-${className}` : 'ci-status';
|
return className ? `ci-status ci-${className} qa-status-badge` : 'ci-status qa-status-badge';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,30 +4,39 @@ module QA::Page
|
||||||
COMPLETED_STATUSES = %w[passed failed canceled blocked skipped manual].freeze # excludes created, pending, running
|
COMPLETED_STATUSES = %w[passed failed canceled blocked skipped manual].freeze # excludes created, pending, running
|
||||||
PASSED_STATUS = 'passed'.freeze
|
PASSED_STATUS = 'passed'.freeze
|
||||||
|
|
||||||
view 'app/views/shared/builds/_build_output.html.haml' do
|
view 'app/assets/javascripts/jobs/components/job_app.vue' do
|
||||||
element :build_output, '.js-build-output' # rubocop:disable QA/ElementWithPattern
|
element :loading_animation
|
||||||
element :loading_animation, '.js-build-refresh' # rubocop:disable QA/ElementWithPattern
|
end
|
||||||
|
|
||||||
|
view 'app/assets/javascripts/jobs/components/job_log.vue' do
|
||||||
|
element :build_trace
|
||||||
end
|
end
|
||||||
|
|
||||||
view 'app/assets/javascripts/vue_shared/components/ci_badge_link.vue' do
|
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
|
end
|
||||||
|
|
||||||
def completed?
|
def completed?
|
||||||
COMPLETED_STATUSES.include? find('.ci-status').text
|
COMPLETED_STATUSES.include?(status_badge)
|
||||||
end
|
end
|
||||||
|
|
||||||
def passed?
|
def passed?
|
||||||
find('.ci-status').text == PASSED_STATUS
|
status_badge == PASSED_STATUS
|
||||||
end
|
end
|
||||||
|
|
||||||
def trace_loading?
|
def trace_loading?
|
||||||
has_css?('.js-build-refresh')
|
has_element?(:loading_animation)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Reminder: You may wish to wait for a particular job status before checking output
|
# Reminder: You may wish to wait for a particular job status before checking output
|
||||||
def 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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue