From d7e52ea1aa84d9ce2a6363c16cd4897a58e79b92 Mon Sep 17 00:00:00 2001 From: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@buzz.block.builderlab.xyz> Date: Tue, 28 Jul 2026 11:00:45 -0400 Subject: [PATCH] test(desktop): align main's smoke specs with encrypted-by-default backup step Merging main (7a6a2cda5) brought in two smoke specs written against the old raw-key backup page, which this branch replaces with an encrypted-by-default step: Next stays disabled until a backup exists, and the raw nsec (nsec-reveal-toggle) sits behind an explicit 'Show raw key instead' click. Both specs timed out in CI at 72f00afa8. - harness-management.spec.ts (More-harnesses nav, from #3093): route through the existing passThroughBackupStep helper instead of clicking a disabled Next. - onboarding-docked-cta-screenshots.spec.ts: click backup-show-raw-key before the reveal toggle; the raw-key card is the surface the screenshot exists to capture. Test-only change; no product code touched. Co-authored-by: Tyler Longwell Signed-off-by: Tyler Longwell --- desktop/tests/e2e/harness-management.spec.ts | 9 ++++----- .../tests/e2e/onboarding-docked-cta-screenshots.spec.ts | 4 ++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/desktop/tests/e2e/harness-management.spec.ts b/desktop/tests/e2e/harness-management.spec.ts index 50047f8f8..f6bf2afd4 100644 --- a/desktop/tests/e2e/harness-management.spec.ts +++ b/desktop/tests/e2e/harness-management.spec.ts @@ -21,6 +21,7 @@ import { expect, test } from "@playwright/test"; import { installMockBridge } from "../helpers/bridge"; +import { passThroughBackupStep } from "../helpers/onboarding"; // ── Shared catalog fixtures ─────────────────────────────────────────────────── @@ -668,12 +669,10 @@ test("onboarding setup More-harnesses click navigates to Settings → Agents", a }); await page.goto("/"); - // Reach the setup page: create a new identity key → skip backup step. + // Reach the setup page: create a new identity key → pass the backup step + // (encrypted-by-default: Next is gated on creating the backup). await page.getByRole("button", { name: "Create a new identity key" }).click(); - await expect(page.getByTestId("onboarding-page-backup")).toBeVisible({ - timeout: 10_000, - }); - await page.getByTestId("onboarding-next").click(); + await passThroughBackupStep(page); // Now on the setup page. await expect( diff --git a/desktop/tests/e2e/onboarding-docked-cta-screenshots.spec.ts b/desktop/tests/e2e/onboarding-docked-cta-screenshots.spec.ts index dbb8a92a1..ee6bd3fee 100644 --- a/desktop/tests/e2e/onboarding-docked-cta-screenshots.spec.ts +++ b/desktop/tests/e2e/onboarding-docked-cta-screenshots.spec.ts @@ -59,6 +59,10 @@ test("machine onboarding: landing, backup, setup docked CTAs", async ({ await waitForAnimations(page); await page.screenshot({ path: `${SHOT_DIR}/02-backup.png` }); + // Encrypted-by-default backup: the raw key sits behind an explicit click. + await page.getByTestId("backup-show-raw-key").click(); + await expect(page.getByTestId("nsec-value")).toBeVisible(); + // Reveal the key: box must not reflow (same-length monospace mask). await page.getByTestId("nsec-reveal-toggle").click(); await expect(page.getByTestId("nsec-value")).toHaveClass(/select-text/);