lib/briar/bars/toolbar.rb in briar-0.1.2 vs lib/briar/bars/toolbar.rb in briar-0.1.3.b1

- old
+ new

@@ -54,12 +54,12 @@ else msg = "waited for '#{timeout}' seconds but did not see toolbar button marked: '#{button_id}' in toolbar '#{toolbar_id}'" end options = {:timeout => timeout, - :retry_frequency => BRIAR_RETRY_FREQ, - :post_timeout => BRIAR_POST_TIMEOUT, + :retry_frequency => BRIAR_WAIT_RETRY_FREQ, + :post_timeout => BRIAR_WAIT_STEP_PAUSE, :timeout_message => msg} wait_for(options) do toolbar_button_exists? button_id, opts end @@ -71,12 +71,12 @@ end def wait_for_toolbar_to_disappear(toolbar_id, timeout=BRIAR_WAIT_TIMEOUT) msg = "waited for '#{timeout}' seconds but i still see toolbar marked: '#{toolbar_id}'" options = {:timeout => timeout, - :retry_frequency => BRIAR_RETRY_FREQ, - :post_timeout => BRIAR_POST_TIMEOUT, + :retry_frequency => BRIAR_WAIT_RETRY_FREQ, + :post_timeout => BRIAR_WAIT_STEP_PAUSE, :timeout_message => msg} wait_for(options) do not toolbar_exists? toolbar_id end @@ -84,12 +84,12 @@ def wait_for_toolbar(toolbar_id, timeout=BRIAR_WAIT_TIMEOUT) msg = "waited for '#{timeout}' seconds but did not see toolbar marked: '#{toolbar_id}'" options = {:timeout => timeout, - :retry_frequency => BRIAR_RETRY_FREQ, - :post_timeout => BRIAR_POST_TIMEOUT, + :retry_frequency => BRIAR_WAIT_RETRY_FREQ, + :post_timeout => BRIAR_WAIT_STEP_PAUSE, :timeout_message => msg} wait_for(options) do toolbar_exists? toolbar_id end @@ -102,14 +102,16 @@ default_opts ={:wait_for_view => nil, :timeout => BRIAR_WAIT_TIMEOUT, :toolbar_id => nil} opts = default_opts.merge(opts) else - warn("WARN: deprecated 0.1.2: second argument should be a hash - found '#{opts}'") + deprecated('0.1.2', + "second argument should be a hash - found '#{opts}'", + :warn) opts = {:wait_for_view => opts[:wait_for_view], - :timeout => BRIAR_WAIT_TIMEOUT, - :toolbar_id => nil} + :timeout => BRIAR_WAIT_TIMEOUT, + :toolbar_id => nil} end should_see_toolbar_button button_id, opts toolbar_qstr = toolbar_qstr(opts[:toolbar_id]) @@ -118,11 +120,11 @@ wait_for_view = opts[:wait_for_view] unless wait_for_view.nil? timeout = opts[:timeout] msg = "touched '#{button_id}' and waited for '#{timeout}' sec but did not see '#{wait_for_view}'" options = {:timeout => timeout, - :retry_frequency => BRIAR_RETRY_FREQ, - :post_timeout => BRIAR_POST_TIMEOUT, + :retry_frequency => BRIAR_WAIT_RETRY_FREQ, + :post_timeout => BRIAR_WAIT_STEP_PAUSE, :timeout_message => msg} wait_for(options) do view_exists? wait_for_view end end