test(playwright): finalize automated screenshot flow per issue #40 (handoff)#43
Closed
jdjioe5-cpu wants to merge 4 commits into
Closed
test(playwright): finalize automated screenshot flow per issue #40 (handoff)#43jdjioe5-cpu wants to merge 4 commits into
jdjioe5-cpu wants to merge 4 commits into
Conversation
…llar#40 Pick up the existing PR GoodDollar#39 and address the contributor scope checks from issue GoodDollar#40 so the Playwright suite can ship behind an agent-triggered CI workflow without turning into an unconditional PR gate. - tests-playwright/wallet-flows.e2e.ts - Store defaultLoginMethod as a JSON-encoded string so useLocalStorageValue's JSON.parse round-trip no longer throws SyntaxError on every run. - Move screenshots under flow directories (login-onboarding/, home/, claim/) using the screenshot-<state>-<viewport>.png naming required by issue GoodDollar#38. - package.json - Replace the misleading 'test:e2e:screenshots' (which ran playwright test --update-snapshots against a suite with no snapshot assertion) with a real Playwright --grep filter that targets the approved screenshot flows. - Add test:e2e:headed, test:e2e:debug, test:e2e:update-baselines helpers. - .gitignore - Ignore generated Playwright screenshots, traces, videos, and reports while explicitly whitelisting the screenshot-<state>-<viewport>.png baseline pattern under each flow directory. - README.md - Add contributor documentation covering install, run, test-mode boundaries, screenshot layout, adding a flow, baseline update policy, and failure triage. CI workflow: a draft of .github/workflows/playwright-agent.yml is included untracked in this workspace. It cannot be pushed through the current authenticated GitHub account because the OAuth token lacks the 'workflow' scope required by GitHub when creating or updating a workflow file through git. The maintainer (or any account with workflow scope) must add the file manually using the contents documented in the PR description. Verification: yarn biome:verify:all -> 411 files checked, no errors yarn test -> 4 files, 83 tests passed tsc --noEmit on tests-playwright/wallet-flows.e2e.ts -> clean Refs: GoodDollar#40, GoodDollar#39, GoodDollar#38
…PR body The CI workflow YAML is reproduced inline in the PR description so a maintainer with workflow-scope can paste it into .github/workflows/ if any account-level push rule rejects workflow files on the contributor token. Refs: GoodDollar#40
|
@jdjioe5-cpu is attempting to deploy a commit to the GoodDollarTeam Team on Vercel. A member of the Team first needs to authorize it. |
8 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.
Contributor: @jdjioe5-cpu
PR picks up PR #39 (
copilot/automated-playwright-screenshot-flow) on top of upstream/main and addresses every check from GoodBounty issue #40.Refs: #40, #39, #38
What changed (commits on
jdjioe5-cpu/issue40-playwright-final)tests-playwright/wallet-flows.e2e.tsdefaultLoginMethodas a JSON-encoded string souseLocalStorageValue'sJSON.parseround-trip no longer throwsSyntaxError: Unexpected token 'e'on every run.tests-playwright/<flow>/screenshot-<state>-<viewport>.png) per the issue [PLAN] Automated Playwright and Screenshot Flow #38 layout, using semantic state names.package.jsontest:e2e:screenshots(--update-snapshotsagainst a suite with no snapshot assertion) with a real--grepfilter that targets the three approved screenshot flows.test:e2e:headed,test:e2e:debug, andtest:e2e:update-baselineshelpers that match the documented baseline policy..gitignorescreenshot-<state>-<viewport>.pngbaseline pattern under each flow directory.README.md.github/workflows/playwright-agent.yml— see "Agent-triggered CI" below.Agent-triggered CI
The CI workflow is
workflow_dispatchonly so it never becomes an unconditional PR gate. When launched from the Actions tab (or viagh workflow run playwright-agent.yml), it:yarn install --immutable.yarn biome:verify:alland the Playwright suite.tests-playwright/**/screenshot-*.png,tests-playwright/artifacts/,playwright-report/, andtest-results/as a singleplaywright-artifactsartifact with a 14-day retention.The existing
.github/workflows/goodwallet-pr.yml(Biome, build, Vitest) is left untouched and continues to gate every PR.Constraint on this PR
The contributor token does not carry the GitHub
workflowOAuth scope, so.github/workflows/playwright-agent.ymlis not part of the diff pushed by this branch. GitHub rejected the push with:The full YAML is reproduced below so any maintainer (or any account with
workflowscope) can paste it into.github/workflows/playwright-agent.ymland the workflow will run unchanged:Verification
Run from the repo root on
jdjioe5-cpu/issue40-playwright-final:yarn install --immutableyarn biome:verify:allyarn testyarn playwright install chromium~/.cache/ms-playwright.yarn test:e2etests-playwright/<flow>/. Browser console shows zeroSyntaxErrorfromuseDefaultLoginMethod.ts.workflowscope). The YAML above and thegh workflow run playwright-agent.ymlcommand in the README are the documented reproduction path; a maintainer-run dispatch will publish the same artifact bundle.Playwright scenarios a reviewer can run
The three flows captured as committed baselines are:
tests-playwright/login-onboarding/screenshot-onboarding-da-{desktop,mobile}.png(locale-aware onboarding/login entry).tests-playwright/home/screenshot-home-balances-overflow-en-{desktop,mobile}.png(authenticated home + mobile action overflow).tests-playwright/claim/screenshot-claim-requires-verification-en-{desktop,mobile}.png(GoodDollar claim UI with verification-required state).Screenshot/artifact locations
tests-playwright/<flow>/screenshot-<state>-<viewport>.png.tests-playwright/artifacts/,playwright-report/,test-results/.Remaining risks
.github/workflows/playwright-agent.ymlfile itself is held back until a maintainer pastes it (token-scope limit). The behavior, trigger semantics, and artifact paths are documented above and inREADME.md.goodwallet-pr.ymlkeeps using a non-immutableyarn installpath for speed; this PR does not touch it.NEXT_PUBLIC_PLAYWRIGHT_TEST_MODE, wallet seed generated per run, all non-local requests aborted at the browser boundary).ETA: 24h from maintainer ack.