From 18d5541cc96f7956a329082d5b172996a005a4e0 Mon Sep 17 00:00:00 2001 From: Mark Lapierre Date: Fri, 15 Feb 2019 15:39:45 -0500 Subject: 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. --- app/views/shared/empty_states/_priority_labels.html.haml | 2 +- qa/qa/page/label/index.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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?) -- cgit v1.2.1