From 6525fbbaf3edea461444013d7150be18952e0b12 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 2 Aug 2025 00:28:10 +0200 Subject: [PATCH] nixosTests.lomiri: Fix session & keymap tests - Mouse click location for Log Out button was off - Greeter actually renders the wallpaper we set! Which was causing new issues - Invert the colours of the wallpaper, so we can keep looking for white greeter text - Start looking for text from the wallpaper, as it's easier to find than AM/PM --- nixos/tests/lomiri.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nixos/tests/lomiri.nix b/nixos/tests/lomiri.nix index b332fcba8da2..d65682c8e2ee 100644 --- a/nixos/tests/lomiri.nix +++ b/nixos/tests/lomiri.nix @@ -64,7 +64,7 @@ let ]; } '' - magick -size 640x480 canvas:white -pointsize 30 -fill black -annotate +100+100 '${wallpaperText}' $out + magick -size 640x480 canvas:black -pointsize 30 -fill white -annotate +100+100 '${wallpaperText}' $out ''; lomiriWallpaperDconfSettings = pkgs: { @@ -703,7 +703,8 @@ in machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'") # Start page shows current time - wait_for_text(r"(AM|PM)") + # And the greeter *actually* renders our wallpaper! + wait_for_text(r"(AM|PM|Lorem|ipsum)") machine.screenshot("lomiri_greeter_launched") # Advance to login part @@ -717,6 +718,7 @@ in # Output rendering from Lomiri has started when it starts printing performance diagnostics machine.wait_for_console_text("Last frame took") + # And the desktop doesn't render the wallpaper anymore. Grumble grumble... # Look for datetime's clock, one of the last elements to load wait_for_text(r"(AM|PM)") machine.screenshot("lomiri_launched") @@ -819,7 +821,7 @@ in ocr = [ "Log Out" ]; extraCheck = '' # We should be able to log out and return to the greeter - mouse_click(600, 280) # "Log Out" + mouse_click(600, 250) # "Log Out" mouse_click(340, 220) # confirm logout machine.wait_until_fails("pgrep -u ${user} -f 'lomiri --mode=full-shell'") '';