From a2a0b1329fda9f134d38566347013b4672e1bee9 Mon Sep 17 00:00:00 2001 From: Christian Gastrell Date: Fri, 22 May 2026 16:31:36 -0300 Subject: [PATCH] e2e-commons: match editor panel menuitemcheckbox name exactly The `openSettings` helper used `getByRole( 'menuitemcheckbox', { name: target } )`, which does a substring match. After #49034 enabled the subscriptions module by default, the editor More menu now exposes both "Jetpack" and "Jetpack Newsletter" panels, so `openSettings( 'Jetpack' )` matches two elements and Playwright throws a strict-mode violation. Adding `exact: true` restores the original single-match behavior. --- tools/e2e-commons/pages/editor-page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/e2e-commons/pages/editor-page.ts b/tools/e2e-commons/pages/editor-page.ts index e50deedbe9af..553344231ab3 100644 --- a/tools/e2e-commons/pages/editor-page.ts +++ b/tools/e2e-commons/pages/editor-page.ts @@ -64,7 +64,7 @@ export default class EditorPage extends Editor { if ( target !== 'Settings' ) { await this.openMoreOptionsMenu(); - button = this.page.getByRole( 'menuitemcheckbox', { name: target } ); + button = this.page.getByRole( 'menuitemcheckbox', { name: target, exact: true } ); } if ( await this.#targetIsOpen( button ) ) {