mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
tests/lomiri-calculator-app: init
This commit is contained in:
parent
acd87b6984
commit
7a3cb59d2a
@ -522,6 +522,7 @@ in {
|
||||
lxd-image-server = handleTest ./lxd-image-server.nix {};
|
||||
#logstash = handleTest ./logstash.nix {};
|
||||
lomiri = handleTest ./lomiri.nix {};
|
||||
lomiri-calculator-app = runTest ./lomiri-calculator-app.nix;
|
||||
lomiri-filemanager-app = runTest ./lomiri-filemanager-app.nix;
|
||||
lomiri-system-settings = handleTest ./lomiri-system-settings.nix {};
|
||||
lorri = handleTest ./lorri/default.nix {};
|
||||
|
59
nixos/tests/lomiri-calculator-app.nix
Normal file
59
nixos/tests/lomiri-calculator-app.nix
Normal file
@ -0,0 +1,59 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "lomiri-calculator-app-standalone";
|
||||
meta.maintainers = lib.teams.lomiri.members;
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./common/x11.nix ];
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs.lomiri; [
|
||||
suru-icon-theme
|
||||
lomiri-calculator-app
|
||||
];
|
||||
variables = {
|
||||
UITK_ICON_THEME = "suru";
|
||||
};
|
||||
};
|
||||
|
||||
i18n.supportedLocales = [ "all" ];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
# Intended font & helps with OCR
|
||||
ubuntu_font_family
|
||||
];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_x()
|
||||
|
||||
with subtest("lomiri calculator launches"):
|
||||
machine.execute("lomiri-calculator-app >&2 &")
|
||||
machine.wait_for_text("Calculator")
|
||||
machine.screenshot("lomiri-calculator")
|
||||
|
||||
with subtest("lomiri calculator works"):
|
||||
machine.send_key("tab") # Fix focus
|
||||
|
||||
machine.send_chars("22*16\n")
|
||||
machine.wait_for_text("352")
|
||||
machine.screenshot("lomiri-calculator_caninfactdobasicmath")
|
||||
|
||||
machine.succeed("pkill -f lomiri-calculator-app")
|
||||
|
||||
with subtest("lomiri calculator localisation works"):
|
||||
machine.execute("env LANG=de_DE.UTF-8 lomiri-calculator-app >&2 &")
|
||||
machine.wait_for_text("Rechner")
|
||||
machine.screenshot("lomiri-calculator_localised")
|
||||
|
||||
# History of previous run should have loaded
|
||||
with subtest("lomiri calculator history works"):
|
||||
machine.wait_for_text("352")
|
||||
'';
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
fetchFromGitLab,
|
||||
fetchpatch,
|
||||
gitUpdater,
|
||||
nixosTests,
|
||||
cmake,
|
||||
gettext,
|
||||
lomiri-ui-toolkit,
|
||||
@ -91,6 +92,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests.vm = nixosTests.lomiri-calculator-app;
|
||||
updateScript = gitUpdater { rev-prefix = "v"; };
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user