Skip to content

Commit

Permalink
Update Site Editor’s reducer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Aug 18, 2021
1 parent a43c8ec commit ad4e5ee
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions packages/edit-site/src/store/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,22 +180,7 @@ describe( 'state', () => {
} );
} );

it( 'should change the menu to root when closing the panel', () => {
const state = navigationPanel(
undefined,
openNavigationPanelToMenu( 'test-menu' )
);

expect( state.menu ).toEqual( 'test-menu' );
expect(
navigationPanel( state, setIsNavigationPanelOpened( false ) )
).toEqual( {
isOpen: false,
menu: 'root',
} );
} );

it( 'should close the navigation panel when opening the inserter and change the menu to root', () => {
it( 'should close the navigation panel when opening the inserter', () => {
const state = navigationPanel(
undefined,
openNavigationPanelToMenu( 'test-menu' )
Expand All @@ -206,11 +191,11 @@ describe( 'state', () => {
navigationPanel( state, setIsInserterOpened( true ) )
).toEqual( {
isOpen: false,
menu: 'root',
menu: 'test-menu',
} );
} );

it( 'should close the navigation panel when opening the list view and change the menu to root', () => {
it( 'should close the navigation panel when opening the list view', () => {
const state = navigationPanel(
undefined,
openNavigationPanelToMenu( 'test-menu' )
Expand All @@ -221,7 +206,7 @@ describe( 'state', () => {
navigationPanel( state, setIsListViewOpened( true ) )
).toEqual( {
isOpen: false,
menu: 'root',
menu: 'test-menu',
} );
} );

Expand Down

0 comments on commit ad4e5ee

Please sign in to comment.