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