Skip to content

test(export-coverage): adds wallet-export coverage#328

Open
christopherferreira9 wants to merge 1 commit into
mainfrom
cferreira/add-wallet-backup-coverage
Open

test(export-coverage): adds wallet-export coverage#328
christopherferreira9 wants to merge 1 commit into
mainfrom
cferreira/add-wallet-backup-coverage

Conversation

@christopherferreira9

Copy link
Copy Markdown

Description

Adds end-to-end test coverage for wallet export (exportWallet = seed phrase, exportPrivateKey = private key), which previously had none. Coverage is layered across two levels that together verify the full path:

  • Integration (headless, Vitest) — proves the SDK export functions succeed against the real backend/Turnkey and return well-formed encrypted bundles.
  • Browser (Playwright) — drives the demo app's Export Keys UI and confirms the real decrypted secret actually renders in the Turnkey iframe.

Notes / trade-offs

  • The browser test intentionally couples to Turnkey's remote iframe DOM (export.turnkey.com) to prove the secret is genuinely shown; a Turnkey UI change could break it independently of the
    SDK.
  • Both suites self-skip when backend/email/demo-app are unavailable, matching the existing e2e specs.
  • No wallet secret is ever written to logs (only shape summaries like word count).

New files

  • e2e/integration/export-flow.test.ts
  • e2e/helpers/test-wallet.ts - new — test bridge adapting the integration client+session into the ZeroDevWalletSDK shape the export functions expect (forces stamperType: 'apiKey', since parseSession omits it and the passkey stamper is a no-op), plus a throwaway target-public-key generator.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zerodev-signer-demo Ready Ready Preview, Comment Jul 15, 2026 5:06pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-core@328
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-react@328
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/react-ui@328
npm i https://pkg.pr.new/zerodevapp/zerodev-wallet-sdk/@zerodev/wallet-react-ui@328

commit: cf14a74

@christopherferreira9
christopherferreira9 marked this pull request as ready for review July 16, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant