Skip to content

Commit 476c8eb

Browse files
Fix CI failures: e2e name conflicts and PHP test issues
E2E tests: The menuitemradio name 'Edit' matched 3 elements (our intent choice plus Visual/Code editor modes). Switch to regex patterns (e.g., /^Suggest/, /^View\s+Read-only/) to uniquely match intent switcher items by their label + info text. Also add waitFor on the menu item in switchIntent for timing resilience. PHP tests: Allow empty note content when _wp_suggestion meta is present (matches the existing pattern for resolution notes). Fix test_editor_can_update_note_on_own_post by setting comment_approved. Fix test_suggestion_status_ignores_invalid_value to check the stored value rather than expecting a 400 (WP meta enum validation silently drops invalid values). Refs #73411
1 parent 6698334 commit 476c8eb

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/e2e/specs/editor/various/suggestion-mode.spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ async function switchIntent( page, intentLabel ) {
77
await page.click(
88
'role=region[name="Editor top bar"i] >> role=button[name="Options"i]'
99
);
10-
await page
11-
.getByRole( 'menuitemradio', { name: intentLabel, exact: true } )
12-
.click();
10+
const menuItem = page.getByRole( 'menuitemradio', {
11+
name: new RegExp( `^${ intentLabel }` ),
12+
} );
13+
await menuItem.waitFor( { state: 'visible', timeout: 10000 } );
14+
await menuItem.click();
1315
}
1416

1517
test.describe( 'Suggestion mode', () => {

0 commit comments

Comments
 (0)