Commit 299d1974 authored by intrigeri's avatar intrigeri

Test suite: try to make "I open the address" more robust.

I see it succeed too fast, presumably because the Reload button is displayed for
a little bit, after pressing Enter, before it's replaced by the Stop button
while the page is loaded, and finally reappears.
parent 7993030c
......@@ -26,12 +26,14 @@ def xul_application_info(application)
cmd_regex = "#{binary} .* -profile /home/#{user}/\.tor-browser/profile\.default"
chroot = ""
browser_reload_button_image = "TorBrowserReloadButton.png"
browser_stop_button_image = "TorBrowserStopButton.png"
new_tab_button_image = "TorBrowserNewTabButton.png"
when "Unsafe Browser"
user = "clearnet"
cmd_regex = "#{binary} .* -profile /home/#{user}/\.unsafe-browser/profile\.default"
chroot = "/var/lib/unsafe-browser/chroot"
browser_reload_button_image = "UnsafeBrowserReloadButton.png"
browser_stop_button_image = "UnsafeBrowserStopButton.png"
new_tab_button_image = "UnsafeBrowserNewTabButton.png"
when "Tor Launcher"
user = "tor-launcher"
......@@ -45,6 +47,7 @@ def xul_application_info(application)
new_tab_button_image = nil
address_bar_image = nil
browser_reload_button_image = nil
browser_stop_button_image = nil
# The standalone Tor Launcher uses fewer libs than the full
# browser.
unused_tbb_libs.concat(["libfreebl3.so", "libfreeblpriv3.so", "libnssckbi.so", "libsoftokn3.so"])
......@@ -58,6 +61,7 @@ def xul_application_info(application)
:new_tab_button_image => new_tab_button_image,
:address_bar_image => address_bar_image,
:browser_reload_button_image => browser_reload_button_image,
:browser_stop_button_image => browser_stop_button_image,
:unused_tbb_libs => unused_tbb_libs,
}
end
......@@ -95,6 +99,7 @@ When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
end
open_address.call
retry_method.call(recovery_on_failure) do
@screen.waitVanish(info[:browser_stop_button_image], 120)
@screen.wait(info[:browser_reload_button_image], 120)
end
end
......
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