Conversation
|
This is looking good! Did a quick smoke test to see how this was progressing and everything seems to be working. This branch does show some problems that have been fixed on |
| it( 'renders without crashing', () => { | ||
| const app = renderer.create( <RootComponent /> ); | ||
| renderer.act( () => { | ||
| jest.runAllTicks(); |
There was a problem hiding this comment.
Interesting!
Can we add a comment saying why/when is this needed? 🤔
There was a problem hiding this comment.
Added one here for the same reason.
It seems that when EDIT_ENTITY_RECORD is dispatched using this generator function it's done so asynchronously, meaning the promise does not resolve immediately even during tests.
Which makes resetEditorBlocks async which means setupEditorState which comes right after is delayed which means isReady will be true after some time which means editorDidMount will also be called after some time.
This is related to the changes made on core data entities so I figured it was safe to update our tests for now. I'll try to find a good explanation for this and add something 👍
There was a problem hiding this comment.
This is very inconvenient to enforce running fake timers but I guess this is what it is. I don't think we use unit tests to test the root component for the web code.
mchowning
left a comment
There was a problem hiding this comment.
LGTM!
Other than the minor styling issue with the heading level icons (noted in the gutenberg pr) this looks good. Going ahead and approving this since I think that issue is fine to address separately.
Fixes #1332
This PR brings us back to targeting gutenberg
masterGutenberg PR: WordPress/gutenberg#17228
To test:
Update release notes:
RELEASE-NOTES.txt.