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 <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
This commit is contained in:
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d
2026-07-28 11:00:45 -04:00
co-authored by Tyler Longwell
parent 72f00afa89
commit d7e52ea1aa
2 changed files with 8 additions and 5 deletions
+4 -5
View File
@@ -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(
@@ -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/);