From bbbe2ff04789fe2165054d27c2c4dd92e7675840 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 18 Dec 2023 13:43:18 +0100 Subject: [PATCH] Fix unit tests --- packages/edit-post/src/store/test/actions.js | 2 +- packages/edit-site/src/store/actions.js | 2 +- packages/edit-site/src/store/test/actions.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edit-post/src/store/test/actions.js b/packages/edit-post/src/store/test/actions.js index 5d47f6e49fad1..82c80eb0f5273 100644 --- a/packages/edit-post/src/store/test/actions.js +++ b/packages/edit-post/src/store/test/actions.js @@ -271,7 +271,7 @@ describe( 'actions', () => { .select( preferencesStore ) .get( 'core/edit-post', 'fixedToolbar' ) ).toBe( true ); - expect( registry.select( editPostStore ).isListViewOpened() ).toBe( + expect( registry.select( editorStore ).isListViewOpened() ).toBe( false ); expect( registry.select( editorStore ).isInserterOpened() ).toBe( diff --git a/packages/edit-site/src/store/actions.js b/packages/edit-site/src/store/actions.js index d3230c00719a3..820c6f5239cce 100644 --- a/packages/edit-site/src/store/actions.js +++ b/packages/edit-site/src/store/actions.js @@ -608,7 +608,7 @@ export const toggleDistractionFree = registry .dispatch( preferencesStore ) .set( 'core/edit-site', 'fixedToolbar', true ); - dispatch.dispatch( editorStore ).setIsInserterOpened( false ); + registry.dispatch( editorStore ).setIsInserterOpened( false ); registry.dispatch( editorStore ).setIsListViewOpened( false ); dispatch.closeGeneralSidebar(); } ); diff --git a/packages/edit-site/src/store/test/actions.js b/packages/edit-site/src/store/test/actions.js index c0d6ed61f4ef5..a0ea9b2fe0885 100644 --- a/packages/edit-site/src/store/test/actions.js +++ b/packages/edit-site/src/store/test/actions.js @@ -121,7 +121,7 @@ describe( 'actions', () => { registry .dispatch( preferencesStore ) .set( 'core/edit-site', 'fixedToolbar', true ); - registry.dispatch( editSiteStore ).setIsListViewOpened( true ); + registry.dispatch( editorStore ).setIsListViewOpened( true ); registry .dispatch( editSiteStore ) .openGeneralSidebar( 'edit-site/global-styles' );