Skip to content

Commit 78ce86e

Browse files
committed
Add test for custom background-color
1 parent 630d784 commit 78ce86e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/app/spinner/spinner.component.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ describe('SpinnerComponent', () => {
9494
expect(element.className).toBe('sk-rotating-plane colored-parent');
9595
});
9696

97+
it('should allow us to specify a custom background-color', () => {
98+
component.isSpinnerVisible = true;
99+
component.backgroundColor = '#ff0000';
100+
fixture.detectChanges();
101+
102+
const element = fixture
103+
.debugElement
104+
.query(By.css('.sk-cube.sk-cube1'))
105+
.nativeElement;
106+
107+
expect(element.style['background-color']).toBe('rgb(255, 0, 0)');
108+
});
109+
97110
it('should show and hide the spinner according to the pending http requests',
98111
inject([HttpInterceptorService, MockBackend], (service: HttpInterceptorService, backend: MockBackend) => {
99112

0 commit comments

Comments
 (0)