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