diff --git a/test/performance/specs/post-editor.spec.js b/test/performance/specs/post-editor.spec.js index 37e38d0d9ec47..20925ebb36587 100644 --- a/test/performance/specs/post-editor.spec.js +++ b/test/performance/specs/post-editor.spec.js @@ -668,7 +668,12 @@ test.describe( 'Post Editor Performance', () => { const startTime = performance.now(); - await page.getByRole( 'tab', { name: 'Test' } ).click(); + // This is the WP v6.5 and older locator. + const oldLocator = page.getByRole( 'button', { name: 'Test' } ); + // This is the WP v6.6 and newer locator. + const newLocator = page.getByRole( 'tab', { name: 'Test' } ); + + await oldLocator.or( newLocator ).click(); await Promise.all( testPatterns.map( async ( pattern ) => {