From 2b9afb07bc29c42fa106b6210cccd4273734d139 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Thu, 5 Aug 2021 14:16:13 +0800 Subject: [PATCH] Try to fix flaky customizer inspector test --- .../e2e-tests/specs/widgets/customizing-widgets.test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/e2e-tests/specs/widgets/customizing-widgets.test.js b/packages/e2e-tests/specs/widgets/customizing-widgets.test.js index 3a6739c9522c83..76a9614f593ef7 100644 --- a/packages/e2e-tests/specs/widgets/customizing-widgets.test.js +++ b/packages/e2e-tests/specs/widgets/customizing-widgets.test.js @@ -204,6 +204,15 @@ describe( 'Widgets Customizer', () => { await expect( inspectorHeading ).not.toBeVisible(); + // Wait for the transition to finish to prevent it from + // clicking on the wrong element. + // The transition takes 180ms, 200ms should be enough. + // This is a temporary solution, a more ideal alternative + // would be to disable the transition entirely. + // See https://github.com/WordPress/gutenberg/pull/33875#issuecomment-893122147 + // eslint-disable-next-line no-restricted-syntax + await page.waitForTimeout( 200 ); + await clickBlockToolbarButton( 'Options' ); showMoreSettingsButton = await find( { role: 'menuitem',