summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-02-15 15:39:45 -0500
committerMark Lapierre <mlapierre@gitlab.com>2019-02-15 15:39:45 -0500
commit18d5541cc96f7956a329082d5b172996a005a4e0 (patch)
treeeece5bba963a8f55ede4ce6d78fe2d67c20bf55f
parent813df901e81257e3175015c94022151824682e83 (diff)
downloadgitlab-ce-18d5541cc96f7956a329082d5b172996a005a4e0.tar.gz
Fix failing e2e labels test
On staging new projects now have existing labels, which displays a different layout causing a test to fail because an expexted image is not displayed. There is a similar image shown on the page with existing labels, so this change adds a selector so the test can successfully wait for the image to appear.
-rw-r--r--app/views/shared/empty_states/_priority_labels.html.haml2
-rw-r--r--qa/qa/page/label/index.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/app/views/shared/empty_states/_priority_labels.html.haml b/app/views/shared/empty_states/_priority_labels.html.haml
index 555cb4f4af9..bba3475d244 100644
--- a/app/views/shared/empty_states/_priority_labels.html.haml
+++ b/app/views/shared/empty_states/_priority_labels.html.haml
@@ -1,4 +1,4 @@
.text-center
- .svg-content
+ .svg-content.qa-label-svg
= image_tag 'illustrations/priority_labels.svg'
%p Star labels to start sorting by priority
diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb
index f0d323ca3b4..de0cfa9f293 100644
--- a/qa/qa/page/label/index.rb
+++ b/qa/qa/page/label/index.rb
@@ -14,6 +14,10 @@ module QA
element :label_svg
end
+ view 'app/views/shared/empty_states/_priority_labels.html.haml' do
+ element :label_svg
+ end
+
def go_to_new_label
# The 'labels.svg' takes a fraction of a second to load after which the "New label" button shifts up a bit
# This can cause webdriver to miss the hit so we wait for the svg to load (implicitly with has_element?)