Skip to content

Moved advanced settings acceptance tests into Admin - #29395

Merged
9larsons merged 2 commits into
mainfrom
codex/settings-test-batch-7
Jul 16, 2026
Merged

Moved advanced settings acceptance tests into Admin#29395
9larsons merged 2 commits into
mainfrom
codex/settings-test-batch-7

Conversation

@9larsons

@9larsons 9larsons commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What changed

  • moved the final 14 test-bearing advanced Settings Playwright files into two Admin Vitest Browser acceptance suites
  • consolidated 29 legacy declarations (27 active, 2 skipped) into 25 behavior-focused tests
  • activated the previously skipped Labs redirects/routes upload and download coverage
  • added reusable typed fakeActions and fakeIntegrations acceptance resources
  • strengthened coverage for destructive-action success, History's initial and filtered NQL, and integration behavior
  • split custom integration CRUD, API-key regeneration, and webhook CRUD into isolated tests
  • explicitly covers Slack's modal Save path and verifies both Pintura Upload buttons are wired to the correct file inputs
  • left persistence and host-limit behavior with the existing real E2E coverage for Unsplash, Pintura, Transistor, and Zapier
  • retained one temporary hello world Playwright test so the existing Settings acceptance CI target does not fail with No tests found

After this PR, only the temporary placeholder remains in the legacy Settings acceptance lane. The follow-up teardown slice can remove it together with the old Playwright target, config, dependency, and fixtures.

Validation

  • pnpm --filter admin test:acceptance (49 files, 322 tests)
  • pnpm --filter admin-x-settings test:acceptance (1 placeholder test)
  • pnpm --filter admin typecheck
  • targeted Admin ESLint for the migrated tests and acceptance resources
  • pnpm --filter admin-x-settings lint
  • git diff --check
  • independent review agent, findings incorporated, final pass clean

Follow-ups

  • remove the temporary Settings Playwright placeholder and all legacy acceptance plumbing
  • WebhookModal changes an uncontrolled input to controlled while editing a custom webhook
  • the reset-auth acceptance check intentionally returns 400 after capturing the mutation to avoid navigation; the successful mutation is owned by the danger-zone E2E test, but this duplicate produces expected console noise
  • the full acceptance run still reports a controlled/uncontrolled Switch warning; track down the owning settings flow separately

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

@nx-cloud

nx-cloud Bot commented Jul 16, 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 7d02b28

Command Status Duration Result
nx run @tryghost/admin:test:acceptance ✅ Succeeded 5m 11s View ↗
nx run-many -t test:unit -p @tryghost/admin-x-s... ✅ Succeeded 2m 20s View ↗
nx run @tryghost/admin:build ✅ Succeeded 1m 56s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded 20s View ↗
nx run-many -t lint -p @tryghost/admin-x-settin... ✅ Succeeded 1m 5s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded 1s View ↗
nx run @tryghost/admin-x-settings:test:acceptance ✅ Succeeded 6s View ↗

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


☁️ Nx Cloud last updated this comment at 2026-07-16 16:51:46 UTC

@coderabbitai

coderabbitai Bot commented Jul 16, 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: c4ea8498-4747-4db3-a6a3-fc4d528d073d

📥 Commits

Reviewing files that changed from the base of the PR and between 7d02b28 and 07d1e38.

📒 Files selected for processing (2)
  • apps/admin-x-settings/test/acceptance/membership/signup-embed.test.ts
  • apps/admin/src/settings/advanced/integrations.acceptance.test.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/admin-x-settings/test/acceptance/membership/signup-embed.test.ts
  • apps/admin/src/settings/advanced/integrations.acceptance.test.tsx

Walkthrough

Adds Admin browser acceptance tests for Advanced settings and integrations, covering settings updates, danger-zone actions, filters, migration and export tools, Labs operations, history, integration CRUD, validation, uploads, API keys, plan limits, and ordering. Extends shared test utilities with typed integration and action fakes, removes corresponding Admin X suites, and replaces the Signup Embed scaffold with a placeholder.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: moving advanced settings acceptance tests into Admin.
Description check ✅ Passed The description is directly related and summarizes the test migration, new coverage, and placeholder follow-up.
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-7

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.

@9larsons
9larsons force-pushed the codex/settings-test-batch-7 branch from d3e5c0c to 5ded287 Compare July 16, 2026 16:16
@9larsons
9larsons marked this pull request as ready for review July 16, 2026 16:17

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/admin/src/settings/advanced/integrations.acceptance.test.tsx (1)

144-145: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Keep this interaction inside the browser locator API.

Unwrapping the element and calling native click() bypasses locator actionability checks and retries used elsewhere in this suite.

