From 9bd8fd3b07ec8e3b5ff1509213ea3383730826e5 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Fri, 20 Dec 2024 12:05:19 -0600 Subject: [PATCH] Fix duplicate locator issue in test --- test/e2e/specs/editor/blocks/search.spec.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/specs/editor/blocks/search.spec.js b/test/e2e/specs/editor/blocks/search.spec.js index 3a72f99b7cf0b3..e14b07dae3cad5 100644 --- a/test/e2e/specs/editor/blocks/search.spec.js +++ b/test/e2e/specs/editor/blocks/search.spec.js @@ -44,7 +44,10 @@ test.describe( 'Search', () => { } ); await navBlockInserter.click(); - await page.getByRole( 'button', { name: 'Add block' } ).click(); + // Move to and activate the "Add Block" button. + await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'Tab' ); + await page.keyboard.press( 'Enter' ); // Click on the Search block option. await page.getByRole( 'option', { name: 'Search' } ).click();