mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3512] SidenavLayoutComponent option to show the sidebar on the right (#3768)
* add sidebar end start property * add demo and test * fix test * fix failing test
This commit is contained in:
@@ -114,13 +114,33 @@ describe('HeaderLayoutComponent', () => {
|
||||
expect(button === null).toBeFalsy();
|
||||
});
|
||||
|
||||
it('if showSidenavToggle is false the button menu should not be displayed', () => {
|
||||
it('if showSidenavToggle is false the button menu should not be displayed', () => {
|
||||
component.showSidenavToggle = false;
|
||||
fixture.detectChanges();
|
||||
|
||||
const button = fixture.nativeElement.querySelector('.adf-menu-icon');
|
||||
expect(button === null).toBeTruthy();
|
||||
});
|
||||
|
||||
it('if position is end the button menu should be at the end', () => {
|
||||
component.position = 'end';
|
||||
fixture.detectChanges();
|
||||
|
||||
const buttonStart = fixture.nativeElement.querySelector('#adf-sidebar-toggle-start');
|
||||
const buttonEnd = fixture.nativeElement.querySelector('#adf-sidebar-toggle-end');
|
||||
expect(buttonStart === null).toBeTruthy();
|
||||
expect(buttonEnd === null).toBeFalsy();
|
||||
});
|
||||
|
||||
it('if position is start the button menu should be at the start', () => {
|
||||
component.position = 'start';
|
||||
fixture.detectChanges();
|
||||
|
||||
const buttonStart = fixture.nativeElement.querySelector('#adf-sidebar-toggle-start');
|
||||
const buttonEnd = fixture.nativeElement.querySelector('#adf-sidebar-toggle-end');
|
||||
expect(buttonStart === null).toBeFalsy();
|
||||
expect(buttonEnd === null).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('Template tranclusion', () => {
|
||||
|
Reference in New Issue
Block a user