test(e2e): Playwright smoke tests for six authenticated pages (#1897)#3335
Draft
test(e2e): Playwright smoke tests for six authenticated pages (#1897)#3335
Conversation
Add shared helpers module and smoke tests for membership hub, organization dashboard, certification, brand viewer, community hub, and admin newsletter editor. Extends the pattern from #1895. https://claude.ai/code/session_016dJ4nMXCbcLEmCsCNrBK6d
Fixes code-reviewer blockers: (1) resetFailures() inside per-userType loops was silently discarding failures from all but the last iteration; (2) unused resp variable in admin-newsletter redirect check. https://claude.ai/code/session_016dJ4nMXCbcLEmCsCNrBK6d
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.
Closes #1897
Extends the Playwright smoke-test suite (introduced in #1895) to six additional authenticated pages. Extracts shared login/assert/error-collection utilities from
profile-edit.smoke.jsinto atests/e2e/helpers.jsmodule, then adds one smoke file per page:membership-hub.smoke.js/membership/huborganization-dashboard.smoke.js/organizationcertification.smoke.js/certificationbrand-viewer.smoke.js/brand/:domaincommunity-hub.smoke.js/communityadmin-newsletter.smoke.js/admin/newsletters/the_prompt(+ redirect from/admin/digest)Each test: dev-login → navigate → wait for key container → assert critical DOM IDs → collect console errors. Screenshot on failure to
/tmp/.Non-breaking justification: adds new
.jstest files outside the TypeScript compilation boundary; no existing code modified; changeset--empty(no protocol impact).Note on runner script:
npm run test:e2e(mentioned in the issue) requires apackage.jsonscript entry which cannot be added in this PR. Tests run today asnode tests/e2e/<file>.smoke.jsmatching the existingprofile-edit.smoke.jspattern.Note on pre-existing build failures:
npm run buildhas pre-existing TypeScript errors inserver/src/validator.tsandurl-security.ts(confirmed present onmainbefore this branch). These are unrelated to this PR;npm run build:schemaspasses clean.Pre-PR review:
resetFailures()from inside per-userType loops (was silently discarding non-last-iteration failures) and dropped unusedrespvariable in admin-newsletter redirect checkserver/public/, changeset--emptycorrect, CI integration deliberately excluded as a follow-onSession: https://claude.ai/code/session_016dJ4nMXCbcLEmCsCNrBK6d
Generated by Claude Code