Proposed change
-        const regenerateButton = modal.getByRole("button", {name: "Regenerate"}).element() as HTMLButtonElement;
-        regenerateButton.click();
+        await modal.getByRole("button", {name: "Regenerate"}).click();
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/admin/src/settings/advanced/integrations.acceptance.test.tsx` around
lines 144 - 145, Update the regeneration interaction in the acceptance test to
invoke the locator’s click action directly, keeping it within the browser
locator API. Remove the element unwrapping and native HTMLButtonElement.click()
call while preserving the existing Regenerate button lookup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/admin/src/settings/advanced/integrations.acceptance.test.tsx`:
- Around line 144-145: Update the regeneration interaction in the acceptance
test to invoke the locator’s click action directly, keeping it within the
browser locator API. Remove the element unwrapping and native
HTMLButtonElement.click() call while preserving the existing Regenerate button
lookup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1a00a726-3643-48f2-878d-c86675e35bf1

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3e2b7 and 5ded287.

📒 Files selected for processing (18)
  • apps/admin-x-settings/test/acceptance/advanced/code-injection.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/dangerzone.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/history.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/custom.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/first-promoter.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/integrations-list.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/pintura.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/slack.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/transistor.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/unsplash.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/zapier.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/labs.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/migration-tools.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/spam-filters.test.ts
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/advanced/integrations.acceptance.test.tsx
  • apps/admin/test-utils/acceptance/index.ts
  • apps/admin/test-utils/acceptance/resources.ts
💤 Files with no reviewable changes (14)
  • apps/admin-x-settings/test/acceptance/advanced/integrations/slack.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/migration-tools.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/integrations-list.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/unsplash.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/first-promoter.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/labs.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/spam-filters.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/dangerzone.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/code-injection.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/transistor.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/history.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/zapier.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/custom.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/pintura.test.ts

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

Consolidated the final test-bearing advanced settings suites into the Admin acceptance harness while preserving stronger E2E ownership.
@9larsons
9larsons force-pushed the codex/settings-test-batch-7 branch from 5ded287 to 7d02b28 Compare July 16, 2026 16:24

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/admin-x-settings/test/acceptance/membership/signup-embed.test.ts`:
- Around line 3-6: Update the “Settings acceptance placeholder” test to be
explicitly skipped or marked as fixme, and include a reference to the follow-up
teardown or implementation issue. Do not leave it as an always-passing test with
no assertions or browser actions.

In `@apps/admin/src/settings/advanced/advanced.acceptance.test.tsx`:
- Line 196: Update the usersApi request predicate in the expect.poll assertion
to parse each request URL and read the limit query parameter, matching the
established approach used for actionsApi. Compare the parsed parameter value
with the expected limit while preserving the existing polling behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4beef07-9867-49a8-bc9a-8ccc8dd1f7c6

📥 Commits

Reviewing files that changed from the base of the PR and between 5ded287 and 7d02b28.

📒 Files selected for processing (19)
  • apps/admin-x-settings/test/acceptance/advanced/code-injection.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/dangerzone.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/history.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/custom.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/first-promoter.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/integrations-list.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/pintura.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/slack.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/transistor.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/unsplash.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/zapier.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/labs.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/migration-tools.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/spam-filters.test.ts
  • apps/admin-x-settings/test/acceptance/membership/signup-embed.test.ts
  • apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
  • apps/admin/src/settings/advanced/integrations.acceptance.test.tsx
  • apps/admin/test-utils/acceptance/index.ts
  • apps/admin/test-utils/acceptance/resources.ts
💤 Files with no reviewable changes (14)
  • apps/admin-x-settings/test/acceptance/advanced/integrations/zapier.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/labs.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/integrations-list.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/custom.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/spam-filters.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/history.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/code-injection.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/pintura.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/first-promoter.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/migration-tools.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/transistor.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/slack.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/integrations/unsplash.test.ts
  • apps/admin-x-settings/test/acceptance/advanced/dangerzone.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/admin/test-utils/acceptance/index.ts
  • apps/admin/test-utils/acceptance/resources.ts
  • apps/admin/src/settings/advanced/integrations.acceptance.test.tsx

Comment thread apps/admin/src/settings/advanced/advanced.acceptance.test.tsx
@9larsons
9larsons enabled auto-merge (squash) July 16, 2026 16:30
@9larsons
9larsons disabled auto-merge July 16, 2026 16:35
ref https://linear.app/tryghost/issue/PLA-243

- kept the placeholder discoverable without reporting a false pass
- used locator interaction for API key regeneration
@9larsons
9larsons enabled auto-merge (squash) July 16, 2026 16:50
@9larsons
9larsons merged commit 8444e30 into main Jul 16, 2026
42 checks passed
@9larsons
9larsons deleted the codex/settings-test-batch-7 branch July 16, 2026 16:58
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