fix: the private key export screen opens again in the same session (closes #460)
check / check (push) Successful in 5m47s
e2e / e2e-chrome (push) Successful in 5m18s
e2e / e2e-firefox (push) Successful in 2m44s

show() found the address line through the element inside it, then
replaced the line's contents with renderAddressHtml(), which deleted
that element, so the next show() in the same popup session threw
before it navigated. The line now carries the export-privkey-address
id itself and is looked up by it. No other view that renders an
address finds its container through a child.

The jest DOM stub now takes an element out of the document when its
parent's contents are replaced, and a new test opens the screen
twice. The #253 e2e case no longer reopens the popup before its
second open.

Model: opus-5-5
This commit is contained in:
2026-10-06 14:05:13 +00:00
parent 0206b2f77e
commit 64a9850d97
5 changed files with 51 additions and 15 deletions
+2 -4
View File
@@ -1104,10 +1104,8 @@ test("leaving by the settings gear wipes the private key (#253)", async (env) =>
test("leaving while the decrypt is in flight reveals no private key (#253)", async (env) => {
try {
await leavePrivkeyScreen(env.page);
// The export screen cannot yet be opened twice in one popup session
// (https://git.eeqj.de/sneak/AutistMask/issues/460), so this second
// open gets a fresh one.
await reopenPopup(env, "main");
// The second open in this popup session
// (https://git.eeqj.de/sneak/AutistMask/issues/460).
await openPrivkeyScreen(env.page);
await env.page.fill("#export-privkey-password", PASSWORD);
const inFlight = await env.page.evaluate(() => {