Skip to content

Commit

Permalink
Do not wait for requestMetaBoxUpdates to finish
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Nov 26, 2020
1 parent 28e439b commit 3470c38
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ describe( 'PostPublishButton', () => {
await page.$( '.editor-post-publish-button[aria-disabled="true"]' )
).toBeNull();

await page.evaluate( () =>
window.wp.data.dispatch( 'core/edit-post' ).requestMetaBoxUpdates()
);
await page.evaluate( () => {
window.wp.data.dispatch( 'core/edit-post' ).requestMetaBoxUpdates();
return true;
} );
expect(
await page.$( '.editor-post-publish-button[aria-disabled="true"]' )
).not.toBeNull();
Expand Down

0 comments on commit 3470c38

Please sign in to comment.