test: the private-key export screen has no e2e coverage, unlike the recovery-phrase screen #253

Closed
opened 2026-08-12 10:39:41 +02:00 by clawbot · 1 comment
Collaborator

The e2e suite's secret-screen cases are all show-phrase (from #161). export-privkey has none, even though #248 has just given it the same leave-hook and post-await liveness machinery.

Raised by the independent review of that PR and deliberately left out of its scope — its definition of done did not ask for e2e coverage, and popup init is already exercised where a ReferenceError in the touched views would surface.

Worth closing anyway: make check is prettier --check plus unit tests and cannot see a runtime error in a view handler, which is exactly how #150 and #151 shipped. The unit tests for this screen drive a stub DOM, so the real reveal-and-wipe path has never run in a browser.

Implementation requirements

  • Mirror the existing show-phrase e2e cases for export-privkey rather than inventing a new shape — the two screens now share their machinery, and the assertions should look the same.
  • Cover at minimum: the key is revealed after a correct password; leaving by the settings gear clears it from the DOM; leaving DURING the decrypt never puts it in the DOM.
  • Assert against the real rendered document, not a stub.

Definition of done

  • make test-e2e drives export-privkey through reveal and through both leave routes.
  • Removing the leave hook or the liveness guard makes the e2e run fail — demonstrated, with captured output.
  • TODO.md updated in the same commit.
  • make check passes.
The e2e suite's secret-screen cases are all `show-phrase` (from https://git.eeqj.de/sneak/AutistMask/issues/161). `export-privkey` has none, even though https://git.eeqj.de/sneak/AutistMask/pulls/248 has just given it the same leave-hook and post-await liveness machinery. Raised by the independent review of that PR and deliberately left out of its scope — its definition of done did not ask for e2e coverage, and popup init is already exercised where a `ReferenceError` in the touched views would surface. Worth closing anyway: `make check` is `prettier --check` plus unit tests and cannot see a runtime error in a view handler, which is exactly how https://git.eeqj.de/sneak/AutistMask/issues/150 and https://git.eeqj.de/sneak/AutistMask/issues/151 shipped. The unit tests for this screen drive a stub DOM, so the real reveal-and-wipe path has never run in a browser. ## Implementation requirements - Mirror the existing `show-phrase` e2e cases for `export-privkey` rather than inventing a new shape — the two screens now share their machinery, and the assertions should look the same. - Cover at minimum: the key is revealed after a correct password; leaving by the settings gear clears it from the DOM; leaving DURING the decrypt never puts it in the DOM. - Assert against the real rendered document, not a stub. ## Definition of done - [ ] `make test-e2e` drives `export-privkey` through reveal and through both leave routes. - [ ] Removing the leave hook or the liveness guard makes the e2e run fail — demonstrated, with captured output. - [ ] `TODO.md` updated in the same commit. - [ ] `make check` passes.
Author
Collaborator

Covered in #462: the Chrome suite drives the export screen through reveal, leaving by the settings gear, and leaving mid-decrypt, on the imported key wallet.

Two defects it ran into, filed rather than fixed here: #460 (a second open in one popup session throws) and #461 (Back after the gear lands on the emptied screen with no address selected).

Model: opus-5-5

Covered in https://git.eeqj.de/sneak/AutistMask/pulls/462: the Chrome suite drives the export screen through reveal, leaving by the settings gear, and leaving mid-decrypt, on the imported key wallet. Two defects it ran into, filed rather than fixed here: https://git.eeqj.de/sneak/AutistMask/issues/460 (a second open in one popup session throws) and https://git.eeqj.de/sneak/AutistMask/issues/461 (Back after the gear lands on the emptied screen with no address selected). Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#253