From 85d28ce4abfc24c5b73241ac0dd33d2cacdc69e3 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 6 Apr 2023 09:24:29 -0700 Subject: [PATCH] characters: workaround text editor starting behind characters We're constantly seeing this test fail on an odd problem where text editor starts *behind* characters. To handle this, check if we see text editor and if not, hit alt-tab. Signed-off-by: Adam Williamson --- tests/applications/characters/copy_paste.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/applications/characters/copy_paste.pm b/tests/applications/characters/copy_paste.pm index e63d0af7..17279201 100644 --- a/tests/applications/characters/copy_paste.pm +++ b/tests/applications/characters/copy_paste.pm @@ -22,6 +22,12 @@ sub run { send_key("esc"); # Open text editor. menu_launch_type("text editor"); + # For some reason, text editor often starts *behind* characters, + # so we may need to hit alt-tab to find it + unless(check_screen("apps_run_texteditor", 15)) { + send_key("alt-tab"); + assert_screen("apps_run_texteditor"); + } wait_still_screen(3); # Paste the character. send_key("ctrl-v");