test(e2e): repeatable Playwright suite for the content-ops features - #65
Merged
Conversation
Turns the manual browser walk of the #63 features into five specs: webhooks global form, review-page stage metadata from the shared status table, publish-with-signed-webhook-delivery (in-process listener, HMAC verified, public page served), the read-only status gate's admin error, and the reports pipeline-runs panel. Scheduled publishing stays covered by its int spec; a five-minute cron boundary is unfit for e2e. Two suite-level fixes this surfaced: parallel spec files racing on one shared test user (the ops suite now seeds its own), and parallel Playwright workers hitting the documented dev-push FK race when each boots Payload for seeding — test:e2e now sets DISABLE_DEV_PUSH, the same reasoning as the vitest guard. Also made the dashboard spec assert a rendered heading instead of pinning one onboarding step's copy, which failed on any database mid-onboarding. Full suite passes twice back to back (9/9); int suite and typecheck unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TpSZts1YiNwWeUzisL9Hb2
snowopsdev
marked this pull request as ready for review
August 31, 2026 21:43
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b11f41a62
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… teardown Two Codex review findings: the suite clobbered the singleton webhook global (teardown left it disabled with null url/secret), and the published fixture stayed publicly routable because archived rows are not excluded from published queries. Teardown now snapshots the global before mutating and restores it, and retireArticles() withdraws published fixtures back to approved while archiving. Verified against a database with a pre-existing webhook config: the suite passes and the config survives byte-for-byte, and a follow-up run leaves zero published e2e rows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TpSZts1YiNwWeUzisL9Hb2
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.
Turns the manual browser walk of the #63 features into a repeatable Playwright suite,
cms/tests/e2e/contentOps.e2e.spec.ts, seeded through the Payload local API like the existing e2e helpers.Covered
verifyWebhookSignature, theapproved → publishedbody, the acting user, and that the public article page then serves.draftedarticle with its admin error message.Scheduled publishing is deliberately not here — its cron occurrence fires on a five-minute boundary, unfit for e2e;
tests/int/publishDue.int.spec.tscovers the handler.Suite fixes the new specs surfaced
payload.config.ts;test:e2enow setsDISABLE_DEV_PUSH, the same guard reasoning as vitest.Verification: full e2e suite passes twice back to back (9/9) against a dev server on a migration-built worktree database (
TEST_BASE_URL=http://127.0.0.1:3101 npm run test:e2e --workspace cms);npm run typecheckand the 302-test integration suite unaffected.