diff --git a/packages/e2e-tests/specs/experiments/blocks/comments-query.test.js b/packages/e2e-tests/specs/experiments/blocks/comments-query.test.js index bfd8966722ba9..55c6b4b07af96 100644 --- a/packages/e2e-tests/specs/experiments/blocks/comments-query.test.js +++ b/packages/e2e-tests/specs/experiments/blocks/comments-query.test.js @@ -64,6 +64,8 @@ describe( 'Comment Query Loop', () => { await page.click( '.wp-block-comments-pagination-previous' ); // We check that there are a previous and a next link. + await page.waitForSelector( '.wp-block-comments-pagination-previous' ); + await page.waitForSelector( '.wp-block-comments-pagination-next' ); expect( await page.$( '.wp-block-comments-pagination-previous' ) ).not.toBeNull(); @@ -73,6 +75,7 @@ describe( 'Comment Query Loop', () => { await page.click( '.wp-block-comments-pagination-previous' ); // We check that there is only have a next link + await page.waitForSelector( '.wp-block-comments-pagination-next' ); expect( await page.$( '.wp-block-comments-pagination-previous' ) ).toBeNull();