"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/datepicker/calendar.spec.ts" between
material2-7.3.3.tar.gz and material2-7.3.4.tar.gz

About: material2 offers Material Design components for Angular.

calendar.spec.ts  (material2-7.3.3):calendar.spec.ts  (material2-7.3.4)
skipping to change at line 191 skipping to change at line 191
calendarBodyEl.querySelector('.mat-calendar-body-active')! as HTML Element; calendarBodyEl.querySelector('.mat-calendar-body-active')! as HTML Element;
spyOn(activeCell, 'focus').and.callThrough(); spyOn(activeCell, 'focus').and.callThrough();
fixture.detectChanges(); fixture.detectChanges();
zone.simulateZoneExit(); zone.simulateZoneExit();
expect(activeCell.focus).not.toHaveBeenCalled(); expect(activeCell.focus).not.toHaveBeenCalled();
}); });
it('should move focus to the active cell when the view changes', () => { it('should move focus to the active cell when the view changes', () => {
calendarInstance.currentView = 'multi-year';
fixture.detectChanges();
const activeCell = const activeCell =
calendarBodyEl.querySelector('.mat-calendar-body-active')! as HTML Element; calendarBodyEl.querySelector('.mat-calendar-body-active')! as HTML Element;
spyOn(activeCell, 'focus').and.callThrough(); spyOn(activeCell, 'focus').and.callThrough();
fixture.detectChanges();
zone.simulateZoneExit();
expect(activeCell.focus).not.toHaveBeenCalled();
calendarInstance.currentView = 'multi-year';
fixture.detectChanges();
zone.simulateZoneExit(); zone.simulateZoneExit();
expect(activeCell.focus).toHaveBeenCalled(); expect(activeCell.focus).toHaveBeenCalled();
}); });
describe('year view', () => { describe('year view', () => {
beforeEach(() => { beforeEach(() => {
dispatchMouseEvent(periodButton, 'click'); dispatchMouseEvent(periodButton, 'click');
fixture.detectChanges(); fixture.detectChanges();
 End of changes. 4 change blocks. 
7 lines changed or deleted 3 lines changed or added

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