2.7 KiB
2.7 KiB
Content Manager Removal — Tests, E2E Flows & Rollback
Purpose: a concise, actionable test plan and rollback instructions to validate the first non-destructive sprint before full cleanup.
- Smoke tests (manual or scriptable)
- Create content from Planner → verify Content record exists with
content_htmlpopulated. - Generate image prompts for a Content item (draft) → verify image prompt records created and UI shows "Image Prompts Generated".
- Generate images → verify images tasks start and images appear in
/writer/images. - Move Content to
reviewstatus → call Publish → verify backend returnsexternal_idandexternal_urlset on Content and WP plugin creates post. - Trigger plugin webhook simulation with
taskpayload that includescontent_id→ verify WP post body usescontent_html.
- Unit tests (backend)
ContentViewSet.publish():- publishes and sets
external_idandexternal_url. - rejects publish when site credentials missing.
- publishes and sets
ContentSyncService._sync_to_wordpress:- queries
status='published'(not 'publish'). - writes
content.external_idon success.
- queries
- Frontend unit tests
ContentViewTemplate:- buttons visibility by
status(draft: Edit + Generate;review: Edit + Publish). - Edit button navigates to
/sites/{siteId}/posts/{contentId}/edit.
- buttons visibility by
Reviewpage:- Title renders as link to
/writer/content/{id}. - Categories and Tags columns appear and persist via ColumnSelector.
- Title renders as link to
Imagespage:- Content image cells do not show prompt text, only image and status badge.
- E2E test (recommended - scriptable)
- Flow:
- Create Idea → create Task → generate content (AI) → assert Content record created.
- For created Content (status draft) call generate image prompts → start generation → wait for images generated.
- Change status to review → call publish endpoint → assert WP post exists via plugin test endpoint and
external_idpresent.
- Monitoring & metrics to watch in staging
- Publish success rate (per-minute/hour).
- WP plugin webhook failures and missing credentials.
- Content with
content_idbut emptycontent_html.
- Rollback steps (fast)
- Flip account setting
feature.content_manager_refactorOFF (server-side account setting) — this hides/refuses new UI. - If publish failures spike, set WP plugin option
igny8_connection_enabled= 0 to stop outbound syncs and webhooks. - Revert UI commits in the release branch and redeploy.
- Test artifacts
- Store E2E run logs and failing request/response pairs in
staging/e2e-runs/{timestamp}/.
Notes
- Automate the E2E with Cypress or Playwright; prefer Playwright for headless CI runs.
- Use test WP site with test credentials; do not use production credentials for staging tests.