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
15 changes: 7 additions & 8 deletions test/e2e/specs/editor/various/post-content-focus-mode.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ test.describe( 'Post Content focus mode', () => {
await requestUtils.activateTheme( 'emptytheme' );
} );

test.beforeEach( async ( { requestUtils } ) => {
// "Show template" persists the rendering mode in user preferences.
// Reset before each test so it starts in post-only mode regardless
// of state leaked from previous tests or test files in the shard.
await requestUtils.resetPreferences();
} );

test.afterAll( async ( { requestUtils } ) => {
await requestUtils.activateTheme( 'twentytwentyone' );
// Reset preferences so the persisted "Show template" rendering mode
// does not leak into subsequent test files.
await requestUtils.resetPreferences();
} );

Expand Down Expand Up @@ -115,12 +120,6 @@ test.describe( 'Post Content focus mode', () => {
} );
} );

test.afterEach( async ( { requestUtils } ) => {
// "Show template" persists the rendering mode in user preferences.
// Reset between tests so each test starts in post-only mode.
await requestUtils.resetPreferences();
} );

test.afterAll( async ( { requestUtils } ) => {
await requestUtils.deleteAllTemplates( 'wp_template' );
await requestUtils.deleteAllTemplates( 'wp_template_part' );
Expand Down
Loading