Commit d74b3cc1 authored by Sanad Liaquat's avatar Sanad Liaquat

Add comments explaining the wait

parent 10763a9d
...@@ -11,10 +11,11 @@ module QA ...@@ -11,10 +11,11 @@ module QA
end end
def go_to_new_label def go_to_new_label
wait(reload: false) do # The 'labels.svg' takes a fraction of a second to load after which the "New label" button shifts up a bit
within_element(:label_svg) do # This can cause webdriver to miss the hit so we wait for the svg to load (implicitly with has_css?)
has_css?('.js-lazy-loaded') # before clicking the button.
end within_element(:label_svg) do
has_css?('.js-lazy-loaded')
end end
click_element :label_create_new click_element :label_create_new
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment