From 709f016c92a4ba7ce9c31da71e8d73dedc43268a Mon Sep 17 00:00:00 2001 From: spacedandy-agents-simplex <342056592+spacedandy-agents-simplex@users.noreply.github.com> Date: Mon, 19 Oct 2026 11:21:56 +0000 Subject: [PATCH] ci: pick the desktop test server's "To resolve names" role by the menu's first item That menu opens over the server address's QR code, where OCR can miss its "yes" (run 39242250150 failed its setup three times on it), so the smoke test finds the menu's first item, which repeats the field's value and reads well, and clicks the row under it. The check that the role is now yes stays. [claude-test:desktop] [ci-backend] --- scripts/ci/desktop-linux/smoke-test.sh | 27 +++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/scripts/ci/desktop-linux/smoke-test.sh b/scripts/ci/desktop-linux/smoke-test.sh index d436fcff13..5d5088c9f0 100755 --- a/scripts/ci/desktop-linux/smoke-test.sh +++ b/scripts/ci/desktop-linux/smoke-test.sh @@ -584,6 +584,25 @@ create_local_chat() { # Clicks a server role's value until its dropdown shows. The menu is open when an item reads exactly "yes", which no # role's value does ("default (yes)", "default (no)", "no"); it can take longer to show than OCR takes to read the screen. +# The first item of the dropdown opened from the line at y $2, which repeats that line's value below it. +menu_first_item() { + local target line x y deadline=$((SECONDS + 10)) + target=$(normalise "$1") + while [ "$SECONDS" -lt "$deadline" ]; do + while IFS= read -r line; do + x=${line%%,*} + y=${line#*,} + y=${y%% *} + if [ "$x" -lt 390 ] && [ "$y" -gt $(($2 + 20)) ] && [ "$(normalise "${line#* }")" = "$target" ]; then + echo "$x $y" + return 0 + fi + done < <("$ui" text) + sleep 1 + done + return 1 +} + open_role_menu() { for _ in 1 2 3; do "$ui" click-text "$1" 10 || return 1 @@ -625,9 +644,11 @@ use_names_server() { # OCR misreads the short "no", the item after "yes" read -r x y < <(left_pane_position yes exact) || fail "the \"To receive\" menu closed" "$ui" click "$x" $((y + 48)) - open_role_menu "default (no)" || fail "no menu for the test server's \"To resolve names\"" - read -r x y < <(left_pane_position yes exact) || fail "the \"To resolve names\" menu closed" - "$ui" click "$x" "$y" + # this menu opens over the address's QR code, where OCR can miss "yes", so it is the row under the menu's first item + y=$(y_of "To resolve names") + "$ui" click-text "default (no)" 10 + read -r x y < <(menu_first_item "default (no)" "$y") || fail "no menu for the test server's \"To resolve names\"" + "$ui" click "$x" $((y + 48)) "$ui" shot names-server-roles # the first "default (yes)" and the first "yes" are on the lines after "To receive", so it is no in_line_with "default (yes)" "For private routing" || fail "the test server's \"To receive\" is still its default"