Commit 2f34ef34 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make wait return the value we yielded when

it's not nil nor false.
parent 338bb2ac
......@@ -17,7 +17,8 @@ module QA
start = Time.now
while Time.now - start < max
return true if yield
result = yield
return result if result
sleep(time)
......
......@@ -7,10 +7,9 @@ module QA::Page
def go_to_latest_pipeline
css = '.js-pipeline-url-link'
link = nil
wait(reload: false) do
link = first(css)
link = wait(reload: false) do
first(css)
end
link.click
......
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