From 5d4149dff01a8ad92f95ae475a2aa31826ffd421 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sat, 21 Nov 2026 00:13:08 +0800 Subject: [PATCH] Open Native Shell Settings through its GTK action in NixOS tests The offline interface test timed out before exercising the switch because its synthetic X11 shortcut did not open Settings. Activate the registered Settings action in the desktop session and keep the UI checks for the switch and relaunch. --- nix/tests/desktop-interfaces.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nix/tests/desktop-interfaces.nix b/nix/tests/desktop-interfaces.nix index b52d397..8e4a91c 100644 --- a/nix/tests/desktop-interfaces.nix +++ b/nix/tests/desktop-interfaces.nix @@ -41,6 +41,7 @@ pkgs.testers.runNixOSTest { }; testScript = '' + from datetime import timedelta import shlex machine.start() @@ -66,8 +67,11 @@ pkgs.testers.runNixOSTest { launch() wait_for_gui("gpgui-nsh") machine.succeed(as_alice("test ! -e ~/.config/gpclient/gui")) - machine.succeed(as_alice("xdotool search --onlyvisible --name '^GP Connect$' windowactivate --sync key ctrl+comma")) - machine.wait_until_succeeds(as_alice("xdotool search --onlyvisible --name '^GP Connect Settings$'")) + machine.succeed(as_alice("${pkgs.glib.bin}/bin/gapplication action com.yuezk.gpgui settings")) + machine.wait_until_succeeds( + as_alice("xdotool search --onlyvisible --name '^GP Connect Settings$'"), + timeout=timedelta(seconds=60), + ) machine.screenshot("native-shell-settings") machine.wait_until_succeeds(as_alice("GI_TYPELIB_PATH=${typelibs} ${chooseTauri}")) wait_for_gui("gpgui")