e72ba4aef3cf

fix: Smoke test recovery screen onboarding flow (v3.9.5)

time
2026-06-11 16:58 UTC · 4 months ago
machine
koh2
parent
99c85210eeb0
4 files manifest.firefox.json+1 −1manifest.json+1 −1package.json+1 −1tests/lock-screen.spec.ts+21 −1
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.3",5+  "version": "3.9.5",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.3",4+  "version": "3.9.5",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.3",3+  "version": "3.9.5",44   "description": "Zero-knowledge password manager",55   "license": "GPL-3.0-only",66   "type": "module",

view file

tests/lock-screen.spec.ts+21 −1
@@ -39,12 +39,22 @@3939 4040 async function setupVault(ctx: BrowserContext, password = "password123") {4141   const { popup, extId } = await loadPopup(ctx);42+  const advanceButton = popup.getByRole("button", { name: /next|get started/i });4243   const pw = popup.locator("#master-password");44+  for (let i = 0; i < 5 && !(await pw.isVisible().catch(() => false)); i++) {45+    if (await advanceButton.isVisible({ timeout: 500 }).catch(() => false)) {46+      await advanceButton.click();47+      await popup.waitForTimeout(300);48+      continue;49+    }50+    await popup.locator(".peach-onboarding-card").click();51+    await popup.waitForTimeout(300);52+  }4353   if (await pw.isVisible()) {4454     await pw.fill(password);4555     await popup.locator("#confirm-password").fill(password);4656     await popup.getByRole("button", { name: /create vault/i }).click();47-    await popup.waitForTimeout(2000);57+    await expect(popup.locator(".lock-screen--recovery-display")).toBeVisible({ timeout: 5000 });4858   }4959   return { popup, extId };5060 }@@ -113,6 +123,16 @@113123     const error = popup.locator("text=/error|invalid|incorrect/i");114124     const hasError = await error.isVisible({ timeout: 2000 }).catch(() => false);115125     expect(hasError).toBeTruthy();126+    await ctx.close();127+  });128+129+  test("LS07b - recovery screen mounts after vault creation", async () => {130+    const { popup } = await setupVault(ctx, "correct horse battery staple");131+    await expect(popup.locator(".lock-screen--recovery-display")).toBeVisible({ timeout: 5000 });132+    await expect(popup.locator("text=save your recovery words")).toBeVisible({ timeout: 5000 });133+    await expect(popup.locator(".peach-recovery-word-item")).toHaveCount(12);134+    await expect(popup.getByRole("button", { name: /i wrote them down/i })).toBeVisible({ timeout: 5000 });135+116136     await ctx.close();117137   });118138 

view file