Skip to content

Playwright E2E suite: wallet connection, stream creation, stream lifecycle (#1199) - #1408

Closed
dimka90 wants to merge 1 commit into
LabsCrypt:mainfrom
dimka90:fix/1199-playwright-e2e
Closed

Playwright E2E suite: wallet connection, stream creation, stream lifecycle (#1199)#1408
dimka90 wants to merge 1 commit into
LabsCrypt:mainfrom
dimka90:fix/1199-playwright-e2e

Conversation

@dimka90

@dimka90 dimka90 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Closes #1199

Summary

Adds a Playwright-based E2E test suite covering the three core frontend flows: Freighter wallet connection/disconnect, single-screen stream creation (with validation), and the stream detail page (live claimable cap + SSE-driven withdrawal reflection + on-chain Withdraw action).

What is included

  • frontend/playwright.config.ts — chromium + firefox projects, two web servers (mock API/SSE + Soroban RPC over HTTPS, Turbopack dev on 3101 with mocked env).
  • frontend/e2e/global-setup.ts — generates local self-signed TLS certs for the HTTPS RPC mock (Soroban client refuses plain HTTP).
  • frontend/e2e/mocks/api-server.mjs — REST + SSE mock on 3100 plus a Soroban RPC mock on 3102 implementing getHealth/getNetwork/getLatestLedger/getLedgerEntries/simulateTransaction/sendTransaction/getTransaction with real XDR via @stellar/stellar-sdk.
  • frontend/e2e/utils/freighter.ts — window-level Freighter extension mock (postMessage protocol) + persisted non-mocked wallet session so isWalletSession validation passes.
  • frontend/e2e/*.spec.ts — wallet-connection, stream-creation, stream-lifecycle.
  • CI-friendly scripts: test:e2e / test:e2e:headed.
  • Pins turbopack.root in next.config.ts so stray package-lock.json files outside the repo do not break the dev server.

Verification

  • npx playwright test — 6/6 passing (3 specs × chromium + firefox).
  • tsc --noEmit — no new errors (unchanged from baseline).

Note: reuseExistingServer is enabled locally; CI workflow additions for Playwright install/trace upload can be layered on when the issue asks for the exact CI pipeline.

…ifecycle (LabsCrypt#1199)

Adds a Playwright E2E harness for the FlowFi frontend:
- Global setup generates self-signed TLS certs for the local Soroban RPC mock.
- A combined mock server (REST + SSE + Soroban RPC over HTTPS) supports the
  wallet connection, stream creation, and stream detail endpoints.
- A window-level Freighter postMessage mock plus a persisted non-mocked wallet
  session enables full create/withdraw flows against the mocked chain.
- Tests run against Turbopack dev (port 3101) with mocked API/RPC on 3100/3102
  in chromium and firefox.

Also pins the Turbopack workspace root so stray package-lock files outside the
repo do not break the dev server.
@dimka90

dimka90 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1409 — the single combined PR for #1198 #1199 #1200 #1201.

@dimka90 dimka90 closed this Aug 30, 2026
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.

[DevOps/QA] End-to-End (E2E) Browser Testing Suite with Playwright

1 participant