tests/lomiri: nixfmt

This commit is contained in:
OPNA2608 2024-08-04 18:07:49 +02:00
parent 06013bc2c7
commit c384f677ea

View file

@ -1,19 +1,22 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: let
import ./make-test-python.nix (
{ pkgs, lib, ... }:
let
# Just to make sure everything is the same, need it for OCR & navigating greeter
user = "alice";
description = "Alice Foobar";
password = "foobar";
in {
in
{
name = "lomiri";
meta = {
maintainers = lib.teams.lomiri.members;
};
nodes.machine = { config, ... }: {
imports = [
./common/user-account.nix
];
nodes.machine =
{ config, ... }:
{
imports = [ ./common/user-account.nix ];
users.users.${user} = {
inherit description password;
@ -80,7 +83,8 @@ in {
};
# Help with OCR
systemd.tmpfiles.settings = let
systemd.tmpfiles.settings =
let
white = "255, 255, 255";
black = "0, 0, 0";
colorSection = color: {
@ -88,26 +92,31 @@ in {
Bold = true;
Transparency = false;
};
terminalColors = pkgs.writeText "customized.colorscheme" (lib.generators.toINI {} {
terminalColors = pkgs.writeText "customized.colorscheme" (
lib.generators.toINI { } {
Background = colorSection white;
Foreground = colorSection black;
Color2 = colorSection black;
Color2Intense = colorSection black;
});
terminalConfig = pkgs.writeText "terminal.ubports.conf" (lib.generators.toINI {} {
}
);
terminalConfig = pkgs.writeText "terminal.ubports.conf" (
lib.generators.toINI { } {
General = {
colorScheme = "customized";
fontSize = "16";
fontStyle = "Inconsolata";
};
});
}
);
confBase = "${config.users.users.${user}.home}/.config";
userDirArgs = {
mode = "0700";
user = user;
group = "users";
};
in {
in
{
"10-lomiri-test-setup" = {
"${confBase}".d = userDirArgs;
"${confBase}/terminal.ubports".d = userDirArgs;
@ -119,7 +128,9 @@ in {
enableOCR = true;
testScript = { nodes, ... }: ''
testScript =
{ nodes, ... }:
''
def toggle_maximise():
"""
Maximise the current window.
@ -346,4 +357,5 @@ in {
machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
'';
})
}
)