diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-01-18 18:37:30 +0500 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-01-18 18:37:30 +0500 |
commit | d74b3cc1867c92a84515397d08c70a2632417636 (patch) | |
tree | 2d95745f373beac181c8d90a67cfe36efd7bf377 | |
parent | 10763a9d8845e6fb685418efa8c11bbf7964a87b (diff) | |
download | gitlab-ce-d74b3cc1867c92a84515397d08c70a2632417636.tar.gz |
Add comments explaining the wait
-rw-r--r-- | qa/qa/page/label/index.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/qa/qa/page/label/index.rb b/qa/qa/page/label/index.rb index effe8ca0372..4eb07a51a81 100644 --- a/qa/qa/page/label/index.rb +++ b/qa/qa/page/label/index.rb @@ -11,10 +11,11 @@ module QA end def go_to_new_label - wait(reload: false) do - within_element(:label_svg) do - has_css?('.js-lazy-loaded') - end + # 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_css?) + # before clicking the button. + within_element(:label_svg) do + has_css?('.js-lazy-loaded') end click_element :label_create_new |