nixos/tests/plotinus: fix non-deterministic failure (#40239)

Test failed sometimes, likely because a window didn't get focus.

(cherry picked from commit 558f4b3368b83844837fccd58e9e89490911a1b3)
release-18.03-flake
xeji 2018-05-10 19:38:02 +02:00 committed by Uli Baum
parent a08e4908e2
commit f1e419f3cc
1 changed files with 5 additions and 5 deletions

View File

@ -15,11 +15,11 @@ import ./make-test.nix ({ pkgs, ... }: {
testScript =
''
$machine->waitForX;
$machine->execute("xterm -e 'gnome-calculator' &");
$machine->waitForWindow(qr/Calculator/);
$machine->execute("xdotool key ctrl+shift+p");
$machine->sleep(1); # wait for the popup
$machine->execute("xdotool key p r e f e r e n c e s Return");
$machine->succeed("gnome-calculator &");
$machine->waitForWindow(qr/gnome-calculator/);
$machine->succeed("xdotool search --sync --onlyvisible --class gnome-calculator windowfocus --sync key ctrl+shift+p");
$machine->sleep(5); # wait for the popup
$machine->succeed("xdotool key --delay 100 p r e f e r e n c e s Return");
$machine->waitForWindow(qr/Preferences/);
$machine->screenshot("screen");
'';