Merge pull request #277127 from bobby285271/upd/nixosTests.mate
nixosTests.mate: Extend the test
This commit is contained in:
commit
af9ae66959
2 changed files with 26 additions and 2 deletions
|
@ -27,9 +27,12 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|||
hardware.pulseaudio.enable = true;
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = { nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.users.users.alice;
|
||||
env = "DISPLAY=:0.0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus";
|
||||
in
|
||||
''
|
||||
with subtest("Wait for login"):
|
||||
|
@ -48,11 +51,31 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|||
machine.wait_for_window("Bottom Panel")
|
||||
machine.wait_until_succeeds("pgrep caja")
|
||||
machine.wait_for_window("Caja")
|
||||
machine.wait_for_text('(Applications|Places|System)')
|
||||
machine.wait_for_text('(Computer|Home|Trash)')
|
||||
|
||||
with subtest("Lock the screen"):
|
||||
machine.wait_until_succeeds("su - ${user.name} -c '${env} mate-screensaver-command -q' | grep 'The screensaver is inactive'")
|
||||
machine.succeed("su - ${user.name} -c '${env} mate-screensaver-command -l >&2 &'")
|
||||
machine.wait_until_succeeds("su - ${user.name} -c '${env} mate-screensaver-command -q' | grep 'The screensaver is active'")
|
||||
machine.sleep(2)
|
||||
machine.send_chars("${user.password}", delay=0.2)
|
||||
machine.wait_for_text("${user.description}")
|
||||
machine.screenshot("screensaver")
|
||||
machine.send_chars("\n")
|
||||
machine.wait_until_succeeds("su - ${user.name} -c '${env} mate-screensaver-command -q' | grep 'The screensaver is inactive'")
|
||||
|
||||
with subtest("Open MATE control center"):
|
||||
machine.succeed("su - ${user.name} -c '${env} mate-control-center >&2 &'")
|
||||
machine.wait_for_window("Control Center")
|
||||
machine.wait_for_text('(Groups|Administration|Hardware)')
|
||||
|
||||
with subtest("Open MATE terminal"):
|
||||
machine.succeed("su - ${user.name} -c 'DISPLAY=:0.0 mate-terminal >&2 &'")
|
||||
machine.succeed("su - ${user.name} -c '${env} mate-terminal >&2 &'")
|
||||
machine.wait_for_window("Terminal")
|
||||
machine.sleep(20)
|
||||
|
||||
with subtest("Check if MATE has ever coredumped"):
|
||||
machine.fail("coredumpctl --json=short | grep -E 'mate|marco|caja'")
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
||||
|
|
|
@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
|
|||
mate.mate-desktop
|
||||
mate.libmatekbd
|
||||
mate.mate-menus
|
||||
mate.mate-panel # for org.mate.panel schema, see m-c-c#678
|
||||
mate.marco
|
||||
mate.mate-settings-daemon
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue