Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf metrics: update select and other metrics to use non-empty paragraphs #66762

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always forget the rule when we should make labels compatible with old branches, but this seems to be okay since tests create the fixtures.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it shouldn't be needed since in both environments we create filled paragraphs now.

} );

const samples = 10;
Expand Down
Loading