lib/briar/bars/navbar.rb in briar-0.1.2 vs lib/briar/bars/navbar.rb in briar-0.1.3.b1
- old
+ new
@@ -24,12 +24,12 @@
def should_see_navbar_back_button
timeout = BRIAR_WAIT_TIMEOUT * 2.0
msg = "waited for '#{timeout}' seconds but did not see navbar back button"
wait_for(: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) do
navbar_has_back_button?
end
end
@@ -57,12 +57,12 @@
queries = ["buttonLabel marked:'#{mark}' parent navigationBar",
"button marked:'#{mark}' parent navigationBar"]
timeout = opts[:timeout]
msg = "waited for '#{timeout}' seconds but did not see '#{mark}' in navigation bar"
wait_for(: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) do
queries.any? { |query| element_exists query }
end
else
idx = index_of_navbar_button mark
@@ -78,12 +78,12 @@
if is_ui_button
qstr = "buttonLabel marked:'#{name}' parent navigationBar"
timeout = 1.0
msg = "waited for '#{timeout}' seconds but i still see '#{name}' in navigation bar"
wait_for(: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) do
element_does_not_exist qstr
end
else
idx = index_of_navbar_button name
@@ -102,22 +102,22 @@
def go_back_after_waiting
sleep(0.2)
wait_for(:timeout => 1.0,
- :retry_frequency => BRIAR_RETRY_FREQ,
- :post_timeout => BRIAR_POST_TIMEOUT) do
+ :retry_frequency => BRIAR_WAIT_RETRY_FREQ,
+ :post_timeout => BRIAR_WAIT_STEP_PAUSE) do
not query('navigationItemButtonView first').empty?
end
touch('navigationItemButtonView first')
step_pause
end
def go_back_and_wait_for_view (view)
sleep(0.2)
wait_for(:timeout => BRIAR_WAIT_TIMEOUT,
- :retry_frequency => BRIAR_RETRY_FREQ) do
+ :retry_frequency => BRIAR_WAIT_RETRY_FREQ) do
not query('navigationItemButtonView first').empty?
end
touch_transition('navigationItemButtonView first',
"view marked:'#{view}'",
@@ -126,11 +126,11 @@
step_pause
end
def touch_navbar_item(item_name, wait_for_view_id=nil)
wait_for(:timeout => BRIAR_WAIT_TIMEOUT,
- :retry_frequency => BRIAR_RETRY_FREQ) do
+ :retry_frequency => BRIAR_WAIT_RETRY_FREQ) do
(index_of_navbar_button(item_name) != nil) || button_exists?(item_name)
end
sleep(0.2)
idx = index_of_navbar_button item_name
@@ -160,11 +160,11 @@
end
def should_see_navbar_with_title(title, timeout=BRIAR_WAIT_TIMEOUT)
msg = "waited for '#{timeout}' seconds but i did not see #{title} in navbar"
wait_for(: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) do
navbar_has_title? title
end
end
end