File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -705,13 +705,26 @@ describe('MatStepper', () => {
705
705
706
706
describe ( 'linear stepper with a pre-defined selectedIndex' , ( ) => {
707
707
let preselectedFixture : ComponentFixture < SimplePreselectedMatHorizontalStepperApp > ;
708
+ let stepper : MatHorizontalStepper ;
709
+
708
710
beforeEach ( ( ) => {
709
711
preselectedFixture = createComponent ( SimplePreselectedMatHorizontalStepperApp ) ;
712
+ preselectedFixture . detectChanges ( ) ;
713
+ stepper = preselectedFixture . debugElement
714
+ . query ( By . directive ( MatHorizontalStepper ) ) . componentInstance ;
710
715
} ) ;
711
716
712
717
it ( 'should not throw' , ( ) => {
713
718
expect ( ( ) => preselectedFixture . detectChanges ( ) ) . not . toThrow ( ) ;
714
719
} ) ;
720
+
721
+ it ( 'selectedIndex should be typeof number' , ( ) => {
722
+ expect ( typeof stepper . selectedIndex ) . toBe ( 'number' ) ;
723
+ } ) ;
724
+
725
+ it ( 'value of selectedIndex should be the pre-defined value' , ( ) => {
726
+ expect ( stepper . selectedIndex ) . toBe ( 0 ) ;
727
+ } ) ;
715
728
} ) ;
716
729
717
730
describe ( 'linear stepper with no `stepControl`' , ( ) => {
You can’t perform that action at this time.
0 commit comments