@@ -3,9 +3,8 @@ import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
3
3
import { ProgressbarComponent , ProgressbarModule } from '../index' ;
4
4
5
5
@Component ( {
6
- selector : 'progressbar-test' ,
7
- template : '' ,
8
- standalone : true
6
+ selector : 'progressbar-test' ,
7
+ template : ''
9
8
} )
10
9
class TestProgressbarComponent extends ProgressbarComponent { }
11
10
@@ -20,8 +19,9 @@ describe('Component: Progress Bar', () => {
20
19
21
20
it ( 'check animate setter when _animate is equal to setter\'s argument' , ( ) => {
22
21
TestBed . configureTestingModule ( {
23
- imports : [ ProgressbarModule , TestProgressbarComponent ]
24
- } ) ;
22
+ declarations : [ TestProgressbarComponent ] ,
23
+ imports : [ ProgressbarModule ]
24
+ } ) ;
25
25
fixture = TestBed . createComponent ( TestProgressbarComponent ) ;
26
26
component = fixture . componentInstance ;
27
27
component . animate = false ;
@@ -32,8 +32,9 @@ describe('Component: Progress Bar', () => {
32
32
33
33
it ( 'check striped setter when _striped is equal to setter\'s argument' , ( ) => {
34
34
TestBed . configureTestingModule ( {
35
- imports : [ ProgressbarModule , TestProgressbarComponent ]
36
- } ) ;
35
+ declarations : [ TestProgressbarComponent ] ,
36
+ imports : [ ProgressbarModule ]
37
+ } ) ;
37
38
fixture = TestBed . createComponent ( TestProgressbarComponent ) ;
38
39
component = fixture . componentInstance ;
39
40
component . striped = false ;
@@ -45,8 +46,9 @@ describe('Component: Progress Bar', () => {
45
46
it ( 'should work correctly with default values' , ( ) => {
46
47
const tpl = `<progressbar></progressbar>` ;
47
48
TestBed . configureTestingModule ( {
48
- imports : [ ProgressbarModule , TestProgressbarComponent ]
49
- } ) ;
49
+ declarations : [ TestProgressbarComponent ] ,
50
+ imports : [ ProgressbarModule ]
51
+ } ) ;
50
52
TestBed . overrideComponent ( TestProgressbarComponent , {
51
53
set : { template : tpl }
52
54
} ) ;
@@ -62,8 +64,9 @@ describe('Component: Progress Bar', () => {
62
64
it ( 'checking appropriate styles after setting up of type' , ( ) => {
63
65
const tpl = `<progressbar [type]="typeValue"></progressbar>` ;
64
66
TestBed . configureTestingModule ( {
65
- imports : [ ProgressbarModule , TestProgressbarComponent ]
66
- } ) ;
67
+ declarations : [ TestProgressbarComponent ] ,
68
+ imports : [ ProgressbarModule ]
69
+ } ) ;
67
70
TestBed . overrideComponent ( TestProgressbarComponent , {
68
71
set : { template : tpl }
69
72
} ) ;
@@ -81,8 +84,9 @@ describe('Component: Progress Bar', () => {
81
84
it ( 'checking of correct calculation of percent value(bar length)' , ( ) => {
82
85
const tpl = `<progressbar [max]="100" [value]="60"></progressbar>` ;
83
86
TestBed . configureTestingModule ( {
84
- imports : [ ProgressbarModule , TestProgressbarComponent ]
85
- } ) ;
87
+ declarations : [ TestProgressbarComponent ] ,
88
+ imports : [ ProgressbarModule ]
89
+ } ) ;
86
90
TestBed . overrideComponent ( TestProgressbarComponent , {
87
91
set : { template : tpl }
88
92
} ) ;
@@ -108,8 +112,9 @@ describe('Component: Progress Bar', () => {
108
112
} ;
109
113
const tpl = `<progressbar [type]="typeValue" [value]="valueValue" [animate]="true" [max]="maxValue"></progressbar>` ;
110
114
TestBed . configureTestingModule ( {
111
- imports : [ ProgressbarModule , TestProgressbarComponent ]
112
- } ) ;
115
+ declarations : [ TestProgressbarComponent ] ,
116
+ imports : [ ProgressbarModule ]
117
+ } ) ;
113
118
TestBed . overrideComponent ( TestProgressbarComponent , {
114
119
set : { template : tpl }
115
120
} ) ;
@@ -141,8 +146,9 @@ describe('progress bar', () => {
141
146
142
147
beforeEach ( ( ) => {
143
148
TestBed . configureTestingModule ( {
144
- imports : [ ProgressbarModule , TestProgressbarComponent ]
145
- } ) ;
149
+ declarations : [ TestProgressbarComponent ] ,
150
+ imports : [ ProgressbarModule ]
151
+ } ) ;
146
152
fixture = TestBed . overrideComponent ( TestProgressbarComponent , {
147
153
set : { template : tpl }
148
154
} )
0 commit comments