Skip to content

Improved E2E fixtures with reusable role auth state#26562

Draft
jonatansberg wants to merge 20 commits intomainfrom
ber-3366-rework-e2e-fixtures
Draft

Improved E2E fixtures with reusable role auth state#26562
jonatansberg wants to merge 20 commits intomainfrom
ber-3366-rework-e2e-fixtures

Conversation

@jonatansberg
Copy link
Member

ref https://linear.app/ghost/issue/BER-3366/rework-e2e-fixtures

What changed

  • Reworked global setup to create and reuse a local fixture package (DB snapshot + per-role auth states)
  • Added role-aware Playwright auth context helper and role fixture support
  • Added staff invite + role onboarding setup flow for owner/administrator/editor/author/contributor
  • Added fixture cache invalidation checks (missing files/migration mismatch/forced reset)
  • Updated dev/build gateway Caddy config to rewrite Origin consistently for admin/API traffic

Notes

  • This branch is rebased on ber-3363-unified-environment-manager
  • Local override env var is E2E_FORCE_FIXTURE_RESET=1

Validation

  • yarn workspace @tryghost/e2e test:types
  • yarn workspace @tryghost/e2e lint
  • Focused and full Playwright runs executed in dev mode to inventory failures

jonatansberg and others added 20 commits February 24, 2026 09:04
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager
Updated E2E scripts and docs for the infra-first build mode workflow.
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager
Stabilized member signup attribution tests before the CI runner migration.
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager
Moved CI E2E execution into the official Playwright container.

Co-authored-by: Troy Ciesco <tmciesco@gmail.com>
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager
Stock caddy:2-alpine cannot parse the transform log encoder in Caddyfile.build, and shard failures now print worker/gateway logs for debugging.
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager

Reduced stale dev-mode wording and derived only the E2E pieces that actually follow COMPOSE_PROJECT_NAME.
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager

Moved CI shell logic into versioned scripts, parallelized build-mode runtime prep, and made infra startup sync/reset Tinybird state.

Co-authored-by: Troy Ciesco <tmciesco@gmail.com>
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager

Made Tinybird prep automatic for local tests, startup-only infra commands, and fail-fast sync/reset when Tinybird is running.
ref https://linear.app/ghost/issue/BER-3363/unified-environment-manager

Collapsed CI prep into a single script, overlapped runtime preflight with builds, and switched the Playwright runner script to env-driven shard configuration.
ref https://linear.app/ghost/issue/BER-3363

Removed dead service-availability exports and the obsolete pretest skip branch after unifying the environment manager.
ref https://linear.app/ghost/issue/BER-3366/rework-e2e-fixtures
This keeps the README wording focused and clarifies why the temporary CI wait remains in PublicPage.
ref https://linear.app/ghost/issue/BER-3363

Removed tb-cli from compose --wait targets in infra bootstrap because it is a one-shot setup job; analytics still pulls it in via depends_on and long-lived services remain the readiness gate.
ref https://linear.app/ghost/issue/BER-3366/rework-e2e-fixtures
This reworked global setup to persist auth state and DB snapshots for faster local fixture reuse.
ref https://linear.app/ghost/issue/BER-3366/rework-e2e-fixtures
This aligned proxied Origin headers across worker ports to keep auth/session behavior consistent.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 24, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ber-3366-rework-e2e-fixtures

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jonatansberg jonatansberg force-pushed the ber-3363-unified-environment-manager branch from 00f6fbb to 1370d46 Compare February 25, 2026 08:21
Base automatically changed from ber-3363-unified-environment-manager to main February 25, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant