2020-05-02 14:28:50 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, ...} :
|
|
|
|
{
|
|
|
|
name = "enlightenment";
|
|
|
|
|
2021-01-10 19:08:30 +00:00
|
|
|
meta = with pkgs.lib.maintainers; {
|
2020-05-02 14:28:50 +00:00
|
|
|
maintainers = [ romildo ];
|
2024-08-20 20:43:31 +00:00
|
|
|
timeout = 600;
|
|
|
|
# OCR tests are flaky
|
|
|
|
broken = true;
|
2020-05-02 14:28:50 +00:00
|
|
|
};
|
|
|
|
|
2022-03-20 23:15:30 +00:00
|
|
|
nodes.machine = { ... }:
|
2020-05-02 14:28:50 +00:00
|
|
|
{
|
|
|
|
imports = [ ./common/user-account.nix ];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.desktopManager.enlightenment.enable = true;
|
2021-09-22 07:04:59 +00:00
|
|
|
services.xserver.displayManager = {
|
|
|
|
lightdm.enable = true;
|
2020-05-02 14:28:50 +00:00
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "alice";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.xdotool ];
|
|
|
|
services.acpid.enable = true;
|
|
|
|
services.connman.enable = true;
|
|
|
|
services.connman.package = pkgs.connmanMinimal;
|
|
|
|
};
|
|
|
|
|
|
|
|
enableOCR = true;
|
|
|
|
|
|
|
|
testScript = { nodes, ... }: let
|
|
|
|
user = nodes.machine.config.users.users.alice;
|
|
|
|
in ''
|
|
|
|
with subtest("Ensure x starts"):
|
|
|
|
machine.wait_for_x()
|
|
|
|
machine.wait_for_file("${user.home}/.Xauthority")
|
|
|
|
machine.succeed("xauth merge ${user.home}/.Xauthority")
|
|
|
|
|
|
|
|
with subtest("Check that logging in has given the user ownership of devices"):
|
|
|
|
machine.succeed("getfacl -p /dev/snd/timer | grep -q ${user.name}")
|
|
|
|
|
|
|
|
with subtest("First time wizard"):
|
|
|
|
machine.wait_for_text("Default") # Language
|
|
|
|
machine.screenshot("wizard1")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
machine.screenshot("wizard2")
|
|
|
|
|
2020-05-25 12:50:24 +00:00
|
|
|
machine.wait_for_text("English") # Keyboard (default)
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard3")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
2020-05-25 12:50:24 +00:00
|
|
|
machine.wait_for_text("Standard") # Profile (default)
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard4")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
2020-05-25 12:50:24 +00:00
|
|
|
machine.wait_for_text("Title") # Sizing (default)
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard5")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
2020-05-25 12:50:24 +00:00
|
|
|
machine.wait_for_text("clicked") # Windows Focus
|
|
|
|
machine.succeed("xdotool mousemove 512 370 click 1") # Click
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard6")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
|
|
|
machine.wait_for_text("Connman") # Network Management (default)
|
|
|
|
machine.screenshot("wizard7")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
2023-05-20 02:10:21 +00:00
|
|
|
machine.wait_for_text("BlusZ") # Bluetooth Management (default)
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard8")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
2020-05-25 12:50:24 +00:00
|
|
|
machine.wait_for_text("OpenGL") # Compositing (default)
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.screenshot("wizard9")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
|
|
|
machine.wait_for_text("update") # Updates
|
|
|
|
machine.succeed("xdotool mousemove 512 495 click 1") # Disable
|
|
|
|
machine.screenshot("wizard10")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
|
|
|
machine.wait_for_text("taskbar") # Taskbar
|
|
|
|
machine.succeed("xdotool mousemove 480 410 click 1") # Enable
|
|
|
|
machine.screenshot("wizard11")
|
|
|
|
machine.succeed("xdotool mousemove 512 740 click 1") # Next
|
|
|
|
|
|
|
|
machine.wait_for_text("Home") # The desktop
|
|
|
|
machine.screenshot("wizard12")
|
|
|
|
|
|
|
|
with subtest("Run Terminology"):
|
2021-11-05 00:43:22 +00:00
|
|
|
machine.succeed("terminology >&2 &")
|
2020-05-02 14:28:50 +00:00
|
|
|
machine.sleep(5)
|
|
|
|
machine.send_chars("ls --color -alF\n")
|
|
|
|
machine.sleep(2)
|
|
|
|
machine.screenshot("terminology")
|
|
|
|
'';
|
|
|
|
})
|