diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-19 22:28:09 +0200 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-19 22:28:09 +0200 |
| commit | 2373b6f02ef027a423762d5d6349cd9e0f36090e (patch) | |
| tree | 7509b0b1905d7c593074bba8ed4c94e30e437604 /test/storage | |
| parent | 35042ff04ffc50e55ff59a385849442be4429d6b (diff) | |
test(ui): drive the simulator with a scripted flow and check every screen
tools/ui_flow.py clicks buttons and taps from the device files, waits for
DIAG shown lines and compares 10 screens per watch with goldens on four
test and three spot-check devices. Adds the fixture-wrap generator, UI
logic tests and driver tests; the launcher opens apps from their glance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'test/storage')
| -rw-r--r-- | test/storage/PinTest.mc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/storage/PinTest.mc b/test/storage/PinTest.mc index 7dc677d..0212936 100644 --- a/test/storage/PinTest.mc +++ b/test/storage/PinTest.mc @@ -248,3 +248,16 @@ function pinKeyBuffersAreWiped(logger as Test.Logger) as Boolean { keys.wipe(); return derived && wiped && StorageFixtures.allZero(keys.encKey) && StorageFixtures.allZero(keys.macKey); } + +// The UI-test fixture's wrap was computed in Python (tools/gen_fixture_wrap.py); +// the app's unlock code must accept it with the fixture PIN and recover the +// fixture master key, which cross-checks the wrap format. +(:test) +function pinOpensThePythonComputedFixtureWrap(logger as Test.Logger) as Boolean { + var store = new MemoryBackend(); + store.setValue(KeyManager.WRAP_KEY, Bytes.fromHex(Fixtures.FIXTURE_WRAP)); + var vault = new Vault(store, new FakeTime()); + var wrongRejected = !StorageFixtures.unlock(vault, StorageFixtures.OTHER_PIN); + var opened = StorageFixtures.unlock(vault, Fixtures.FIXTURE_PIN); + return wrongRejected && opened && Bytes.equal(vault.session.masterKey(), Bytes.fromHex(Fixtures.FIXTURE_MASTER_KEY)); +} |
