[ACA-2208] Hide app menu on swipe (#934)

* mobile: hide app menu on swipe left

* check for mobile screen size

* space for click out on small devices

* added test

* fix test
This commit is contained in:
Denys Vuika
2019-02-13 20:15:10 +00:00
committed by GitHub
parent 51b08d2283
commit 7c38201500
4 changed files with 34 additions and 1 deletions

View File

@@ -163,4 +163,19 @@ describe('AppLayoutComponent', () => {
done();
});
});
it('should close menu on mobile screen size', () => {
component.minimizeSidenav = false;
component.layout.container = {
isMobileScreenSize: true,
toggleMenu: () => {}
};
spyOn(component.layout.container, 'toggleMenu');
fixture.detectChanges();
component.hideMenu(<any>{ preventDefault: () => {} });
expect(component.layout.container.toggleMenu).toHaveBeenCalled();
});
});