mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 15:06:14 -05:00
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:
1 file changed
+6
-2
@@ -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")
|
||||||
|
|||||||
Reference in new issue
Block a user