"Fossies" - the Fresh Open Source Software Archive  

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

About: material2 offers Material Design components for Angular.

select.spec.ts  (material2-7.3.2):select.spec.ts  (material2-7.3.3)
skipping to change at line 1822 skipping to change at line 1822
for (let i = 0; i < 5; i++) { for (let i = 0; i < 5; i++) {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW); dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
} }
// Note that we press down 5 times, but it will skip // Note that we press down 5 times, but it will skip
// 3 options because the second group is disabled. // 3 options because the second group is disabled.
// <(option index + group labels) * height> - <panel height> = (9 + 3) * 48 - 256 = 320 // <(option index + group labels) * height> - <panel height> = (9 + 3) * 48 - 256 = 320
expect(panel.scrollTop).toBe(320, 'Expected scroll to be at the 9th opti on.'); expect(panel.scrollTop).toBe(320, 'Expected scroll to be at the 9th opti on.');
})); }));
it('should scroll top the top when pressing HOME', fakeAsync(() => { it('should scroll to the top when pressing HOME', fakeAsync(() => {
for (let i = 0; i < 20; i++) { for (let i = 0; i < 20; i++) {
dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW); dispatchKeyboardEvent(host, 'keydown', DOWN_ARROW);
fixture.detectChanges(); fixture.detectChanges();
} }
expect(panel.scrollTop).toBeGreaterThan(0, 'Expected panel to be scrolle d down.'); expect(panel.scrollTop).toBeGreaterThan(0, 'Expected panel to be scrolle d down.');
dispatchKeyboardEvent(host, 'keydown', HOME); dispatchKeyboardEvent(host, 'keydown', HOME);
fixture.detectChanges(); fixture.detectChanges();
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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