From 637e9e4cfe8f1c0602977757740c5ffbba93bd7c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 30 Mar 2023 09:25:47 -0700 Subject: [PATCH] Characters app copy/paste test: be more defensive There's a failure mode we hit quite often where, when we run the text editor after copying the character, it pops up *behind* the character page. So let's close the page first. When we click the 'Copy Character' button a notification that the character was copied is briefly displayed and if we hit esc while it's visible we dismiss *that* not the character page, so hit esc twice to be safe. If we miss dismissing the notification, the 'extra' press is safe, it doesn't quit the app. 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 289e4f9b..e63d0af7 100644 --- a/tests/applications/characters/copy_paste.pm +++ b/tests/applications/characters/copy_paste.pm @@ -14,6 +14,12 @@ sub run { assert_screen("chars_love_eyes_dialogue"); # Click on Copy Character button. assert_and_click("gnome_copy_button"); + # close the character page, so text editor doesn't start under it + # we hit esc twice in case the first dismisses the notification + wait_still_screen 2; + send_key("esc"); + wait_still_screen 2; + send_key("esc"); # Open text editor. menu_launch_type("text editor"); wait_still_screen(3);