Make wait return the value we yielded when
it's not nil nor false.
This commit is contained in:
parent
338bb2ac97
commit
2f34ef34fa
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue