-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[RNMobile] Use internal initializeEditor
for integration tests
#39224
[RNMobile] Use internal initializeEditor
for integration tests
#39224
Conversation
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
Removing myself from the reviewers list for a bit since I won't have the chance to add a review in the next couple of days or so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this doesn't appear to be a large change, I'll try to confirm shortly that all the tests pass in your branch locally to confirm that this doesn't break the downstream tests.
// for this reason it's imported with path access. | ||
// eslint-disable-next-line no-restricted-syntax | ||
import Editor from '@wordpress/edit-post/src/editor'; | ||
import { initializeEditor as internalInitializeEditor } from '@wordpress/edit-post'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proxying through the internal initializeEditor
makes a lot of sense to me because of the introduction of the dispatching to the preferences store.
Description
The helper function
initializeEditor
, which is used for initializing the editor in integration tests, gets the Editor component directly from the@wordpress/edit-post
package, instead of using theinitializeEditor
function provided by the same package (reference). I can't recall why we decided to initialize the editor this way, probably was related to the fact that theinitializeEditor
function just returns the editor element, so we could skip it. However, with the changes that will be introduced in #39180, now we'll have some logic that is required for initializing the editor in that function hence, we should use it for getting the Editor component in integration tests.Testing Instructions
npm run native test
and observe that all test passes.Unit Tests / Mobile
PR check passes.Screenshots
N/A
Types of changes
Enhancement
Checklist:
*.native.js
files for terms that need renaming or removal).