Enhancement: Explain behavior of unset app config boolean to user (#5345)

This commit is contained in:
shamoon
2024-01-10 15:34:20 -08:00
committed by GitHub
parent 8e8810cbaa
commit 3dcb973adb
5 changed files with 45 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import {
NG_VALUE_ACCESSOR,
ReactiveFormsModule,
} from '@angular/forms'
import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'
describe('SwitchComponent', () => {
let component: SwitchComponent
@@ -15,7 +16,7 @@ describe('SwitchComponent', () => {
TestBed.configureTestingModule({
declarations: [SwitchComponent],
providers: [],
imports: [FormsModule, ReactiveFormsModule],
imports: [FormsModule, ReactiveFormsModule, NgbTooltipModule],
}).compileComponents()
fixture = TestBed.createComponent(SwitchComponent)
@@ -36,4 +37,9 @@ describe('SwitchComponent', () => {
fixture.detectChanges()
expect(component.value).toBeFalsy()
})
it('should show note if unset', () => {
component.value = null
expect(component.isUnset).toBeTruthy()
})
})