How to unit test Material stepper in this situation:
export class FooComponent implements OnInit {
@ViewChild('stepper') stepper: MatStepper;
}
bar() {
this.stepper.selectedIndex = 1;
}
}
This will work, but when testing component with Jasmine, I would get:
TypeError: Cannot set property 'selectedIndex' of undefined
I should note that in test MatStepperModule
is in imports.