Skip to content

Commit

Permalink
Performance tests: fix for 6.5 (#62871)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Jul 2, 2024
1 parent 44a82f1 commit 9bcbd6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/performance/specs/post-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) => {
Expand Down

0 comments on commit 9bcbd6f

Please sign in to comment.