Skip to content
Merged
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
Perf: reopen inspector for remaining tests
  • Loading branch information
ellatrix committed Dec 5, 2023
commit 1e43cab02aeab6f420d50683b2cfc9c0a33c7a43
11 changes: 10 additions & 1 deletion test/performance/specs/post-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,13 @@ test.describe( 'Post Editor Performance', () => {
draftId = await perfUtils.saveDraft();
} );

test( 'Run the test', async ( { admin, perfUtils, metrics, page } ) => {
test( 'Run the test', async ( {
admin,
perfUtils,
metrics,
page,
editor,
} ) => {
await admin.editPost( draftId );
await perfUtils.disableAutosave();
const toggleButton = page
Expand All @@ -173,6 +179,9 @@ test.describe( 'Post Editor Performance', () => {
} );

await type( paragraph, metrics, 'typeWithoutInspector' );

// Open the inspector again.
await editor.openDocumentSettingsSidebar();
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also put this in beforeEach somehow. But this is good.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it would be worth dumping all the preferences and setting them in the beforeEach hook to ensure an identical state for each test?

} );
} );

Expand Down