Skip to content

Commit db165f8

Browse files
committed
tests(prograssBar): Fix tests for Circular and Linear Bars not clearing test bed.
1 parent 9e27225 commit db165f8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

projects/igniteui-angular/src/lib/progressbar/circularbar.component.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ describe('IgxCircularProgressBarComponent', () => {
2727
circularBar = fixture.debugElement.nativeElement;
2828
});
2929

30+
afterEach(() => {
31+
// Remove elements manually from DOM, because CircularBar overrides the id the TestBed uses
32+
fixture.elementRef.nativeElement.remove();
33+
fixture.destroy();
34+
});
35+
3036
it('should initialize with default attributes', () => {
3137
expect(progress.cssClass).toBe('igx-circular-bar');
3238
expect(progress.textVisibility).toBe(true);

projects/igniteui-angular/src/lib/progressbar/linearbar.component.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ describe('IgxLinearProgressBarComponent', () => {
2020
linearBar = fixture.debugElement.nativeElement;
2121
});
2222

23+
afterEach(() => {
24+
// Remove elements manually from DOM, because LinearBar overrides the id the TestBed uses
25+
fixture.elementRef.nativeElement.remove();
26+
fixture.destroy();
27+
});
28+
2329
it('should initialize with default attributes', () => {
2430
expect(progress.valueMin).toBe(0);
2531
expect(progress.cssClass).toBe('igx-linear-bar');

0 commit comments

Comments
 (0)