"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts" between
dspace-angular-dspace-7.0.tar.gz and dspace-angular-dspace-7.1.tar.gz

About: dspace-angular is the Angular-based frontend of DSpace, a digital repository system to capture, store, index, preserve and redistribute an organization’s research material in digital formats.

admin-sidebar.component.spec.ts  (dspace-angular-dspace-7.0):admin-sidebar.component.spec.ts  (dspace-angular-dspace-7.1)
skipping to change at line 116 skipping to change at line 116
comp.sidebarClosed = false; comp.sidebarClosed = false;
comp.startSlide({ fromState: 'collapsed' } as any); comp.startSlide({ fromState: 'collapsed' } as any);
}); });
it('should set the sidebarOpen to true', () => { it('should set the sidebarOpen to true', () => {
expect(comp.sidebarOpen).toBeTruthy(); expect(comp.sidebarOpen).toBeTruthy();
}); });
}); });
}); });
describe('when the collapse icon is clicked', () => {
beforeEach(() => {
spyOn(menuService, 'toggleMenu');
const sidebarToggler = fixture.debugElement.query(By.css('#sidebar-collaps
e-toggle')).query(By.css('a.shortcut-icon'));
sidebarToggler.triggerEventHandler('click', {
preventDefault: () => {/**/
}
});
});
it('should call toggleMenu on the menuService', () => {
expect(menuService.toggleMenu).toHaveBeenCalled();
});
});
describe('when the collapse link is clicked', () => { describe('when the collapse link is clicked', () => {
beforeEach(() => { beforeEach(() => {
spyOn(menuService, 'toggleMenu'); spyOn(menuService, 'toggleMenu');
const sidebarToggler = fixture.debugElement.query(By.css('#sidebar-collaps e-toggle')).query(By.css('.sidebar-collapsible')).query(By.css('a')); const sidebarToggler = fixture.debugElement.query(By.css('#sidebar-collaps e-toggle > a'));
sidebarToggler.triggerEventHandler('click', { sidebarToggler.triggerEventHandler('click', {
preventDefault: () => {/**/ preventDefault: () => {/**/
} }
}); });
}); });
it('should call toggleMenu on the menuService', () => { it('should call toggleMenu on the menuService', () => {
expect(menuService.toggleMenu).toHaveBeenCalled(); expect(menuService.toggleMenu).toHaveBeenCalled();
}); });
}); });
 End of changes. 2 change blocks. 
17 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)