summary refs log tree commit diff
path: root/nixos/tests/chromium.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-04-02 14:08:23 +0200
committeraszlig <aszlig@redmoonstudios.org>2015-04-02 14:12:19 +0200
commit82bd608de14a8488b52e2884c86dbc79c8693be0 (patch)
tree50a6316183f422be4314c49471ec12615ac583f3 /nixos/tests/chromium.nix
parent01e9dfb44988ca0d205582e914c4249abb4253de (diff)
downloadnixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar.gz
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar.bz2
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar.lz
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar.xz
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.tar.zst
nixpkgs-82bd608de14a8488b52e2884c86dbc79c8693be0.zip
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'nixos/tests/chromium.nix')
-rw-r--r--nixos/tests/chromium.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/tests/chromium.nix b/nixos/tests/chromium.nix
index 368d0e43c46..026433fc7ee 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
       ''}");