diff --git a/test/e2e/specs/site-editor/block-list-panel-preference.spec.js b/test/e2e/specs/site-editor/block-list-panel-preference.spec.js index d933714017977e..7a6e83d09cf7ca 100644 --- a/test/e2e/specs/site-editor/block-list-panel-preference.spec.js +++ b/test/e2e/specs/site-editor/block-list-panel-preference.spec.js @@ -38,5 +38,12 @@ test.describe( 'Block list view', () => { await expect( page.locator( 'role=region[name="List View"i]' ) ).toBeVisible(); + + // The preferences cleanup. + await page.evaluate( () => { + window.wp.data + .dispatch( 'core/preferences' ) + .set( 'core/edit-site', 'showListViewByDefault', false ); + } ); } ); } );