File tree Expand file tree Collapse file tree
bullet-graph/default/files/src/app/__path__
linear-gauge/default/files/src/app/__path__
radial-gauge/default/files/src/app/__path__
bullet-graph/default/files/src/app/__path__
linear-gauge/default/files/src/app/__path__
radial-gauge/default/files/src/app/__path__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxBulletGraphModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
5- import * as igGauges from 'igniteui-angular-gauges' ;
64
75describe ( '<%=ClassName%>' , ( ) => {
86 let component : < %= ClassName % > ;
97 let fixture : ComponentFixture < < %= ClassName % >> ;
108
11- // mock method specific to BulletGraph
12- vi . spyOn ( igGauges . XamBulletGraph . prototype , 'fb' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
149 beforeEach ( async ( ) => {
1510 await TestBed . configureTestingModule ( {
1611 declarations : [ < %= ClassName % > ] ,
17- imports : [ IgxBulletGraphModule , NoopAnimationsModule ]
12+ imports : [ IgxBulletGraphModule ]
1813 } )
1914 . compileComponents ( ) ;
2015 } ) ;
2116
2217 beforeEach ( ( ) => {
18+ vi . useFakeTimers ( ) ;
2319 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2420 component = fixture . componentInstance ;
2521 fixture . detectChanges ( ) ;
2622 // disable animation
2723 component . bulletGraph . transitionDuration = 0 ;
2824 } ) ;
2925
26+ afterEach ( ( ) => {
27+ vi . useRealTimers ( ) ;
28+ fixture . destroy ( ) ;
29+ } ) ;
30+
3031 it ( 'should create' , ( ) => {
32+ vi . advanceTimersByTime ( 1000 ) ;
3133 expect ( component ) . toBeTruthy ( ) ;
3234 } ) ;
3335} ) ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxLinearGaugeModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
54import * as gauges from 'igniteui-angular-gauges' ;
@@ -8,24 +7,28 @@ describe('<%=ClassName%>', () => {
87 let component : < %= ClassName % > ;
98 let fixture : ComponentFixture < < %= ClassName % >> ;
109
11- // mock method specific to LinearGauge
12- vi . spyOn ( gauges . XamLinearGaugeView . prototype , 'ar' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
1410 beforeEach ( async ( ) => {
1511 await TestBed . configureTestingModule ( {
1612 declarations : [ < %= ClassName % > ] ,
17- imports : [ IgxLinearGaugeModule , NoopAnimationsModule ]
13+ imports : [ IgxLinearGaugeModule ]
1814 } )
1915 . compileComponents ( ) ;
2016 } ) ;
2117
2218 beforeEach ( ( ) => {
19+ vi . useFakeTimers ( ) ;
2320 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2421 component = fixture . componentInstance ;
2522 fixture . detectChanges ( ) ;
2623 } ) ;
2724
25+ afterEach ( ( ) => {
26+ vi . useRealTimers ( ) ;
27+ fixture . destroy ( ) ;
28+ } ) ;
29+
2830 it ( 'should create' , ( ) => {
31+ vi . advanceTimersByTime ( 1000 ) ;
2932 expect ( component ) . toBeTruthy ( ) ;
3033 // disable animation
3134 component . linearGauge . transitionDuration = 0 ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxRadialGaugeModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
5- import * as igGauges from 'igniteui-angular-gauges' ;
64
75describe ( '<%=ClassName%>' , ( ) => {
86 let component : < %= ClassName % > ;
97 let fixture : ComponentFixture < < %= ClassName % >> ;
108
11- // mock method specific to RadialGauge
12- vi . spyOn ( igGauges . XamRadialGauge . prototype , 'im' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
149 beforeEach ( async ( ) => {
1510 await TestBed . configureTestingModule ( {
1611 declarations : [ < %= ClassName % > ] ,
17- imports : [ IgxRadialGaugeModule , NoopAnimationsModule ]
12+ imports : [ IgxRadialGaugeModule ]
1813 } )
1914 . compileComponents ( ) ;
2015 } ) ;
2116
2217 beforeEach ( ( ) => {
18+ vi . useFakeTimers ( ) ;
2319 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2420 component = fixture . componentInstance ;
2521 fixture . detectChanges ( ) ;
2622 } ) ;
2723
24+ afterEach ( ( ) => {
25+ vi . useRealTimers ( ) ;
26+ fixture . destroy ( ) ;
27+ } ) ;
28+
2829 it ( 'should create' , ( ) => {
30+ vi . advanceTimersByTime ( 1000 ) ;
2931 expect ( component ) . toBeTruthy ( ) ;
3032 // disable animation
3133 component . radialGauge . transitionDuration = 0 ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxBulletGraphModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
5- import * as igGauges from 'igniteui-angular-gauges' ;
64
75describe ( '<%=ClassName%>' , ( ) => {
86 let component : < %= ClassName % > ;
97 let fixture : ComponentFixture < < %= ClassName % >> ;
108
11- // mock method specific to BulletGraph
12- vi . spyOn ( igGauges . XamBulletGraph . prototype , 'fb' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
149 beforeEach ( async ( ) => {
1510 await TestBed . configureTestingModule ( {
16- imports : [ IgxBulletGraphModule , NoopAnimationsModule , < %= ClassName % > ]
11+ imports : [ IgxBulletGraphModule , < %= ClassName % > ]
1712 } )
1813 . compileComponents ( ) ;
1914 } ) ;
2015
2116 beforeEach ( ( ) => {
17+ vi . useFakeTimers ( ) ;
2218 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2319 component = fixture . componentInstance ;
2420 fixture . detectChanges ( ) ;
2521 // disable animation
2622 component . bulletGraph . transitionDuration = 0 ;
2723 } ) ;
2824
25+ afterEach ( ( ) => {
26+ vi . useRealTimers ( ) ;
27+ fixture . destroy ( ) ;
28+ } ) ;
29+
2930 it ( 'should create' , ( ) => {
31+ vi . advanceTimersByTime ( 1000 ) ;
3032 expect ( component ) . toBeTruthy ( ) ;
3133 } ) ;
3234} ) ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxLinearGaugeModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
5- import * as gauges from 'igniteui-angular-gauges' ;
64
75describe ( '<%=ClassName%>' , ( ) => {
86 let component : < %= ClassName % > ;
97 let fixture : ComponentFixture < < %= ClassName % >> ;
108
11- // mock method specific to LinearGauge
12- vi . spyOn ( gauges . XamLinearGaugeView . prototype , 'ar' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
149 beforeEach ( async ( ) => {
1510 await TestBed . configureTestingModule ( {
16- imports : [ IgxLinearGaugeModule , NoopAnimationsModule , < %= ClassName % > ]
11+ imports : [ IgxLinearGaugeModule , < %= ClassName % > ]
1712 } )
1813 . compileComponents ( ) ;
1914 } ) ;
2015
2116 beforeEach ( ( ) => {
17+ vi . useFakeTimers ( ) ;
2218 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2319 component = fixture . componentInstance ;
2420 fixture . detectChanges ( ) ;
2521 } ) ;
2622
23+ afterEach ( ( ) => {
24+ vi . useRealTimers ( ) ;
25+ fixture . destroy ( ) ;
26+ } ) ;
27+
2728 it ( 'should create' , ( ) => {
29+ vi . advanceTimersByTime ( 1000 ) ;
2830 expect ( component ) . toBeTruthy ( ) ;
2931 // disable animation
3032 component . linearGauge . transitionDuration = 0 ;
Original file line number Diff line number Diff line change 11import { ComponentFixture , TestBed } from '@angular/core/testing' ;
2- import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
32import { IgxRadialGaugeModule } from 'igniteui-angular-gauges' ;
43import { < %= ClassName % > } from './<%=filePrefix%>' ;
5- import * as igGauges from 'igniteui-angular-gauges' ;
64
75describe ( '<%=ClassName%>' , ( ) => {
86 let component : < %= ClassName % > ;
97 let fixture : ComponentFixture < < %= ClassName % >> ;
108
11- // mock method specific to RadialGauge
12- vi . spyOn ( igGauges . XamRadialGauge . prototype , 'im' ) . mockImplementation ( ( ) => { /* mock */ } ) ;
13-
149 beforeEach ( async ( ) => {
1510 await TestBed . configureTestingModule ( {
16- imports : [ IgxRadialGaugeModule , NoopAnimationsModule , < %= ClassName % > ]
11+ imports : [ IgxRadialGaugeModule , < %= ClassName % > ]
1712 } )
1813 . compileComponents ( ) ;
1914 } ) ;
2015
2116 beforeEach ( ( ) => {
17+ vi . useFakeTimers ( ) ;
2218 fixture = TestBed . createComponent ( < %= ClassName % > ) ;
2319 component = fixture . componentInstance ;
2420 fixture . detectChanges ( ) ;
2521 } ) ;
2622
23+ afterEach ( ( ) => {
24+ vi . useRealTimers ( ) ;
25+ fixture . destroy ( ) ;
26+ } ) ;
27+
2728 it ( 'should create' , ( ) => {
29+ vi . advanceTimersByTime ( 1000 ) ;
2830 expect ( component ) . toBeTruthy ( ) ;
2931 // disable animation
3032 component . radialGauge . transitionDuration = 0 ;
You can’t perform that action at this time.
0 commit comments