Skip to content

Commit

Permalink
Avoid sporadic failure clicking on reboot
Browse files Browse the repository at this point in the history
- poo#19082
  • Loading branch information
SergioAtSUSE committed May 15, 2017
1 parent 491e2d0 commit 66be570
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/x11/reboot_gnome.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,26 @@ use strict;
use testapi;
use utils;

sub assert_and_click_until_screen_change {
my ($mustmatch, $wait_change, $repeat) = @_;
$wait_change //= 2;
$repeat //= 3;
my $i = 0;

for (; $i < $repeat; $i++) {
wait_screen_change { assert_and_click $mustmatch; }, $wait_change;
last unless check_screen($mustmatch, 0);
}

return $i;
}

sub run() {
my ($self) = @_;
wait_still_screen;
send_key_until_needlematch 'logoutdialog', 'ctrl-alt-delete', 7, 10; # reboot
assert_and_click 'logoutdialog-reboot-highlighted';
my $repetitions = assert_and_click_until_screen_change 'logoutdialog-reboot-highlighted';
record_soft_failure 'poo#19082' if ($repetitions > 0);

if (get_var("SHUTDOWN_NEEDS_AUTH")) {
assert_screen 'reboot-auth';
Expand Down

0 comments on commit 66be570

Please sign in to comment.