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.
This commit is contained in:
Mark Lapierre 2019-02-15 15:39:45 -05:00
parent 813df901e8
commit 18d5541cc9
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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?)