Skip to content

Commit

Permalink
Try to fix perf test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 10, 2024
1 parent dd3dab9 commit b691c1b
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions test/performance/specs/post-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,11 @@ test.describe( 'Post Editor Performance', () => {
// Go to the test page.
await admin.editPost( draftId );
await perfUtils.disableAutosave();
const globalInserterToggle = page.getByRole( 'button', {
name: 'Block Inserter',
} );
const globalInserterToggle = page
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', {
name: 'Block Inserter',
} );

const samples = 10;
const throwaway = 1;
Expand Down Expand Up @@ -424,9 +426,11 @@ test.describe( 'Post Editor Performance', () => {
// Go to the test page.
await admin.editPost( draftId );
await perfUtils.disableAutosave();
const globalInserterToggle = page.getByRole( 'button', {
name: 'Block Inserter',
} );
const globalInserterToggle = page
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', {
name: 'Block Inserter',
} );
// Open Inserter.
await globalInserterToggle.click();

Expand Down Expand Up @@ -483,9 +487,11 @@ test.describe( 'Post Editor Performance', () => {
await admin.editPost( draftId );
await perfUtils.disableAutosave();

const globalInserterToggle = page.getByRole( 'button', {
name: 'Block Inserter',
} );
const globalInserterToggle = page
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', {
name: 'Block Inserter',
} );
const paragraphBlockItem = page.locator(
'.block-editor-inserter__menu .editor-block-list-item-paragraph'
);
Expand Down Expand Up @@ -535,9 +541,11 @@ test.describe( 'Post Editor Performance', () => {
test( 'Run the test', async ( { page, admin, perfUtils } ) => {
await admin.createNewPost();
await perfUtils.disableAutosave();
const globalInserterToggle = page.getByRole( 'button', {
name: 'Block Inserter',
} );
const globalInserterToggle = page
.getByRole( 'region', { name: 'Editor top bar' } )
.getByRole( 'button', {
name: 'Block Inserter',
} );

const testPatterns = [
{
Expand Down

0 comments on commit b691c1b

Please sign in to comment.