From c424d63ea82a1ddb6b7f6f9a5dad0ee6f810fb51 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 20 Oct 2021 13:35:40 -0700 Subject: [PATCH] _graphical_input: retry launch of keyboard if it fails First attempt at this often fails for some reason - while we're typing 'keyboard' the results come up as normal, but before we hit enter, they all disappear and are replaced with "no results found" (in Japanese). Dunno why. This will hopefully work around that, if it works reliably on the second try. Signed-off-by: Adam Williamson --- tests/_graphical_input.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/_graphical_input.pm b/tests/_graphical_input.pm index 88c1be2a..86d7febb 100644 --- a/tests/_graphical_input.pm +++ b/tests/_graphical_input.pm @@ -13,6 +13,11 @@ sub run { # we have to set up the input method manually: # https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3749 menu_launch_type "keyboard"; + unless (check_screen "desktop_add_input_source", 30) { + # first attempt to run this often fails for some reason + check_desktop; + menu_launch_type "keyboard"; + } assert_and_click "desktop_add_input_source"; assert_and_click "desktop_input_source_japanese"; assert_and_click "desktop_input_source_japanese_anthy";