Skip to content

Commit

Permalink
Move wait_still_screen to the start of the loop
Browse files Browse the repository at this point in the history
There is a loop in the `sles4sap/wizard_hana_install` test module, which
cycles until the `sap-product-installation` needle matches. On SUTs with
only one disk, this is a good solution as it allows the test to continue
faster, but on SUTs with more disks, it's possible that the dialog
prompting the user to select the disk where HANA is going to be
installed takes a few seconds to appear, which can cause the module to
wrongly match with `sap-product-installation` which is the window behind
the disk selection dialog.

This commit moves the `wait_still_screen` call from the end of the loop
to the start of the same loop. Idea is that module will wait until
screen settles before attempting to match either the disk selection
dialog or the `sap-product-installation` needle, giving it more time to
wait for the disk selection dialog to be shown.
  • Loading branch information
alvarocarvajald committed Nov 21, 2024
1 parent ad9e83a commit 54bdf02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/sles4sap/wizard_hana_install.pm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ sub run {
send_key $cmd{next};

while (1) {
wait_still_screen 1; # Slow down the loop
assert_screen [qw(sap-wizard-disk-selection-warning sap-wizard-disk-selection sap-wizard-partition-issues sap-wizard-continue-installation sap-product-installation)], no_wait => 1;
last if match_has_tag 'sap-product-installation';
send_key $cmd{next} if match_has_tag 'sap-wizard-disk-selection-warning'; # A warning can be shown
Expand All @@ -112,7 +113,6 @@ sub run {
}
send_key 'alt-o' if match_has_tag 'sap-wizard-partition-issues';
send_key 'alt-y' if match_has_tag 'sap-wizard-continue-installation';
wait_still_screen 1; # Slow down the loop
}

if (check_var('DESKTOP', 'textmode')) {
Expand Down

0 comments on commit 54bdf02

Please sign in to comment.