Skip to content

Commit a532cef

Browse files
committed
fix(progressbar): tests ajust to moduleless
1 parent 2876b79 commit a532cef

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

src/progressbar/testing/progressbar.component.spec.ts

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
33
import { ProgressbarComponent, ProgressbarModule } from '../index';
44

55
@Component({
6-
selector: 'progressbar-test',
7-
template: '',
8-
standalone: true
6+
selector: 'progressbar-test',
7+
template: ''
98
})
109
class TestProgressbarComponent extends ProgressbarComponent {}
1110

@@ -20,8 +19,9 @@ describe('Component: Progress Bar', () => {
2019

2120
it('check animate setter when _animate is equal to setter\'s argument', () => {
2221
TestBed.configureTestingModule({
23-
imports: [ProgressbarModule, TestProgressbarComponent]
24-
});
22+
declarations: [TestProgressbarComponent],
23+
imports: [ProgressbarModule]
24+
});
2525
fixture = TestBed.createComponent(TestProgressbarComponent);
2626
component = fixture.componentInstance;
2727
component.animate = false;
@@ -32,8 +32,9 @@ describe('Component: Progress Bar', () => {
3232

3333
it('check striped setter when _striped is equal to setter\'s argument', () => {
3434
TestBed.configureTestingModule({
35-
imports: [ProgressbarModule, TestProgressbarComponent]
36-
});
35+
declarations: [TestProgressbarComponent],
36+
imports: [ProgressbarModule]
37+
});
3738
fixture = TestBed.createComponent(TestProgressbarComponent);
3839
component = fixture.componentInstance;
3940
component.striped = false;
@@ -45,8 +46,9 @@ describe('Component: Progress Bar', () => {
4546
it('should work correctly with default values', () => {
4647
const tpl = `<progressbar></progressbar>`;
4748
TestBed.configureTestingModule({
48-
imports: [ProgressbarModule, TestProgressbarComponent]
49-
});
49+
declarations: [TestProgressbarComponent],
50+
imports: [ProgressbarModule]
51+
});
5052
TestBed.overrideComponent(TestProgressbarComponent, {
5153
set: { template: tpl }
5254
});
@@ -62,8 +64,9 @@ describe('Component: Progress Bar', () => {
6264
it('checking appropriate styles after setting up of type', () => {
6365
const tpl = `<progressbar [type]="typeValue"></progressbar>`;
6466
TestBed.configureTestingModule({
65-
imports: [ProgressbarModule, TestProgressbarComponent]
66-
});
67+
declarations: [TestProgressbarComponent],
68+
imports: [ProgressbarModule]
69+
});
6770
TestBed.overrideComponent(TestProgressbarComponent, {
6871
set: { template: tpl }
6972
});
@@ -81,8 +84,9 @@ describe('Component: Progress Bar', () => {
8184
it('checking of correct calculation of percent value(bar length)', () => {
8285
const tpl = `<progressbar [max]="100" [value]="60"></progressbar>`;
8386
TestBed.configureTestingModule({
84-
imports: [ProgressbarModule, TestProgressbarComponent]
85-
});
87+
declarations: [TestProgressbarComponent],
88+
imports: [ProgressbarModule]
89+
});
8690
TestBed.overrideComponent(TestProgressbarComponent, {
8791
set: { template: tpl }
8892
});
@@ -108,8 +112,9 @@ describe('Component: Progress Bar', () => {
108112
};
109113
const tpl = `<progressbar [type]="typeValue" [value]="valueValue" [animate]="true" [max]="maxValue"></progressbar>`;
110114
TestBed.configureTestingModule({
111-
imports: [ProgressbarModule, TestProgressbarComponent]
112-
});
115+
declarations: [TestProgressbarComponent],
116+
imports: [ProgressbarModule]
117+
});
113118
TestBed.overrideComponent(TestProgressbarComponent, {
114119
set: { template: tpl }
115120
});
@@ -141,8 +146,9 @@ describe('progress bar', () => {
141146

142147
beforeEach(() => {
143148
TestBed.configureTestingModule({
144-
imports: [ProgressbarModule, TestProgressbarComponent]
145-
});
149+
declarations: [TestProgressbarComponent],
150+
imports: [ProgressbarModule]
151+
});
146152
fixture = TestBed.overrideComponent(TestProgressbarComponent, {
147153
set: { template: tpl }
148154
})

0 commit comments

Comments
 (0)