1 import ./make-test-python.nix (
4 name = "lomiri-system-settings-standalone";
5 meta.maintainers = lib.teams.lomiri.members;
14 services.xserver.enable = true;
17 systemPackages = with pkgs.lomiri; [
19 lomiri-system-settings
22 UITK_ICON_THEME = "suru";
26 i18n.supportedLocales = [ "all" ];
28 fonts.packages = with pkgs; [
29 # Intended font & helps with OCR
33 services.upower.enable = true;
50 element = "discoverable|None detected";
52 # only text we can really look for with VPN is on a button, OCR on CI struggles with it
56 element = "Add|Manual|Configuration";
62 element = "Background image|blur effects";
67 element = "workspaces|Icon size";
72 element = "Silent Mode|Message sound";
77 element = "Display language|External keyboard";
80 name = "notification";
82 element = "Apps that notify";
87 element = "Edge drag";
92 element = "Cursor speed|Wheel scrolling speed";
97 element = "Time zone|Set the time and date";
102 name = "security-privacy";
104 element = "Locking|unlocking|permissions";
105 elementLocalised = "Sperren|Entsperren|Berechtigungen";
112 with subtest("lomiri system settings launches"):
113 machine.execute("lomiri-system-settings >&2 &")
114 machine.wait_for_text("System Settings")
115 machine.screenshot("lss_open")
117 # Move focus to start of plugins list for following list of tests
118 machine.send_key("tab")
119 machine.send_key("tab")
120 machine.screenshot("lss_focus")
122 # tab through & open all sub-menus, to make sure none of them fail
124 + (lib.strings.concatMapStringsSep "\n" (
127 machine.send_key("tab")
128 machine.send_key("kp_enter")
130 + lib.optionalString (!(page.skipOCR or false)) ''
131 with subtest("lomiri system settings ${page.name} works"):
132 machine.wait_for_text(r"(${page.element})")
133 machine.screenshot("lss_page_${page.name}")
138 machine.execute("pkill -f lomiri-system-settings")
140 with subtest("lomiri system settings localisation works"):
141 machine.execute("env LANG=de_DE.UTF-8 lomiri-system-settings >&2 &")
142 machine.wait_for_text("Systemeinstellungen")
143 machine.screenshot("lss_localised_open")
145 # Move focus to start of plugins list for following list of tests
146 machine.send_key("tab")
147 machine.send_key("tab")
148 machine.screenshot("lss_focus_localised")
151 + (lib.strings.concatMapStringsSep "\n" (
154 machine.send_key("tab")
155 machine.send_key("kp_enter")
157 + lib.optionalString (page.type == "external") ''
158 with subtest("lomiri system settings ${page.name} localisation works"):
159 machine.wait_for_text(r"(${page.elementLocalised})")
160 machine.screenshot("lss_localised_page_${page.name}")