Skip to content

Moved settings acceptance test batch 1 into Admin - #29367

Merged
9larsons merged 1 commit into
mainfrom
codex/settings-test-batch-1
Jul 15, 2026
Merged

Moved settings acceptance test batch 1 into Admin#29367
9larsons merged 1 commit into
mainfrom
codex/settings-test-batch-1

Conversation

@9larsons

Copy link
Copy Markdown
Contributor

What changed

  • ported the layout, routing, search, permissions, explore, network, and tips-and-donations suites from the standalone Settings Playwright harness into Admin's Vitest Browser Mode acceptance tier
  • deleted the seven superseded legacy specs in the same change
  • added shared Settings screen selectors/helpers and external endpoint request capture for testimonial payload assertions
  • expanded the batch from 16 legacy checks to 27 behavioral tests, with broader shell, routing, search, permissions, and donations coverage

Why

Production Settings already runs inside apps/admin. These contracts should exercise the production Admin provider and routing stack against the shared fake Admin API before the standalone Settings harness is removed.

Follow-ups

These findings are deliberately not blockers for this migration batch:

  • add focused unit coverage for Network's production-only hostname, IP address, and subdirectory disabling branches
  • cover Explore settings mutation failures plus missing/failing testimonial API responses
  • cover Tips & donations currency switching, cancel/reset, clipboard copy, and preview behavior
  • fix the Tips maximum-validation message to format $10000 as $10,000
  • add unit coverage for utils/search.tsx registration, visibility, and highlighting internals

Validation

  • pnpm exec vitest run -c vitest.acceptance.config.ts --silent=true src/settings/layout.acceptance.test.tsx src/settings/routing.acceptance.test.tsx src/settings/search.acceptance.test.tsx src/settings/permissions.acceptance.test.tsx src/settings/growth/explore.acceptance.test.tsx src/settings/growth/network.acceptance.test.tsx src/settings/growth/tips-and-donations.acceptance.test.tsx — 7 files, 27 tests passed
  • pnpm nx run @tryghost/admin:typecheck
  • pnpm nx run @tryghost/admin:lint
  • pnpm nx run @tryghost/test-data:lint
  • git diff --check

ref https://linear.app/ghost/issue/PLA-243

ref https://linear.app/ghost/issue/PLA-243

Settings already runs inside the Admin shell, so these contracts now exercise the production provider and routing stack against the shared fake API. The port also expands the batch from 16 legacy checks to 27 behavioral tests before the standalone suite is removed.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8887175d-3a4f-4620-9584-1e5229a153c2

📥 Commits

Reviewing files that changed from the base of the PR and between a7c4b00 and 935009e.

📒 Files selected for processing (18)
  • apps/admin-x-settings/test/acceptance/growth/explore.test.ts
  • apps/admin-x-settings/test/acceptance/growth/network.test.ts
  • apps/admin-x-settings/test/acceptance/growth/tips-and-donations.test.ts
  • apps/admin-x-settings/test/acceptance/layout.test.ts
  • apps/admin-x-settings/test/acceptance/permissions.test.ts
  • apps/admin-x-settings/test/acceptance/routing.test.ts
  • apps/admin-x-settings/test/acceptance/search.test.ts
  • apps/admin/src/settings/growth/explore.acceptance.test.tsx
  • apps/admin/src/settings/growth/network.acceptance.test.tsx
  • apps/admin/src/settings/growth/tips-and-donations.acceptance.test.tsx
  • apps/admin/src/settings/layout.acceptance.test.tsx
  • apps/admin/src/settings/permissions.acceptance.test.tsx
  • apps/admin/src/settings/routing.acceptance.test.tsx
  • apps/admin/src/settings/search.acceptance.test.tsx
  • apps/admin/src/settings/settings.screen.ts
  • apps/admin/test-utils/acceptance/index.ts
  • apps/admin/test-utils/acceptance/worker.ts
  • packages/testing/test-data/src/selectors/settings.ts
💤 Files with no reviewable changes (7)
  • apps/admin-x-settings/test/acceptance/layout.test.ts
  • apps/admin-x-settings/test/acceptance/routing.test.ts
  • apps/admin-x-settings/test/acceptance/growth/tips-and-donations.test.ts
  • apps/admin-x-settings/test/acceptance/permissions.test.ts
  • apps/admin-x-settings/test/acceptance/search.test.ts
  • apps/admin-x-settings/test/acceptance/growth/network.test.ts
  • apps/admin-x-settings/test/acceptance/growth/explore.test.ts

Walkthrough

Replaces removed admin-x-settings Playwright tests with Admin acceptance suites covering growth settings, layout behavior, permissions, routing, and search. Adds shared settings selectors and a settingsScreen helper, re-exports configResponse, and updates fakeEndpoint to capture request payloads for assertions.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: migrating settings acceptance tests into Admin.
Description check ✅ Passed The description accurately summarizes the migration, deleted legacy specs, and added helpers and coverage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/settings-test-batch-1

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.

@nx-cloud

nx-cloud Bot commented Jul 15, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 935009e

Command Status Duration Result
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 6m 54s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-s... ✅ Succeeded 4m 56s View ↗
nx run ghost-admin:test ✅ Succeeded 2m 54s View ↗
nx run @tryghost/admin:build ✅ Succeeded 2m 19s View ↗
nx run @tryghost/admin:test:acceptance ✅ Succeeded 1m 42s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 19s View ↗
nx run-many -t lint -p @tryghost/admin-x-settin... ✅ Succeeded 55s View ↗
nx run @tryghost/activitypub:test:acceptance ✅ Succeeded 41s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-15 19:13:19 UTC

@9larsons
9larsons marked this pull request as ready for review July 15, 2026 19:06
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.01%. Comparing base (77790bf) to head (935009e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29367      +/-   ##
==========================================
- Coverage   74.01%   74.01%   -0.01%     
==========================================
  Files        1578     1578              
  Lines      137508   137508              
  Branches    16648    16648              
==========================================
- Hits       101772   101770       -2     
- Misses      34691    34692       +1     
- Partials     1045     1046       +1     
Flag Coverage Δ
admin-tests 55.33% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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