Playwright E2E suite: wallet connection, stream creation, stream lifecycle (#1199) - #1408
Closed
dimka90 wants to merge 1 commit into
Closed
Playwright E2E suite: wallet connection, stream creation, stream lifecycle (#1199)#1408dimka90 wants to merge 1 commit into
dimka90 wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 soisWalletSessionvalidation passes.frontend/e2e/*.spec.ts— wallet-connection, stream-creation, stream-lifecycle.test:e2e/test:e2e:headed.turbopack.rootinnext.config.tsso straypackage-lock.jsonfiles 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:
reuseExistingServeris enabled locally; CI workflow additions for Playwright install/trace upload can be layered on when the issue asks for the exact CI pipeline.