mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
nixos/tests/chromium: Detect popup using OCR.
This will make the test a lot more reliable, because we no longer need
to press ESC multiple times hoping that it will close the popup.
Unfortunately in order to run this test I needed to locally revert the
gyp update from a305e6855d
.
With the old gyp version however the test runs fine and it's able to
properly detect the popup.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
dfbd1ddb8b
commit
5f50f23013
@ -9,6 +9,8 @@ import ./make-test.nix (
|
||||
}: rec {
|
||||
name = "chromium";
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
machine.imports = [ ./common/x11.nix ];
|
||||
machine.virtualisation.memorySize = 1024;
|
||||
|
||||
@ -106,15 +108,11 @@ import ./make-test.nix (
|
||||
"ulimit -c unlimited; ".
|
||||
"$pkg/bin/chromium $args \"$url\" & disown"
|
||||
);
|
||||
$machine->waitForText(qr/Type to search or enter a URL to navigate/);
|
||||
$machine->waitUntilSucceeds("${xdo "check-startup" ''
|
||||
search --sync --onlyvisible --name "startup done"
|
||||
# close first start help popup
|
||||
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
|
||||
''}");
|
||||
|
Loading…
Reference in New Issue
Block a user