Update some global components with loading signals

This commit is contained in:
shamoon
2026-07-06 20:09:58 -07:00
parent 0c5cfb2254
commit 3755070e1f
9 changed files with 196 additions and 88 deletions
@@ -45,21 +45,19 @@ describe('WidgetFrameComponent', () => {
})
it('should show title', () => {
component.title = 'Foo'
fixture.componentRef.setInput('title', 'Foo')
fixture.detectChanges()
expect(fixture.debugElement.nativeElement.textContent).toContain('Foo')
})
it('should show loading indicator', () => {
expect(fixture.debugElement.query(By.css('.spinner-border'))).toBeNull()
component.loading = true
fixture.componentRef.setInput('loading', true)
fixture.detectChanges()
expect(fixture.debugElement.query(By.css('.spinner-border'))).not.toBeNull()
})
it('should show', () => {
expect(component.show).toBeFalsy()
jest.advanceTimersByTime(100)
expect(component.show).toBeTruthy()
})
})