From 6a8a55f97085296edc8339c47533eb9e2d52b2a6 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Thu, 2 Feb 2023 13:40:40 +0100 Subject: [PATCH] Customizing widgets test: click on widget test to unfocus editor and hide toolbar --- test/e2e/specs/widgets/customizing-widgets.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/specs/widgets/customizing-widgets.spec.js b/test/e2e/specs/widgets/customizing-widgets.spec.js index 0326cf09249dc2..01b6cf7e13ea70 100644 --- a/test/e2e/specs/widgets/customizing-widgets.spec.js +++ b/test/e2e/specs/widgets/customizing-widgets.spec.js @@ -262,6 +262,7 @@ test.describe( 'Widgets Customizer', () => { await expect( firstParagraphBlock ).toBeFocused(); // Expect to focus on a already focused widget. + await paragraphWidget.click(); // noop click on the widget text to unfocus the editor and hide toolbar await editParagraphWidget.click(); await expect( firstParagraphBlock ).toBeFocused(); @@ -272,6 +273,8 @@ test.describe( 'Widgets Customizer', () => { const editHeadingWidget = headingWidget.locator( 'role=button[name="Click to edit this widget."i]' ); + + await headingWidget.click(); // noop click on the widget text to unfocus the editor and hide toolbar await editHeadingWidget.click(); const headingBlock = page.locator(