test(playwright): finalize automated screenshot flow per issue#42
Closed
jdjioe5-cpu wants to merge 3 commits into
Closed
test(playwright): finalize automated screenshot flow per issue#42jdjioe5-cpu wants to merge 3 commits into
jdjioe5-cpu wants to merge 3 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
|
@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.
What changed
tests-playwright/wallet-flows.e2e.tsdefaultLoginMethodas a JSON-encoded string souseLocalStorageValue'sJSON.parseround-trip no longer throwsSyntaxError: Unexpected token 'e'on every passing run.login-onboarding/,home/,claim/) using thescreenshot-<state>-<viewport>.pngnaming required by the plan in issue.package.jsontest:e2e:screenshotsscript (which invokedplaywright test --update-snapshotsagainst a suite with no snapshot assertion) with a realplaywright test --grepfilter that targets the approved screenshot flows.test:e2e:headed,test:e2e:debug, andtest:e2e:update-baselineshelpers..gitignorescreenshot-<state>-<viewport>.pngbaseline pattern under each flow directory.README.mdRequired follow-up: agent-triggered CI workflow
The plan in issue and the scope check in issue both call for an agent-triggered Playwright CI path that runs only when launched from the Actions tab (so the suite never becomes an unconditional PR gate) and uploads screenshots, traces, videos, and logs as CI artifacts.
I drafted
.github/workflows/playwright-agent.ymlin this workspace but could not push it throughgit push: the OAuth token on the authenticatedjdjioe5-cpuaccount only hasgist,read:org, andreposcopes — GitHub refuses to create or update a workflow file without theworkflowscope. The maintainer (or any account withworkflowscope) can apply the exact file I drafted by copying the contents in the collapsible block below into.github/workflows/playwright-agent.ymlon this branch.playwright-agent.yml (draft, full contents)
Verification performed on this branch
yarn biome:verify:all: 411 files checked, no errors.yarn test: 4 files, 83 unit tests passed.tsc --noEmitontests-playwright/wallet-flows.e2e.ts: clean.Reviewer checklist (for maintainer)
.github/workflows/playwright-agent.ymlon this branch.Playwright agentworkflow from the Actions tab to upload screenshots, traces, videos, and logs.tests-playwright/{login-onboarding,home,claim}/screenshot-*-{desktop,mobile}.png.yarn build, the existingCheck buildworkflow, and the Vitest suite remain intact.