11/* tslint:disable:no-unused-variable */
2- import { async , ComponentFixture , TestBed } from " @angular/core/testing" ;
3- import { QueryList , Component , ViewChild } from " @angular/core" ;
4- import { WizardComponent } from " ./wizard.component" ;
5- import { WizardStepComponent } from " ./wizard-step.component" ;
6- import { WizardNavigationBarComponent } from " ./wizard-navigation-bar.component" ;
7- import { GoToStepDirective } from " ../directives/go-to-step.directive" ;
2+ import { async , ComponentFixture , TestBed } from ' @angular/core/testing' ;
3+ import { QueryList , Component , ViewChild } from ' @angular/core' ;
4+ import { WizardComponent } from ' ./wizard.component' ;
5+ import { WizardStepComponent } from ' ./wizard-step.component' ;
6+ import { WizardNavigationBarComponent } from ' ./wizard-navigation-bar.component' ;
7+ import { GoToStepDirective } from ' ../directives/go-to-step.directive' ;
88
99@Component ( {
10- selector : " test-wizard" ,
10+ selector : ' test-wizard' ,
1111 template : `
1212 <wizard>
13- <wizard-step title=" Steptitle 1" >Step 1</wizard-step>
14- <wizard-step title=" Steptitle 2" >Step 2</wizard-step>
15- <wizard-step title=" Steptitle 3" >Step 3</wizard-step>
13+ <wizard-step title=' Steptitle 1' >Step 1</wizard-step>
14+ <wizard-step title=' Steptitle 2' >Step 2</wizard-step>
15+ <wizard-step title=' Steptitle 3' >Step 3</wizard-step>
1616 </wizard>
1717 `
1818} )
@@ -24,7 +24,7 @@ class WizardTestComponent {
2424function checkWizardSteps ( steps : QueryList < WizardStepComponent > , selectedStepIndex : number ) {
2525 steps . forEach ( ( step , index , array ) => {
2626 // Only the selected step should be selected
27- if ( index == selectedStepIndex ) {
27+ if ( index === selectedStepIndex ) {
2828 expect ( step . selected ) . toBe ( true , `the selected wizard step index ${ index } is not selected` ) ;
2929 } else {
3030 expect ( step . selected ) . toBe ( false , `the not selected wizard step index ${ index } is selected` ) ;
@@ -66,17 +66,17 @@ describe('WizardComponent', () => {
6666
6767 it ( 'should start at first step' , ( ) => {
6868 expect ( wizardTest . wizard . currentStepIndex ) . toBe ( 0 ) ;
69- expect ( wizardTest . wizard . currentStep . title ) . toBe ( " Steptitle 1" ) ;
69+ expect ( wizardTest . wizard . currentStep . title ) . toBe ( ' Steptitle 1' ) ;
7070
7171 checkWizardSteps ( wizardTest . wizard . wizardSteps , 0 ) ;
7272 } ) ;
7373
7474 it ( 'should return correct step at index' , ( ) => {
7575 expect ( ( ) => wizardTest . wizard . getStepAtIndex ( - 1 ) ) . toThrow ( new Error ( `Expected a known step, but got stepIndex: -1.` ) ) ;
7676
77- expect ( wizardTest . wizard . getStepAtIndex ( 0 ) . title ) . toBe ( " Steptitle 1" ) ;
78- expect ( wizardTest . wizard . getStepAtIndex ( 1 ) . title ) . toBe ( " Steptitle 2" ) ;
79- expect ( wizardTest . wizard . getStepAtIndex ( 2 ) . title ) . toBe ( " Steptitle 3" ) ;
77+ expect ( wizardTest . wizard . getStepAtIndex ( 0 ) . title ) . toBe ( ' Steptitle 1' ) ;
78+ expect ( wizardTest . wizard . getStepAtIndex ( 1 ) . title ) . toBe ( ' Steptitle 2' ) ;
79+ expect ( wizardTest . wizard . getStepAtIndex ( 2 ) . title ) . toBe ( ' Steptitle 3' ) ;
8080
8181 // Check that the first wizard step is the only selected one
8282 checkWizardSteps ( wizardTest . wizard . wizardSteps , 0 ) ;
@@ -179,7 +179,7 @@ describe('WizardComponent', () => {
179179 wizardTestFixture . detectChanges ( ) ;
180180
181181 expect ( wizardTest . wizard . currentStepIndex ) . toBe ( 1 ) ;
182- expect ( wizardTest . wizard . currentStep . title ) . toBe ( " Steptitle 2" ) ;
182+ expect ( wizardTest . wizard . currentStep . title ) . toBe ( ' Steptitle 2' ) ;
183183 expect ( wizardTest . wizard . currentStep . completed ) . toBe ( false ) ;
184184
185185 checkWizardSteps ( wizardTest . wizard . wizardSteps , 1 ) ;
0 commit comments