From 82bd608de14a8488b52e2884c86dbc79c8693be0 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 2 Apr 2015 14:08:23 +0200 Subject: [PATCH] tests/chromium: Work around popup close flakiness. It's not nice to send the escape key over and over again just to ensure the popup is closed, because even *if* it fails to close the popup 4 times in a row it's just very unlikely that it will be closed. But in order to make really sure, we might need to do a screenshot and detect visual changes. Signed-off-by: aszlig --- nixos/tests/chromium.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix index 368d0e43c465..026433fc7ee9 100644 --- a/nixos/tests/chromium.nix +++ b/nixos/tests/chromium.nix @@ -109,7 +109,12 @@ import ./make-test.nix ( $machine->waitUntilSucceeds("${xdo "check-startup" '' search --sync --onlyvisible --name "startup done" # close first start help popup - key Escape + key -delay 1000 Escape + # XXX: This is to make sure the popup is closed, but we better do + # screenshots to detect visual changes. + key -delay 2000 Escape + key -delay 3000 Escape + key -delay 4000 Escape windowfocus --sync windowactivate --sync ''}");