From 9bcbd6fcd93d16e461cb384fa104cd038b9e188f Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Tue, 2 Jul 2024 09:39:31 +0300 Subject: [PATCH] Performance tests: fix for 6.5 (#62871) Co-authored-by: ellatrix Co-authored-by: Mamaduka --- test/performance/specs/post-editor.spec.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ) => {