Commit 9eadfc46 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

browser/tests/functional: Avoid wait_until warning

There was a deprecated warning because we tested the wait_until on
a variable that may change over time. The code has now be changed so that
the element is retrieved each time we test it.
Moreove the until() function may be useful elsewhere
parent 3f9bec2e
......@@ -107,7 +107,7 @@ end
def test_06_remove_cluster
clustered = $b.clone_info('1')
$b.clone_in_cluster('1', '2')[:delete].wait_until(&:present?)
$b.until { $b.clone_in_cluster('1', '2')[:delete].present? }
$b.clone_in_cluster('1', '2')[:delete].click
assert (not $b.clone_cluster('1').present?)
......@@ -337,6 +337,12 @@ class VidjilBrowser < Watir::Browser
return div(:id => 'list_clones')
def until(extra = {})
default = {timeout: 3}
Watir::Wait.until(default) { yield }
def scatterplot_id(number=1)
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