summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2018-06-08 09:37:51 -0700
committerDJ Mountney <david@twkie.net>2018-06-08 09:37:51 -0700
commit710252104e92c9336b29fddb957f0518d43a74b1 (patch)
tree39eb3312c78169ac70bc7ad494170c348842c80c /qa
parent19ac6badbf9484aa488cf9c15453c030a185104e (diff)
downloadgitlab-ce-710252104e92c9336b29fddb957f0518d43a74b1.tar.gz
Move qa test use of refresh selector into the job page
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/project/job/show.rb5
-rw-r--r--qa/qa/specs/features/project/deploy_key_clone_spec.rb2
2 files changed, 6 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 2fa5c3a1a4c..46b3e38c1c5 100644
--- a/qa/qa/specs/features/project/deploy_key_clone_spec.rb
+++ b/qa/qa/specs/features/project/deploy_key_clone_spec.rb
@@ -93,7 +93,7 @@ module QA
Page::Project::Job::Show.perform do |job|
job.wait(reload: false) do
- job.completed? && !job.has_css?('.js-build-refresh')
+ job.completed? && !job.trace_loading?
end
expect(job.passed?).to be_truthy, "Job status did not become \"passed\"."