mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-10-08 14:51:14 +00:00
[AAE-12877] Fix - The left sidebar menu is not expanding after clicki… (#3023)
* [AAE-12877] Fix - The left sidebar menu is not expanding after clicking on hamburger menu * unit test improvement
This commit is contained in:
@@ -31,7 +31,7 @@ import { ContentActionRef } from '@alfresco/adf-extensions';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
||||
import { AppExtensionService, SharedToolbarModule } from '@alfresco/aca-shared';
|
||||
import { CoreModule } from '@alfresco/adf-core';
|
||||
import { CoreModule, SidenavLayoutComponent } from '@alfresco/adf-core';
|
||||
import { AppSearchInputModule } from '../search/search-input.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
@@ -95,6 +95,18 @@ describe('AppHeaderComponent', () => {
|
||||
expect(component.actions).toEqual(actions);
|
||||
}));
|
||||
|
||||
it('should minimize sidenav on toggle sidenav click', () => {
|
||||
const layout = TestBed.createComponent(SidenavLayoutComponent);
|
||||
const mockData: any = { layout: layout.componentInstance, isMenuMinimized: true };
|
||||
component.data = mockData;
|
||||
|
||||
const toggleMenuSpy = spyOn(component.data.layout, 'toggleMenu');
|
||||
component.onToggleSidenav(true);
|
||||
|
||||
expect(toggleMenuSpy).toHaveBeenCalled();
|
||||
expect(component.isSidenavExpanded).toBe(false);
|
||||
});
|
||||
|
||||
describe('Search input', () => {
|
||||
beforeEach(() => {
|
||||
localStorage.clear();
|
||||
|
Reference in New Issue
Block a user