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: reopen inspector for remaining tests #56780

Merged
merged 1 commit into from
Dec 5, 2023
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
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
Loading