From 2373b6f02ef027a423762d5d6349cd9e0f36090e Mon Sep 17 00:00:00 2001 From: cirakg Date: Mon, 19 Oct 2026 22:28:09 +0200 Subject: 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 --- test/storage/PinTest.mc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/storage') 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)); +} -- cgit v1.2.3