Repository navigation
test(frontend): add visual regression snapshot for cooperative page (closes #273) - #379
Merged
FrankHood1 merged 3 commits intoOct 25, 2026
Merged
Conversation
…lite-Work#273) - Add Playwright visual regression spec for /cooperative/bulk-import covering unauthenticated wallet connect prompt, authenticated CSV bulk import form, import result view, and /cooperative redirect. - Generate baseline desktop (1440x900) and mobile (375x667) PNG snapshots following SNAPSHOT_POLICY.md. - Update visual fixtures to mock Freighter external message protocol responses for deterministic authentication. - Add /cooperative page redirecting to /cooperative/bulk-import with unit test coverage. Closes Elite-Work#273
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
Closes #273
This PR adds visual regression test coverage and baseline snapshot PNGs for the cooperative page (
/cooperative/bulk-importand/cooperativeredirect) following the guidelines infrontend/tests/visual/SNAPSHOT_POLICY.md.Changes
Visual Regression Spec (
frontend/tests/visual/cooperative.spec.ts):/cooperative/bulk-import) matchingcooperative-public-main.pngandcooperative-public-full.png./cooperativeredirecting to/cooperative/bulk-import.cooperative-auth-main.pngandcooperative-auth-full.png.cooperative-import-result.png.chromium-desktop(1440x900) andchromium-mobile(375x667).Deterministic Baseline Snapshots (
frontend/tests/visual/cooperative.spec.ts-snapshots/):cooperative-public-main-chromium-desktop-linux.pngcooperative-public-main-chromium-mobile-linux.pngcooperative-public-full-chromium-desktop-linux.pngcooperative-public-full-chromium-mobile-linux.pngcooperative-auth-main-chromium-desktop-linux.pngcooperative-auth-main-chromium-mobile-linux.pngcooperative-auth-full-chromium-desktop-linux.pngcooperative-auth-full-chromium-mobile-linux.pngcooperative-import-result-chromium-desktop-linux.pngcooperative-import-result-chromium-mobile-linux.pngFreighter External Message Protocol Mock (
frontend/tests/visual/fixtures.ts):seedAuthenticatedWalletto reply toFREIGHTER_EXTERNAL_MSG_REQUESTwithFREIGHTER_EXTERNAL_MSG_RESPONSE, allowing Freighter wallet methods (isAllowed(),getAddress(),isConnected()) to resolve immediately and deterministically during visual tests.Cooperative Route Redirect & Unit Tests (
frontend/src/app/cooperative/page.tsx):/cooperativeroute page redirecting to/cooperative/bulk-import.frontend/src/app/cooperative/__tests__/page.test.tsxverifying the redirect.Verification
pnpm test src/app/cooperative/__tests__/page.test.tsx src/__tests__/accessibility/cooperativeBulkImport.axe.test.tsxpasses (unit and a11y tests).pnpm exec playwright test --project=chromium-desktop --project=chromium-mobile tests/visual/cooperative.spec.tspasses 12/12 tests with zero pixel diff.pnpm lintpasses with 0 errors.pnpm analyze:budgetpasses under bundle budget limit.node scripts/validate-flaky-quarantine.mjspasses.