From 24d9a9a6e4ef4b201e0c13a6918faeb364948f19 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Fri, 15 Dec 2023 12:03:56 +0100 Subject: [PATCH] Revert "Improve maximize window poo#138248" --- lib/windowsbasetest.pm | 6 ++---- tests/wsl/firstrun.pm | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/windowsbasetest.pm b/lib/windowsbasetest.pm index dee5ee06e31e..9b75c8ca6116 100644 --- a/lib/windowsbasetest.pm +++ b/lib/windowsbasetest.pm @@ -52,8 +52,7 @@ sub open_powershell_as_admin { if (get_var('QAM_WINDOWS_SERVER')) { send_key_until_needlematch 'windows-quick-features-menu', 'super-x'; wait_screen_change { send_key('shift-a') }; - # Maximize window - wait_screen_change { send_key('super-up') }; + wait_screen_change { assert_and_click('window-max') }; assert_screen 'windows_server_powershell_opened', 30; } else { if (check_var('WIN_VERSION', '10')) { @@ -79,8 +78,7 @@ sub open_powershell_as_admin { send_key 'esc' if match_has_tag('powershell-with-startup-menu'); } assert_screen 'powershell-as-admin-window', timeout => 240; - # Maximize window - send_key 'super-up'; + assert_and_click 'window-max'; wait_still_screen stilltime => 3, timeout => 12; _setup_serial_device unless (exists $args{no_serial}); } diff --git a/tests/wsl/firstrun.pm b/tests/wsl/firstrun.pm index a1a0680d0831..e2a9780a7e54 100644 --- a/tests/wsl/firstrun.pm +++ b/tests/wsl/firstrun.pm @@ -119,12 +119,11 @@ sub run { assert_screen [qw(yast2-wsl-firstboot-welcome wsl-installing-prompt)], 480; if (match_has_tag 'yast2-wsl-firstboot-welcome') { - # The new process of installing, appears in an already maximized window, # but sometimes it loses focus. So I created another needle to check if # the window is already maximized and click somewhere else to bring it to focus. assert_screen(['window-max', 'window-minimize']); - send_key 'super-up' if match_has_tag 'window-max'; + assert_and_click 'window-max' if match_has_tag 'window-max'; assert_and_click 'window-minimize' if match_has_tag 'window-minimize'; wait_still_screen stilltime => 3, timeout => 10; is_fake_scc_url_needed && set_fake_scc_url(); @@ -156,8 +155,8 @@ sub run { # Back to CLI assert_screen 'wsl-linux-prompt'; } else { - #1) Make sure to maximize the window and skip registration, we cannot register against proxy SCC - send_key 'super-up'; + #1) skip registration, we cannot register against proxy SCC + assert_and_click 'window-max'; assert_screen 'wsl-registration-prompt', 300; send_key 'ret';