-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added browser tests covering the editor's basic saving behavior #22577
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes introduce new end-to-end and acceptance tests for the editor’s saving functionality. An asynchronous test case for saving content in the lexical editor has been added, which simulates user interaction by clicking, pasting text using the new Possibly related PRs
Suggested reviewers
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 ESLint
ghost/admin/tests/acceptance/editor/lexical-test.jsOops! Something went wrong! :( ESLint: 8.44.0 Error: Failed to load parser '@babel/eslint-parser' declared in 'ghost/admin/.eslintrc.js': Cannot find module '@babel/eslint-parser'
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (9)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
34fd926
to
28af5df
Compare
Curious about this one - did the editor fail, or did the API fail to do what was expected? Would you mind taking a moment to outline the exact failure mechanism we're trying to defend against? |
The mechanism of the bug was:
There's definitely a missing unit test or 2 for the slug-generating behavior, which I'll add to this PR as well, and should be sufficient to protect against this exact failure mode in the future. This browser/e2e test is intended as more of a smoke test / safety blanket to protect against any other bugs of this general breed, where a frontend bug can have unintended cascading failures ultimately resulting in posts not saving. I have a todo to look into the admin test more. The way it's currently written, it doesn't catch this bug because (I think) it's using a mock API that bypasses the validation, so it just assumes the backend saves successfully — hence the browser test. |
ref https://linear.app/ghost/issue/ONC-833/support-escalation-re-issue-with-saving-articles-urgent
POST
request to fail with a validation error.