Skip to content

Commit

Permalink
Rerun three times to get expected fltk screen
Browse files Browse the repository at this point in the history
  • Loading branch information
openQA web UI committed Oct 14, 2024
1 parent 3bbf832 commit df8953b
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/x11/toolkits/fltk.pm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ use base 'x11test';
use strict;
use warnings;
use testapi;
use registration;
use utils 'zypper_call';

sub move_window {
# Start a new xterm as root
x11_start_program('xterm');
# Wait before typing to avoid typos
wait_still_screen(5);
# Check needle match again
return if (check_screen('ui-toolkit-fltk', 5));
become_root;
script_run "cd";
# xdotool in packagehub
add_suseconnect_product(get_addon_fullname('phub'));
zypper_call("install xdotool");
my $out = script_output("xdotool search --onlyvisible --classname 'FLTK'");
# Move window to new position
script_run("xdotool windowmove $out 104 434");
return;
}

sub run {
select_console 'x11';
Expand All @@ -21,8 +41,8 @@ sub run {
script_run './fltk', 0;
assert_screen [qw(ui-toolkit-fltk ui-toolkit-fltk-nomsg-display)];
if (match_has_tag 'ui-toolkit-fltk-nomsg-display') {
move_window;
wait_screen_change { send_key 'alt-f4' };
script_run './fltk', 0;
assert_screen 'ui-toolkit-fltk';
}
wait_screen_change { send_key 'alt-f4' };
Expand Down

0 comments on commit df8953b

Please sign in to comment.