Add Playwright E2E test suite: deposit → countdown → unlock flow (closes #29)#54
Merged
Merged
Conversation
- e2e/playwright.config.ts — Chromium config targeting localhost:3000 - e2e/mocks/freighter.ts — deterministic Freighter stub via postMessage interception - e2e/farm.spec.ts — 5 tests: connect wallet, deposit, countdown, unlock available, unlock - .github/workflows/e2e.yml — CI job running pnpm playwright test - Expose QueryClient on window.__queryClient in E2E mode (NEXT_PUBLIC_E2E=true) so tests can seed React Query cache without needing live Soroban RPC - Add @playwright/test devDependency
5 tasks
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.
Summary
Resolves #29.
e2e/playwright.config.ts— Playwright config targetinghttp://localhost:3000with Chromium headless; startsnext devviawebServere2e/mocks/freighter.ts— Deterministic Freighter stub: interceptswindow.postMessagecalls that@stellar/freighter-apiv3 uses, returning a fixed test keypair (GA3C…EFRN) without any real extension or private keye2e/farm.spec.ts— Five tests covering the full user journey:page.clock.setFixedTime) → Unlock button becomes enabled.github/workflows/e2e.yml— CI job runningpnpm playwright teston push/PR to mainsrc/context/index.tsx— Exposes React Query client aswindow.__queryClientwhenNEXT_PUBLIC_E2E=true, so tests can seed pool/position data without a live Soroban nodepackage.json— Adds@playwright/test ^1.49.0devDependency andplaywrightscriptTest plan
pnpm install && pnpm playwright install chromiumNEXT_PUBLIC_E2E=true pnpm playwright test --config e2e/playwright.config.ts