From 7a788c6b8c6e2a0fb5bda78c3026a43fd3944cf7 Mon Sep 17 00:00:00 2001 From: Piotr Delawski Date: Wed, 15 Sep 2021 14:18:47 +0200 Subject: [PATCH] Try fixing flaky E2E test --- tests/e2e/specs/admin/amp-options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/e2e/specs/admin/amp-options.js b/tests/e2e/specs/admin/amp-options.js index b535d3c802f..5cb8df8db19 100644 --- a/tests/e2e/specs/admin/amp-options.js +++ b/tests/e2e/specs/admin/amp-options.js @@ -152,6 +152,7 @@ describe( 'AMP settings screen Review panel', () => { } it( 'is present on the page', async () => { + await page.waitForSelector( '.settings-site-review' ); await expect( page ).toMatchElement( 'h2', { text: 'Review' } ); await expect( page ).toMatchElement( 'h3', { text: 'Need help?' } ); await expect( page ).toMatchElement( '.settings-site-review__list li', { text: /support forums/i } ); @@ -188,6 +189,8 @@ describe( 'AMP settings screen Review panel', () => { await expect( page ).not.toMatchElement( 'h2', { text: 'Review' } ); await visitAdminPage( 'admin.php', 'page=amp-options' ); + + await page.waitForSelector( '.settings-site-review' ); await expect( page ).toMatchElement( 'h2', { text: 'Review' } ); await clickMode( 'standard' );