Skip to content

Commit

Permalink
Perf metrics: update select and other metrics to use non-empty paragr…
Browse files Browse the repository at this point in the history
…aphs (#66762)

Co-authored-by: ellatrix <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: youknowriad <[email protected]>
  • Loading branch information
4 people authored Nov 5, 2024
1 parent 177c6a2 commit ae29450
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/performance/fixtures/perf-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class PerfUtils {
}

/**
* Generates and loads a 1000 empty paragraphs into the editor canvas.
* Generates and loads a 1000 paragraphs into the editor canvas.
*/
async load1000Paragraphs() {
await this.page.waitForFunction(
Expand All @@ -161,7 +161,7 @@ export class PerfUtils {
const { createBlock } = window.wp.blocks;
const { dispatch } = window.wp.data;
const blocks = Array.from( { length: 1000 } ).map( () =>
createBlock( 'core/paragraph' )
createBlock( 'core/paragraph', { content: 'paragraph' } )
);
dispatch( 'core/block-editor' ).resetBlocks( blocks );
} );
Expand Down
2 changes: 1 addition & 1 deletion test/performance/specs/post-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ test.describe( 'Post Editor Performance', () => {
const canvas = await perfUtils.getCanvas();

const paragraphs = canvas.getByRole( 'document', {
name: /Empty block/i,
name: /Block: Paragraph/i,
} );

const samples = 10;
Expand Down

0 comments on commit ae29450

Please sign in to comment.