Commit 9fd0c9f8 authored by anonym's avatar anonym
Browse files

Add workaround introduced by new Tor Browser fonts.

The new fonts make the text wider, pushing the settings button outside
the visible part of the page. We have to scroll right to make it
visible again.
parent 2f02f5e3
......@@ -159,6 +159,23 @@ Then /^I can start the Unsafe Browser again$/ do
step "I start the Unsafe Browser"
end
# Given the bundled, fixed-size fonts introduced in Tor Browser 5.0,
# the text in the preferences sometimes pushes certain elements we
# need outside of the visible part of the page. In those cases this
# workaround is useful.
def scroll_page_to_extreme_right
right = 'UnsafeBrowserScrollRightButton.png'
done = 'UnsafeBrowserScrollRightButtonDone.png'
cur = nil
while cur != done
cur, match = @screen.findAny([right, done])
@screen.click(match) if cur == right
@screen.hide_cursor
end
rescue FindFailed
# There's no scrollbar, so we must be done
end
Then /^I cannot configure the Unsafe Browser to use any local proxies$/ do
next if @skip_steps_while_restoring_background
socks_proxy = 'c' # Alt+c for socks proxy
......@@ -180,6 +197,7 @@ Then /^I cannot configure the Unsafe Browser to use any local proxies$/ do
hit, _ = @screen.waitAny(['UnsafeBrowserNetworkTabAlreadySelected.png',
'UnsafeBrowserNetworkTab.png'], 10)
@screen.click(hit) if hit == 'UnsafeBrowserNetworkTab.png'
scroll_page_to_extreme_right
@screen.wait_and_click('UnsafeBrowserNetworkTabSettingsButton.png', 10)
@screen.wait('UnsafeBrowserProxySettingsWindow.png', 10)
@screen.type("m", Sikuli::KeyModifier.ALT)
......@@ -208,6 +226,7 @@ Then /^the Unsafe Browser has no proxy configured$/ do
@screen.wait_and_click('UnsafeBrowserPreferencesButton.png', 10)
@screen.wait_and_click('UnsafeBrowserAdvancedSettingsButton.png', 10)
@screen.wait_and_click('UnsafeBrowserNetworkTab.png', 10)
scroll_page_to_extreme_right
@screen.wait_and_click('UnsafeBrowserNetworkTabSettingsButton.png', 10)
@screen.wait('UnsafeBrowserProxySettingsWindow.png', 10)
@screen.wait('UnsafeBrowserNoProxySelected.png', 10)
......
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