feat(e2e): add Playwright post submission test (E2E-POST-001)#399
Conversation
Introduce Playwright E2E infrastructure with E2E-POST-001 for creating a public post, dual REST login paths for hosted/local APIs, and CI/docs updates. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I am sorry for the delay @niamao we need to find a new system for reviews instead of relying on one person. Please give me some time and I will find a volunteer who can do review. In the meantime, may I ask that you review someone else's PR? |
motirebuma
left a comment
There was a problem hiding this comment.
Hey @niamao the E2E infrastructure and test spec look solid, good global setup, clean helper abstractions, and the restLogin.ts fallback for hosted vs local backends is a nice touch. Docs and config are thorough.
A couple things to sort out before merging:
- The CI job gate
if: ${{ secrets.E2E_AUTHOR_PASSWORD }}likely won't work as intended -- GitHub Actions masks secrets inif:expressions. You'll want to set the secret into an env var and check that instead, otherwise this job may silently always skip. - There's some scope creep here: the
GET_GROUPquery + group badge inPost.tsxand thez-index: 80bump on the combobox popover aren't related to E2E setup. - Minor:
saveAuthorStorageStatelaunches a full Chromium instance just to writelocalStorage. A plain JSON file with cookies/origins would be faster and skip the browser roundtrip, but not a blocker.
Status: Approved (Will be merged after the fixes)
Thankyou @niamao, and sorry for late review.
Currently, the remaining PRs still have build errors and it's better if they can fix it first. |
No problem. Thank you also for reviewing. I'll update my changes and also fix merge conflicts. |
I wanted to check and fix my deployment error but I don't have access permission. @flyblackbox @motirebuma |
|
I'm not sure how to address this one @niamao / @motirebuma I will message you |
Revert accidental lock file changes from the E2E branch so CI uses the same dependency tree as main. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove duplicate @playwright/test specifier and unused dotenv/wait-on entries that caused frozen-lockfile install failures on deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
Remove job-level working-directory from the E2E job so the credentials gate runs at the repo root, then set working-directory only on steps after checkout. Co-authored-by: Cursor <cursoragent@cursor.com>
Thanks for the review — addressed: (1) CI gate now checks E2E_AUTHOR_PASSWORD via step env + output, not if: secrets.*; (2) reverted Post.tsx scope creep; (3) kept combobox z-[80] because group select is blocked in E2E without it; (4) storage state is plain JSON, no Chromium launch. E2E runs in CI once E2E_AUTHOR_PASSWORD is set in repo Actions secrets. (Optional) @motirebuma @flyblackbox |
Restores Playwright env loading and CI server wait; package.json and pnpm-lock.yaml updated together to avoid frozen-lockfile install failures. Co-authored-by: Cursor <cursoragent@cursor.com>
motirebuma
left a comment
There was a problem hiding this comment.
Nice work @niamao. The E2E infrastructure is solid -- good global setup, clean helper abstractions, and the restLogin.ts fallback for hosted vs local backends is a nice touch. Docs and config are thorough.
- Minor:
saveAuthorStorageStatelaunches a full Chromium instance just to writelocalStorage. A plain JSON file with cookies/origins would be faster, but not a blocker.
Thank you!!
Summary
e2e/,playwright.config.ts, flexiblepnpm test:e2escripts)/login) and local backend (/auth/login) via sharedrestLoginhelperdata-testids, combobox z-index fix for group selection in the Create Quote dialog, and excludese2e/from Jest so CI unit tests stay isolatedREADME.md,CLAUDE.md, and.env.e2e.example; adds optional CI E2E job whenE2E_AUTHOR_PASSWORDis configuredTest plan
pnpm type-checkpnpm lintpnpm buildpnpm test(Jest — 155 suites)pnpm test:e2e post-submission.spec.ts(2 passed: desktop + mobile)E2E_AUTHOR_PASSWORD, optionalE2E_AUTHOR_USERNAME,E2E_PUBLIC_GROUP_NAME)Made with Cursor