fix: the private key export screen opens again in the same session (closes #460)
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 was merged in pull request #478.
This commit is contained in:
+2
-4
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user