diff --git a/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.spec.ts b/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.spec.ts index 62e0617b8b..452427d0d3 100644 --- a/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.spec.ts +++ b/frontend/src/app/components/checkin/check-in-form-metric/check-in-form-metric.component.spec.ts @@ -127,9 +127,10 @@ describe('CheckInFormComponent', () => { false] ])('should correctly validate value input', (value, validity) => { component.dialogForm = new FormGroup({ - metricValue: new FormControl('', [Validators.required]) + metricValue: new FormControl(undefined, [Validators.required, + Validators.pattern('^\\s*-?\\d+\\.?\\d*\\s*$')]) }); - component.dialogForm.setValue({ value: value }); + component.dialogForm.setValue({ metricValue: value }); expect(component.dialogForm.valid) .toEqual(validity); });