diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-25 23:51:52 +0100 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-25 23:51:52 +0100 |
| commit | b8addc87f804789368612bf8e1be31a2bf28efe1 (patch) | |
| tree | bece4051eb6f009eba05ffdd585420232741a7d7 /source/util | |
| parent | 140a6660f63f88d05ba9aae0bf1c4b401bb6574d (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 'source/util')
| -rw-r--r-- | source/util/TestMode.mc | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/source/util/TestMode.mc b/source/util/TestMode.mc index e583ecf..6439be1 100644 --- a/source/util/TestMode.mc +++ b/source/util/TestMode.mc @@ -1,25 +1,43 @@ // Author: cirakg & claude ai // Summary: Switch for the UI-test build: a frozen clock, a short auto-lock and a store reset to fake entries. // -// Two versions of this module exist; each build keeps exactly one: +// Three versions of this module exist; each build keeps exactly one: // * (:no_uitest), in every normal build (debug, release, unit tests): // ON is false and nothing changes. -// * (:uitest), only with uitest.jungle (`make screenshots`): the clock is -// frozen at NOW, so codes and countdowns in screenshots never change; the -// store is wiped and filled with fake entries at every start +// * (:uitest), only in the UI-test builds (`make screenshots`): the clock +// is frozen at NOW, so codes and countdowns in screenshots never change; +// the store is wiped and filled with fake entries at every start // (source/app/Fixtures.mc); auto-lock is short enough to test. +// SCENARIO picks the fixture: SCENARIO_MAIN (uitest.jungle: the import, +// the forms and the demo entries) or SCENARIO_EXTRA +// (uitest-extra.jungle: a legacy PIN, a queued "Require PIN", more +// symbologies and an invalid code), each in its own build, since a +// launch can't pass arguments to the app. // The constant-condition checks on ON are resolved by the compiler, so the // unused branch costs nothing. import Toybox.Lang; -(:uitest, :glance) +(:uitest, :uitest_main, :glance) module TestMode { const ON = true; // 2027-01-15 08:00:26 UTC: 4 s left in a 30 s period, so the detail // screen shows the next code too. const NOW = 1800000026l; const AUTO_LOCK_MS = 10000; + const SCENARIO_MAIN = 0; + const SCENARIO_EXTRA = 1; + const SCENARIO = SCENARIO_MAIN; +} + +(:uitest, :uitest_extra, :glance) +module TestMode { + const ON = true; + const NOW = 1800000026l; + const AUTO_LOCK_MS = 10000; + const SCENARIO_MAIN = 0; + const SCENARIO_EXTRA = 1; + const SCENARIO = SCENARIO_EXTRA; } (:no_uitest, :glance) @@ -27,4 +45,7 @@ module TestMode { const ON = false; const NOW = 0l; const AUTO_LOCK_MS = 0; + const SCENARIO_MAIN = 0; + const SCENARIO_EXTRA = 1; + const SCENARIO = SCENARIO_MAIN; } |
