Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2019-01-21 15:26:06 +0300
committerFatih Acet <acetfatih@gmail.com>2019-01-21 15:26:06 +0300
commit466a77517bde33614deb6f1d5583147c3b76b713 (patch)
tree6b00e68da144cdf17bf23fc111129302f8aee75f /qa
parent10d421be3fea1c6b69d773aeba3c08dfa1da38d0 (diff)
parent099613f41248f5c6d7ae5f6dfdb7a753e64c30cd (diff)
Merge branch 'qa-nightly-59-fix-new-label-button-hit-miss' into 'master'
Fixes "New label" button hit miss Closes gitlab-org/quality/nightly#59 See merge request gitlab-org/gitlab-ce!24487
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/page/label/index.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb
index 323acd57743..9344371a0b6 100644
--- a/qa/qa/page/label/index.rb
+++ b/qa/qa/page/label/index.rb
@@ -6,7 +6,22 @@ module QA
element :label_create_new
end
+ view 'app/views/shared/empty_states/_labels.html.haml' do
+ element :label_svg
+ end
+
+ view 'app/assets/javascripts/lazy_loader.js' do
+ element :js_lazy_loaded
+ 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?)
+ # before clicking the button.
+ within_element(:label_svg) do
+ has_element?(:js_lazy_loaded)
+ end
+
click_element :label_create_new
end
end