Commit 25408743 authored by anonym's avatar anonym
Browse files

Merge remote-tracking branch 'kytv/test/5330-race-conditions' into testing

parents 2aea3503 c2abc706
......@@ -80,7 +80,9 @@ When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
info = xul_application_info(browser)
open_address = Proc.new do
@screen.click(info[:address_bar_image])
sleep 0.5
# This static here since we have no reliable visual indicators
# that we can watch to know when typing is "safe".
sleep 5
# The browser sometimes loses keypresses when suggestions are
# shown, which we work around by pasting the address from the
# clipboard, in one go.
......
......@@ -34,14 +34,20 @@ end
When /^I type a message into gedit$/ do
step 'I start "Gedit" via the GNOME "Accessories" applications menu'
@screen.wait_and_click("GeditWindow.png", 20)
sleep 0.5
# We don't have a good visual indicator for when we can continue. Without the
# sleep we may start typing in the gedit window far too soon, causing
# keystrokes to go missing.
sleep 5
@screen.type("ATTACK AT DAWN")
end
def maybe_deal_with_pinentry
begin
@screen.wait_and_click("PinEntryPrompt.png", 10)
sleep 1
# Without this sleep here (and reliable visual indicators) we can sometimes
# miss keystrokes by typing too soon. This sleep prevents this problem from
# coming up.
sleep 5
@screen.type(@passphrase + Sikuli::Key.ENTER)
rescue FindFailed
# The passphrase was cached or we wasn't prompted at all (e.g. when
......@@ -63,7 +69,9 @@ def encrypt_sign_helper
gedit_copy_all_text
seahorse_menu_click_helper('GpgAppletIconNormal.png', 'GpgAppletSignEncrypt.png')
@screen.wait_and_click("GpgAppletChooseKeyWindow.png", 30)
sleep 0.5
# We don't have a good visual indicator for when we can continue without
# keystrokes being lost.
sleep 5
yield
maybe_deal_with_pinentry
paste_into_a_new_tab
......
......@@ -494,7 +494,7 @@ EOF
# back seems to be a reliable way to handle this.
select_virtual_desktop(3)
select_virtual_desktop(0)
sleep 1
sleep 5 # there aren't any visual indicators which can be used here
do_focus(window_title, user)
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