From eebe4495215f33a6b9a7256280f009c2a1c785ee Mon Sep 17 00:00:00 2001 From: Fellan-91 Date: Wed, 20 Nov 2024 15:31:19 +0300 Subject: [PATCH] added delay timers and modal window visibility checks for e2e repeater tests --- .../e2e/specs/editor-block-repeater-control.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/e2e/specs/editor-block-repeater-control.spec.js b/tests/e2e/specs/editor-block-repeater-control.spec.js index 2db5e062..12e39148 100644 --- a/tests/e2e/specs/editor-block-repeater-control.spec.js +++ b/tests/e2e/specs/editor-block-repeater-control.spec.js @@ -33,6 +33,18 @@ test.describe('editor block with Repeater control', () => { await page.getByLabel('“Test Repeater Block” (Edit)').click(); + await page.waitForTimeout(500); + + const closeModal = await page + .locator('.components-modal__header') + .getByRole('button', { name: 'Close' }); + + await page.waitForTimeout(500); + + if (await closeModal.isVisible()) { + await closeModal.click(); + } + await editor.canvas .getByLabel('Inspector Controls') .getByRole('button')