Skip to content

Commit

Permalink
Try waiting for save draft
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Feb 19, 2023
1 parent 749cd73 commit 6d464e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/e2e-tests/specs/performance/site-editor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe( 'Site Editor Performance', () => {
);

await createNewPost( { postType: 'page' } );
await page.evaluate( ( _html ) => {
await page.evaluate( async ( _html ) => {
const { parse } = window.wp.blocks;
const { dispatch } = window.wp.data;
const blocks = parse( _html );
Expand All @@ -71,8 +71,9 @@ describe( 'Site Editor Performance', () => {
}
} );

dispatch( 'core/block-editor' ).resetBlocks( blocks );
await dispatch( 'core/block-editor' ).resetBlocks( blocks );
}, html );
await page.waitForTimeout( 3000 ); // eslint-disable-line no-restricted-syntax
await saveDraft();

id = await page.evaluate( () =>
Expand Down

0 comments on commit 6d464e4

Please sign in to comment.