Skip to content

[GoodBounty] Finalize automated Playwright screenshot flow PR #40

Description

@L03TJ3

Summary

Pick up the existing AI-generated PR #39 for the Automated Playwright and Screenshot Flow plan. Run it locally, close the concrete gaps below, update tests and evidence, and prepare it for human review.

Make sure to branch out from the pull-request branch before doing work and producing

Contributor role reference: https://docs.gooddollar.org/for-developers/contributing/open-source-contributors/contributor-role

Contributor task

  • Claim the bounty with an ETA.
  • Check out PR Add deterministic Playwright screenshot flows #39 Branch: (copilot/automated-playwright-screenshot-flow) and run it locally.
  • Compare the implementation with issue [PLAN] Automated Playwright and Screenshot Flow #38 and this task. Preserve the existing three initial journeys: localized onboarding/login, authenticated home with mobile action overflow, and GoodDollar claim verification required.
  • Fix the implementation gaps, tests, documentation, and CI/artifact handling listed under Scope checks.
  • Keep test mode credential-free: no production secrets, real wallets, real funds, live transactions, or uncontrolled external browser requests.
  • Update screenshots or video evidence if the UI changes.
  • Make sure screenshots are committed in the requested folder and structure
  • Leave a handoff comment with what changed, what was tested, the Playwright scenarios that a reviewer can run, and remaining risks.

Scope checks

  • Add contributor documentation (normally in README.md) covering Playwright browser installation, yarn test:e2e, screenshot generation/location, test-mode environment boundaries, adding a flow, intentional baseline updates, and failure triage.
  • Correct the screenshot structure to meet issue [PLAN] Automated Playwright and Screenshot Flow #38: screenshots for each main flow are stored under tests-playwright/<page-or-flow>/ using semantic state names (for example screenshot-claim-verification-required.png), rather than flat files directly under tests-playwright/.
  • Make screenshot behavior explicit and accurate. The current test:e2e:screenshots command passes --update-snapshots but the suite uses direct page.screenshot() calls rather than Playwright snapshot assertions. Replace it with a documented command/approach that matches the chosen baseline policy.
  • Fix the test bootstrap’s defaultLoginMethod value so it uses the serialization expected by useLocalStorageValue; the current plain testlogin value produces repeated browser JSON.parse errors during the passing E2E run.
  • Add the agreed, agent-triggered PR execution path for Playwright. It must not turn browser screenshots into an unconditional check on every pull request. When triggered, it must run the E2E suite and upload screenshot artifacts plus failure diagnostics (traces, video, and logs where available).
  • Ensure the existing PR workflow’s Biome, build, and Vitest checks remain intact and are not impacted by the addition of playwright tests.
  • Keep semantic, user-facing locators and deterministic readiness checks. The suite must continue to exercise both configured Chromium desktop and mobile projects.
  • Ensure generated screenshots and Playwright artifacts do not become accidental committed files, while intentionally approved baselines have a documented review/update process.

Review findings to address

  1. Missing CI/artifact integration: PR Add deterministic Playwright screenshot flows #39 changes no GitHub Actions workflow, so its screenshots, traces, videos, and logs are never published from CI. This does not meet issue [PLAN] Automated Playwright and Screenshot Flow #38’s PR-policy and artifact requirements.
  2. Missing documentation: no README or other contributor documentation changed, leaving browser installation, commands, test mode, artifact handling, and baseline ownership undiscoverable.
  3. Incorrect screenshot layout: tests-playwright/wallet-flows.e2e.ts writes six flat tests-playwright/<name>-<viewport>.png files, while issue [PLAN] Automated Playwright and Screenshot Flow #38 requires flow/page directories under tests-playwright/.
  4. Misleading screenshot script: test:e2e:screenshots invokes playwright test --update-snapshots, but this suite contains no snapshot assertion for that flag to update.
  5. Noisy invalid storage setup: the test sets defaultLoginMethod to invalid JSON. Browser logs repeatedly report SyntaxError: Unexpected token 'e', "testlogin" is not valid JSON from src/sections/Login/useDefaultLoginMethod.ts.

Required commands

yarn install --immutable
yarn playwright install chromium
yarn biome:verify:all
yarn test
yarn test:e2e

Run the new agent-triggered CI workflow (or its documented equivalent) and link its artifacts in the PR handoff. If a command cannot be run, document why.

Handoff comment

Contributor: @<handle>
PR: #39
Commit: <commit>

Fixed:

- <fix>

Verified:

- `yarn biome:verify:all`: <result>
- `yarn test`: <result>
- `yarn test:e2e`: <result>
- <agent-triggered CI run>: <result and artifact link>

Evidence:

- Playwright scenarios a reviewer can run: <scenario names and command>
- Screenshot/artifact locations: <paths and CI artifact link>

Remaining risks:

- <None / details>

Metadata

Metadata

Assignees

Type

No type

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions