689241c96391

fix: Add recovery confirmation smoke test (v3.9.7)

time
2026-06-11 19:11 UTC · 4 months ago
machine
koh2
parent
e72ba4aef3cf
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1tests/lock-screen.spec.ts+29 −0
manifest.firefox.json+1 −1
@@ -2,7 +2,7 @@22   "_comment_audio_capture": "Firefox does not honor the Chrome 'audioCapture' optional_permission — getUserMedia in WebExtensions is gated solely by the runtime permission prompt. Microphone access for chirp pairing works from the popup under the existing '<all_urls>' host permission; no manifest entry is required or accepted here.",33   "manifest_version": 3,44   "name": "Peach Password Manager",5-  "version": "3.9.5",5+  "version": "3.9.7",66   "description": "Zero-knowledge password manager",77   "browser_specific_settings": {88     "gecko": {

view file

manifest.json+1 −1
@@ -1,7 +1,7 @@11 {22   "manifest_version": 3,33   "name": "Peach Password Manager",4-  "version": "3.9.5",4+  "version": "3.9.7",55   "description": "Zero-knowledge password manager",66   "action": {77     "default_popup": "src/popup/index.html",

view file

package.json+1 −1
@@ -1,6 +1,6 @@11 {22   "name": "peach",3-  "version": "3.9.5",3+  "version": "3.9.7",44   "description": "Zero-knowledge password manager",55   "license": "GPL-3.0-only",66   "type": "module",

view file

tests/lock-screen.spec.ts+29 −0
@@ -59,6 +59,27 @@5959   return { popup, extId };6060 }6161 62+async function completeRecoveryConfirmation(popup: Page) {63+  const recoveryWords = popup.locator(".peach-recovery-word-text");64+  const confirmInputs = popup.locator(".peach-recovery-confirm-input");65+  const confirmButton = popup.getByRole("button", { name: /i wrote them down/i });66+67+  await expect(confirmInputs).toHaveCount(3);68+  await expect(confirmInputs.first()).toBeEnabled({ timeout: 7000 });69+70+  const words = await recoveryWords.allTextContents();71+  const confirmedWords = [words[2], words[6], words[10]];72+  for (let i = 0; i < confirmedWords.length; i++) {73+    const word = confirmedWords[i]?.trim();74+    if (!word) throw new Error(`missing recovery word at position ${i}`);75+    await confirmInputs.nth(i).fill(word);76+  }77+78+  await expect(confirmButton).toBeEnabled({ timeout: 2000 });79+  await confirmButton.click();80+  await expect(popup.locator(".peach-lock-btn[aria-label='Lock vault']")).toBeVisible({ timeout: 5000 });81+}82+6283 async function lockVault(popup: Page) {6384   await popup.locator(".peach-lock-btn[aria-label='Lock vault']").click();6485   await popup.waitForTimeout(500);@@ -133,6 +154,14 @@133154     await expect(popup.locator(".peach-recovery-word-item")).toHaveCount(12);134155     await expect(popup.getByRole("button", { name: /i wrote them down/i })).toBeVisible({ timeout: 5000 });135156 157+    await ctx.close();158+  });159+160+  test("LS07c - recovery confirmation returns to the unlocked vault", async () => {161+    const { popup } = await setupVault(ctx, "correct horse battery staple");162+    await completeRecoveryConfirmation(popup);163+164+    await expect(popup.locator(".peach-lock-btn[aria-label='Lock vault']")).toBeVisible({ timeout: 5000 });136165     await ctx.close();137166   });138167 

view file