test: drive ConfirmTx in the e2e suite, gate assertion included (closes #238)
All checks were successful
check / check (push) Successful in 38s
All checks were successful
check / check (push) Successful in 38s
ConfirmTx -- the screen that decides what gets signed -- had no automated coverage of its own behaviour. The arithmetic underneath was well tested; the wiring was not, so a mutant making the spend gate read the displayed fee estimate instead of the reserve would have reintroduced the #154 overspend with the suite still green. Nine end-to-end tests now drive it for both the native and ERC-20 paths, covering the pending, funded, over-balance and estimate-failed states, and asserting that the gate reads the reserve rather than the estimate. Swapping the two makes the suite fail. The view height is asserted constant across every state transition rather than merely printed. Reaching the screen needs a funded balance and a gas estimate, so the route interception gains fixtures for both. Testing the estimate-failed state means provoking the console error the code is supposed to emit, which the harness otherwise fails a run on; an expectation mechanism consumes exactly one matching record, is scoped to the declaring test, and fails that test if nothing matched, so it cannot mask an unrelated error.
This commit was merged in pull request #258.
This commit is contained in:
8
TODO.md
8
TODO.md
@@ -44,6 +44,14 @@ undefined identifiers, which is how
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-08-12: The transaction confirmation screen has browser coverage. The
|
||||
end-to-end suite reaches ConfirmTx for both the native ETH and the ERC-20 path
|
||||
off a funded-balance fixture, and asserts the pending, funded, over-balance
|
||||
and estimate-failed states, the fee block quoting the estimate and the reserve
|
||||
separately, and a constant view height across every one of those transitions.
|
||||
The load-bearing assertion is that the spend gate reads the reserve and not
|
||||
the displayed estimate: swapping the two fails the suite
|
||||
([#238](https://git.eeqj.de/sneak/AutistMask/issues/238)).
|
||||
- 2026-08-12: The dust threshold field now explains a rejection instead of
|
||||
snapping back in silence, with the parse in a pure, unit-tested module that
|
||||
accepts plain decimal digits only — hex and exponent notation are refused
|
||||
|
||||
Reference in New Issue
Block a user