Skip to content

Fixed browser-sensitive admin CI tests#28070

Merged
9larsons merged 1 commit into
mainfrom
codex/browser-compat-ci-fixes
May 22, 2026
Merged

Fixed browser-sensitive admin CI tests#28070
9larsons merged 1 commit into
mainfrom
codex/browser-compat-ci-fixes

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

Summary

  • use the numeric keyCode path for the admin search shortcut test helper so keymaster sees the shortcut consistently across Chrome versions
  • stub the billing iframe component's message wrapper instead of mutating cross-origin iframe contentWindow.postMessage
  • avoid pipefail/SIGPIPE when selecting the first Docker image tag from multiline image tag input

Context

This came out of investigating failures on #28047 while testing Blacksmith runners. The changes are not Blacksmith-specific; they harden tests and CI shell behavior that can vary by browser/runtime.

Testing

  • pnpm exec ember exam --split 1 --filter='Acceptance: Search'
  • pnpm exec ember exam --split 1 --filter='Integration: Component: gh-billing-iframe'

ref #28047

The Blacksmith migration exposed a couple of admin tests that depended on browser-version-specific behavior. Use the legacy keyCode path expected by keymaster, avoid stubbing cross-origin iframe contentWindow methods directly, and make the Docker image tag selection pipefail-safe for multiline inputs.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

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: 5fd88a0c-3546-40eb-95e1-8e22de300c9b

📥 Commits

Reviewing files that changed from the base of the PR and between 6be7a48 and d43cad2.

📒 Files selected for processing (3)
  • .github/actions/load-docker-image/action.yml
  • ghost/admin/tests/acceptance/search-test.js
  • ghost/admin/tests/integration/components/gh-billing-iframe-test.js

Walkthrough

This PR contains three independent, small-scale updates across infrastructure and test code. The Docker action refactoring simplifies tag extraction using shell parameter expansion instead of printf/head in two locations. The search test updates keyboard event dispatch to use numeric key codes. The billing iframe integration tests are refactored to stub an internal component method (_postMessageToBillingIframe) instead of the iframe contentWindow postMessage, reflecting changes to component internals.

Possibly related PRs

  • TryGhost/Ghost#28025: The updated gh-billing-iframe-test.js stubs and asserts GhBillingIframe's internal _postMessageToBillingIframe method, which aligns with that PR's changes to route postMessage through that internal helper in the component implementation.
  • TryGhost/Ghost#27875: Both PRs modify .github/actions/load-docker-image/action.yml in the same Docker tag-selection and image-pull flow, overlapping on the first inputs.image-tags extraction logic.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main focus of the changeset: fixing browser-sensitive tests in the admin CI.
Description check ✅ Passed The description is directly related to the changeset and provides clear context about the three types of fixes being made and testing commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/browser-compat-ci-fixes

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.

@9larsons 9larsons enabled auto-merge (squash) May 22, 2026 17:56
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.82%. Comparing base (fcad5b8) to head (d43cad2).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #28070   +/-   ##
=======================================
  Coverage   73.81%   73.82%           
=======================================
  Files        1528     1528           
  Lines      129417   129417           
  Branches    15506    15509    +3     
=======================================
+ Hits        95527    95537   +10     
- Misses      32910    32924   +14     
+ Partials      980      956   -24     
Flag Coverage Δ
admin-tests 54.03% <ø> (ø)
e2e-tests 73.82% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@9larsons 9larsons merged commit b9a0f75 into main May 22, 2026
48 checks passed
@9larsons 9larsons deleted the codex/browser-compat-ci-fixes branch May 22, 2026 18:16
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