Skip to content

Commit 0a268bc

Browse files
committed
tests(prograssBar): Fix tests for Circular and Linear Bars not clearing test bed.
1 parent bb28024 commit 0a268bc

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
@@ -26,6 +26,12 @@ describe('IgxCircularProgressBarComponent', () => {
2626
circularBar = fixture.debugElement.nativeElement;
2727
});
2828

29+
afterEach(() => {
30+
// Remove elements manually from DOM, because CircularBar overrides the id the TestBed uses
31+
fixture.elementRef.nativeElement.remove();
32+
fixture.destroy();
33+
});
34+
2935
it('should initialize with default attributes', () => {
3036
expect(progress.cssClass).toBe('igx-circular-bar');
3137
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
@@ -22,6 +22,12 @@ describe('IgxLinearProgressBarComponent', () => {
2222
linearBar = fixture.debugElement.nativeElement;
2323
});
2424

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

0 commit comments

Comments
 (0)