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