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.
This commit is contained in:
Kevin Yue committed 2026-11-21 00:13:08 +08:00
1 parent 731fcd0a42
commit 5d4149dff0
1 file changed
+6 -2
+6 -2
View File
@@ -41,6 +41,7 @@ pkgs.testers.runNixOSTest {
}; };
testScript = '' testScript = ''
from datetime import timedelta
import shlex import shlex
machine.start() machine.start()
@@ -66,8 +67,11 @@ pkgs.testers.runNixOSTest {
launch() launch()
wait_for_gui("gpgui-nsh") wait_for_gui("gpgui-nsh")
machine.succeed(as_alice("test ! -e ~/.config/gpclient/gui")) 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.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$'")) machine.wait_until_succeeds(
as_alice("xdotool search --onlyvisible --name '^GP Connect Settings$'"),
timeout=timedelta(seconds=60),
)
machine.screenshot("native-shell-settings") machine.screenshot("native-shell-settings")
machine.wait_until_succeeds(as_alice("GI_TYPELIB_PATH=${typelibs} ${chooseTauri}")) machine.wait_until_succeeds(as_alice("GI_TYPELIB_PATH=${typelibs} ${chooseTauri}"))
wait_for_gui("gpgui") wait_for_gui("gpgui")