test: WaitTx's timeout and consecutive-failed-lookup exit branches have no e2e coverage #315

Open
opened 2026-08-20 12:17:13 +02:00 by clawbot · 0 comments
Collaborator

Found while implementing #305. Not a defect — a coverage gap, and now cheap to close.

The e2e fixture previously answered eth_getTransactionReceipt with a constant null, so no test had ever driven WaitTx to a receipt at all. #314 adds opts.seedReceipt to the fixture, which gives the success path its first coverage and makes the receipt answer switchable.

Two exit branches remain unexercised, both documented in README.md's WaitTx screen map:

  • the 60-second confirmation timeout — a lookup that answers "no receipt" 60 seconds or more after broadcast;
  • six consecutive failed lookups, which ends the wait with a distinct message naming the unreachable network and pointing at the RPC URL in Settings.

These are different facts with different copy, and the second exists precisely so an RPC that never answers cannot leave the wait running indefinitely. Neither is asserted anywhere.

Definition of done

  • An e2e case drives the confirmation timeout and asserts #view-error-tx renders with the timeout message.
  • An e2e case drives six consecutive failed lookups and asserts #view-error-tx renders with the unreachable-network message, distinct from the timeout message.
  • Both assert the popup is exitable afterwards (the "Done" button returns to the expected screen).
  • Both fail if their branch is removed — state the mutation used and its observed result.
  • Depends on the seedReceipt fixture hook from #314; land after it.
  • make check green and make test-e2e green.
Found while implementing https://git.eeqj.de/sneak/AutistMask/issues/305. Not a defect — a coverage gap, and now cheap to close. The e2e fixture previously answered `eth_getTransactionReceipt` with a constant `null`, so no test had ever driven `WaitTx` to a receipt at all. https://git.eeqj.de/sneak/AutistMask/pulls/314 adds `opts.seedReceipt` to the fixture, which gives the success path its first coverage and makes the receipt answer switchable. Two exit branches remain unexercised, both documented in `README.md`'s WaitTx screen map: - the 60-second confirmation timeout — a lookup that answers "no receipt" 60 seconds or more after broadcast; - six consecutive failed lookups, which ends the wait with a distinct message naming the unreachable network and pointing at the RPC URL in Settings. These are different facts with different copy, and the second exists precisely so an RPC that never answers cannot leave the wait running indefinitely. Neither is asserted anywhere. ## Definition of done - [ ] An e2e case drives the confirmation timeout and asserts `#view-error-tx` renders with the timeout message. - [ ] An e2e case drives six consecutive failed lookups and asserts `#view-error-tx` renders with the unreachable-network message, distinct from the timeout message. - [ ] Both assert the popup is exitable afterwards (the "Done" button returns to the expected screen). - [ ] Both fail if their branch is removed — state the mutation used and its observed result. - [ ] Depends on the `seedReceipt` fixture hook from https://git.eeqj.de/sneak/AutistMask/pulls/314; land after it. - [ ] `make check` green and `make test-e2e` green.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#315