summaryrefslogtreecommitdiff
path: root/docker/scripts/screenshots.sh
diff options
context:
space:
mode:
authorcirakg <cirakg@cirakg.xyz>2026-10-25 23:51:52 +0100
committercirakg <cirakg@cirakg.xyz>2026-10-25 23:51:52 +0100
commitb8addc87f804789368612bf8e1be31a2bf28efe1 (patch)
treebece4051eb6f009eba05ffdd585420232741a7d7 /docker/scripts/screenshots.sh
parent140a6660f63f88d05ba9aae0bf1c4b401bb6574d (diff)
test(ui): second UI scenario, and the fixes it found
A second UI-test build (uitest-extra.jungle) covers the legacy PIN and the forced new PIN, Change and Reset PIN, a queued Require PIN, UPC-A, Code 39, the code error screen, the encoding progress, auto-lock on a barcode, the light theme and the glance without a code; the main flow adds the Steam and Library details and the menu's text screens. Fixed from what it found: Entry IDs tripped the watchdog with 110 entries; auto-lock didn't close a locked barcode; a queued Require PIN showed "Confirm in menu"; locked barcodes lacked the padlock; the PIN keypad's bottom row, the Reset PIN question, text-screen bottoms, the glance title and the light-theme warning colour. Goldens approved on all seven watches; only the Forerunner 70 was re-verified after the version bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docker/scripts/screenshots.sh')
-rwxr-xr-xdocker/scripts/screenshots.sh34
1 files changed, 26 insertions, 8 deletions
diff --git a/docker/scripts/screenshots.sh b/docker/scripts/screenshots.sh
index c0d91d6..6c3161f 100755
--- a/docker/scripts/screenshots.sh
+++ b/docker/scripts/screenshots.sh
@@ -11,7 +11,10 @@
# frozen clock, so every screenshot is reproducible. tools/ui_flow.py
# drives the app and checks the screens. Then the app is launched again and
# its glance, which now shows the favourite's code (the first run sealed it),
-# is checked as glance_code.png.
+# is checked as glance_code.png. Then the second UI-test build
+# (uitest-extra.jungle: legacy PIN, queued "Require PIN", more symbologies)
+# runs the extra scenario (ui_flow.py --scenario extra), and its glance,
+# without a code, is checked as glance.png.
set -euo pipefail
# shellcheck source=ciq-env.sh
source "$(dirname "${BASH_SOURCE[0]}")/ciq-env.sh"
@@ -22,6 +25,7 @@ ciq_require_key
for device in "$@"; do
build-app.sh uitest "${device}"
+ build-app.sh uitest-extra "${device}"
done
ciq_start_display
@@ -29,15 +33,16 @@ ciq_start_simulator
out="${BUILD_DIR}/screenshots"
-# A new launch starts in the glance; screenshot it before anything opens the app.
+# A new launch of MODE's build starts in the glance; screenshot it as SCREEN
+# (its "DIAG shown" name) before anything opens the app.
shoot_glance() {
- local device="$1" glance_log="${out}/$1/glance.log"
+ local device="$1" mode="$2" screen="$3" glance_log="${out}/$1/${3}.log"
: >"${glance_log}"
- monkeydo "${BUILD_DIR}/uitest/${device}.prg" "${device}" >>"${glance_log}" 2>&1 &
+ monkeydo "${BUILD_DIR}/${mode}/${device}.prg" "${device}" >>"${glance_log}" 2>&1 &
CIQ_MONKEYDO_PID=$!
local shown=0
for _ in $(seq 1 600); do
- if grep -q "DIAG shown glance_code" "${glance_log}"; then
+ if grep -Eq "DIAG shown ${screen}[[:space:]]*$" "${glance_log}"; then
shown=1
break
fi
@@ -45,12 +50,12 @@ shoot_glance() {
done
if ((shown == 0)); then
ciq_stop_app
- log "${device}: the glance with the favourite's code didn't appear; see ${glance_log}"
+ log "${device}: the glance (${screen}) didn't appear; see ${glance_log}"
return 1
fi
sleep 1
local status=0
- python3 /work/tools/ui_flow.py --shot glance_code --device-dir "${CIQ_HOME}/Devices/${device}" \
+ python3 /work/tools/ui_flow.py --shot "${screen}" --device-dir "${CIQ_HOME}/Devices/${device}" \
--window "$(ciq_simulator_window)" --out "${out}/${device}" --golden "/work/test/golden/${device}" \
"${approve[@]}" || status=1
ciq_stop_app
@@ -73,7 +78,20 @@ for device in "$@"; do
--window "$(ciq_simulator_window)" --out "${out}/${device}" --golden "/work/test/golden/${device}" \
"${approve[@]}" || failed=1
ciq_stop_app
- shoot_glance "${device}" || failed=1
+ shoot_glance "${device}" uitest glance_code || failed=1
+ # The extra scenario: its own build and launch (README 17.4).
+ extra_log="${out}/${device}/app-extra.log"
+ if ! ciq_launch_app "${device}" "${extra_log}" uitest-extra; then
+ ciq_stop_app
+ log "no first frame of the extra scenario on ${device}; see ${extra_log}"
+ failed=1
+ continue
+ fi
+ python3 /work/tools/ui_flow.py --scenario extra --device-dir "${CIQ_HOME}/Devices/${device}" --log "${extra_log}" \
+ --window "$(ciq_simulator_window)" --out "${out}/${device}" --golden "/work/test/golden/${device}" \
+ "${approve[@]}" || failed=1
+ ciq_stop_app
+ shoot_glance "${device}" uitest-extra glance || failed=1
done
((failed == 0)) || die "screenshot checks failed; see build/screenshots/"