2023-10-31 00:06:08 +00:00
|
|
|
import ./make-test-python.nix (
|
|
|
|
{ lib, ... }:
|
|
|
|
{
|
|
|
|
name = "archi";
|
|
|
|
meta.maintainers = with lib.maintainers; [ paumr ];
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
nodes.machine =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./common/x11.nix
|
|
|
|
];
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
environment.systemPackages = with pkgs; [ archi ];
|
|
|
|
};
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
enableOCR = true;
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
testScript = ''
|
|
|
|
machine.wait_for_x()
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
with subtest("createEmptyModel via CLI"):
|
|
|
|
machine.succeed("Archi -application com.archimatetool.commandline.app -consoleLog -nosplash --createEmptyModel --saveModel smoke.archimate")
|
|
|
|
machine.copy_from_vm("smoke.archimate", "")
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
with subtest("UI smoketest"):
|
|
|
|
machine.succeed("DISPLAY=:0 Archi --createEmptyModel >&2 &")
|
|
|
|
machine.wait_for_window("Archi")
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
# wait till main UI is open
|
2024-05-06 20:23:29 +00:00
|
|
|
# since OCR seems to be buggy wait_for_text was replaced by sleep, issue: #302965
|
|
|
|
# machine.wait_for_text("Welcome to Archi")
|
|
|
|
machine.sleep(20)
|
2024-12-10 19:26:33 +00:00
|
|
|
|
2023-10-31 00:06:08 +00:00
|
|
|
machine.screenshot("welcome-screen")
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|