Skip to content

Commit

Permalink
Perf tests: make pages test compatible with base branch (#63204)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
3 people committed Jul 5, 2024
1 parent 99798ec commit b64d0ae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/performance/specs/site-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,22 @@ test.describe( 'Site Editor Performance', () => {
} )
);

await admin.visitSiteEditor();
await page.getByRole( 'button', { name: 'Pages' } ).click();

// Check if we're dealing with the old URL structure.
const path = new URL( page.url() ).searchParams.get( 'path' );

const samples = 10;
for ( let i = 1; i <= samples; i++ ) {
// Start from the trash view, then navigate to all pages, so we
// test item loading rather than site editor load as a whole.
// For some reason `visiSiteEditor` does not work with these
// parameters.
await admin.visitAdminPage(
'site-editor.php?postType=page&layout=table&activeView=trash'
path
? 'site-editor.php?path=%2Fpage&layout=table&activeView=trash'
: 'site-editor.php?postType=page&layout=table&activeView=trash'
);

const startTime = performance.now();
Expand Down

0 comments on commit b64d0ae

Please sign in to comment.