Moved timezone display test from e2e-browser to Ember acceptance#27036
Moved timezone display test from e2e-browser to Ember acceptance#27036
Conversation
The test verifies that the post settings menu date-time-picker displays the correct time when the site timezone changes. This is a client-side formatting concern that doesn't need a full browser e2e test — Mirage can mock the settings and post data directly.
WalkthroughThis pull request introduces a new Ember acceptance test suite for the post settings menu in the editor, replacing existing Playwright-based end-to-end tests. A test file is added at 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ghost/admin/tests/acceptance/editor/post-settings-menu-test.js (1)
47-47: Strengthen the date assertion to avoid false positives.Line 47 only validates the day suffix, so incorrect month/year would still pass. Prefer asserting the full expected date string.
Proposed tweak
- expect(find('[data-test-date-time-picker-date-input]').value, 'date in JST').to.match(/-15$/); + expect(find('[data-test-date-time-picker-date-input]').value, 'date in JST').to.equal('2024-01-15');🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ghost/admin/tests/acceptance/editor/post-settings-menu-test.js` at line 47, The current assertion on find('[data-test-date-time-picker-date-input]').value only checks the day suffix and can pass with wrong month/year; update the test in post-settings-menu-test.js to assert the full expected date string (e.g., exact YYYY-MM-DD or the complete formatted value you expect) instead of using /\. -15$/—locate the expect call that wraps find('[data-test-date-time-picker-date-input]').value and replace the partial regex check with a strict equality or full-match regex for the complete date string so the test fails for incorrect month/year.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ghost/admin/tests/acceptance/editor/post-settings-menu-test.js`:
- Line 47: The current assertion on
find('[data-test-date-time-picker-date-input]').value only checks the day suffix
and can pass with wrong month/year; update the test in
post-settings-menu-test.js to assert the full expected date string (e.g., exact
YYYY-MM-DD or the complete formatted value you expect) instead of using /\.
-15$/—locate the expect call that wraps
find('[data-test-date-time-picker-date-input]').value and replace the partial
regex check with a strict equality or full-match regex for the complete date
string so the test fails for incorrect month/year.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a12bc420-09e8-40bd-b26c-ad986b1f966d
📒 Files selected for processing (2)
ghost/admin/tests/acceptance/editor/post-settings-menu-test.jsghost/core/test/e2e-browser/admin/publishing.spec.js
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27036 +/- ##
==========================================
+ Coverage 73.20% 73.27% +0.07%
==========================================
Files 1540 1530 -10
Lines 121786 121733 -53
Branches 14713 14707 -6
==========================================
+ Hits 89149 89199 +50
+ Misses 31606 31537 -69
+ Partials 1031 997 -34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
) ref https://linear.app/ghost/issue/PLA-10/ The test verifies that the post settings menu date-time-picker displays the correct time when the site timezone changes. This is a client-side formatting concern that doesn't need a full browser e2e test — Mirage can mock the settings and post data directly - it likely never should've been an e2e test.



ref https://linear.app/ghost/issue/PLA-10/
The test verifies that the post settings menu date-time-picker displays the correct time when the site timezone changes. This is a client-side formatting concern that doesn't need a full browser e2e test — Mirage can mock the settings and post data directly - it likely never should've been an e2e test.