From b12c529e347a81bbd874742b9219c54be9c848f0 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 19 Oct 2019 10:30:50 -0700 Subject: [PATCH] Try and reduce timing failures in desktop_browser new tab The way this works at present, with a check_screen and then an assert_and_click, there's a window where the check has passed so we're committed to the assert, but it takes a half second or so for the assert to actually complete (checking for a needle is a somewhat heavy operation). During that half second the 'new update!' notification can...and quite often does...appear. Changing the assert_and_click to a click_lastmatch should (I hope) tighten this window; click_lastmatch should fire faster than assert_and_click so there'll be less of a window for the update notification to appear and break stuff. Signed-off-by: Adam Williamson --- tests/desktop_browser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/desktop_browser.pm b/tests/desktop_browser.pm index 90b7b9a6..f1f2304b 100644 --- a/tests/desktop_browser.pm +++ b/tests/desktop_browser.pm @@ -9,7 +9,7 @@ sub _open_new_tab { # always visible because GNOME might pop up a notification that # blocks it. so, we try both. if (check_screen 'browser_new_tab') { - assert_and_click 'browser_new_tab'; + click_lastmatch; } else { send_key 'ctrl-t';