Commit 640bc8c0 authored by anonym's avatar anonym
Browse files

Simplify by removing the wait_for_gnome*() helpers.

They don't work well and do not seem needed. Also, it's used in only
two places, and add to that that GNOME seems to be moving away from
having the type of title bar we're looking for.
parent f4df4d3a
......@@ -345,7 +345,7 @@ Given /^the Tor Browser has started$/ do
tor_browser_picture = "TorBrowserWindow.png"
end
@screen.wait_for_gnome_window(tor_browser_picture, 60)
@screen.wait(tor_browser_picture, 60)
end
Given /^the Tor Browser (?:has started and )?load(?:ed|s) the (startup page|Tails roadmap)$/ do |page|
......
......@@ -157,7 +157,7 @@ Then /^I cannot configure the Unsafe Browser to use any local proxies$/ do
'UnsafeBrowserNetworkTab.png'], 10)
@screen.click(hit) if hit == 'UnsafeBrowserNetworkTab.png'
@screen.wait_and_click('UnsafeBrowserNetworkTabSettingsButton.png', 10)
@screen.wait_for_gnome_window('UnsafeBrowserPreferencesWindow.png', 10)
@screen.wait_and_click('UnsafeBrowserProxySettingsWindow.png', 10)
@screen.type("m", Sikuli::KeyModifier.ALT)
# Configure the proxy
......
......@@ -193,28 +193,6 @@ def sikuli_script_proxy.new(*args)
self.hover_point(self.w, self.h/2)
end
def wait_for_gnome_window(window_title_img, timeout)
try_for(timeout) do
m = self.find(window_title_img)
# Respective to the matched window title, this is the region
# from its right edge to the right edge of the screen, where we
# would expect the GNOME window's X button.
r = Sikuli::Region.new(m.x + m.w, m.y, self.w - m.x - m.w, m.h)
# Note that below we call Sikuli::Region's find, so we won't get
# any retry if $sikuli_retry_findfailed is set.
r.find("GnomeWindowTitleBarRightEdge.png")
return m
end
end
def wait_and_click_gnome_window(window_title_img, timeout)
self.click(self.wait_for_gnome_window(window_title_img, timeout))
end
def wait_and_double_click_gnome_window(window_title_img, timeout)
self.doubleClick(self.wait_for_gnome_window(window_title_img, timeout))
end
s
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