"Fossies" - the Fresh Open Source Software Archive  

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

About: material2 offers Material Design components for Angular.

stepper.spec.ts  (material2-7.3.3):stepper.spec.ts  (material2-7.3.4)
skipping to change at line 362 skipping to change at line 362
it('should not do anything when pressing the ENTER key with a modifier', () => { it('should not do anything when pressing the ENTER key with a modifier', () => {
const stepHeaders = fixture.debugElement.queryAll(By.css('.mat-vertical-st epper-header')); const stepHeaders = fixture.debugElement.queryAll(By.css('.mat-vertical-st epper-header'));
assertSelectKeyWithModifierInteraction(fixture, stepHeaders, 'vertical', E NTER); assertSelectKeyWithModifierInteraction(fixture, stepHeaders, 'vertical', E NTER);
}); });
it('should not do anything when pressing the SPACE key with a modifier', () => { it('should not do anything when pressing the SPACE key with a modifier', () => {
const stepHeaders = fixture.debugElement.queryAll(By.css('.mat-vertical-st epper-header')); const stepHeaders = fixture.debugElement.queryAll(By.css('.mat-vertical-st epper-header'));
assertSelectKeyWithModifierInteraction(fixture, stepHeaders, 'vertical', S PACE); assertSelectKeyWithModifierInteraction(fixture, stepHeaders, 'vertical', S PACE);
}); });
it('should set the proper tabindex', () => {
let stepContents = fixture.debugElement.queryAll(By.css(`.mat-vertical-ste
pper-content`));
let stepperComponent = fixture.debugElement.query(By.directive(MatStepper)
).componentInstance;
let firstStepContentEl = stepContents[0].nativeElement;
let secondStepContentEl = stepContents[1].nativeElement;
expect(firstStepContentEl.getAttribute('tabindex')).toBe('0');
expect(secondStepContentEl.getAttribute('tabindex')).toBeFalsy();
stepperComponent.selectedIndex = 1;
fixture.detectChanges();
expect(firstStepContentEl.getAttribute('tabindex')).toBeFalsy();
expect(secondStepContentEl.getAttribute('tabindex')).toBe('0');
});
}); });
describe('basic stepper when attempting to set the selected step too early', ( ) => { describe('basic stepper when attempting to set the selected step too early', ( ) => {
it('should not throw', () => { it('should not throw', () => {
const fixture = createComponent(SimpleMatVerticalStepperApp); const fixture = createComponent(SimpleMatVerticalStepperApp);
const stepperComponent: MatVerticalStepper = fixture.debugElement const stepperComponent: MatVerticalStepper = fixture.debugElement
.query(By.css('mat-vertical-stepper')).componentInstance; .query(By.css('mat-vertical-stepper')).componentInstance;
expect(() => stepperComponent.selected).not.toThrow(); expect(() => stepperComponent.selected).not.toThrow();
}); });
 End of changes. 1 change blocks. 
0 lines changed or deleted 19 lines changed or added

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