diff --git a/libs/ngxtension/form-events/src/form-events.spec.ts b/libs/ngxtension/form-events/src/form-events.spec.ts index 4ffd9f39..fb4d0d3e 100644 --- a/libs/ngxtension/form-events/src/form-events.spec.ts +++ b/libs/ngxtension/form-events/src/form-events.spec.ts @@ -115,7 +115,7 @@ describe('Form Events', () => { ); }); - it('returns a signal with the value, status, pristine, and touched values of a form after it has been interacted with', async () => { + it('returns an observable with the value, status, pristine, and touched values of a form after it has been interacted with', async () => { const fixture: ComponentFixture = TestBed.configureTestingModule({ imports: [FormEventsComponent], @@ -165,10 +165,30 @@ describe('Form Events', () => { fixture.detectChanges(); - const signalVals: HTMLElement = fixture.debugElement.query( + const observableVals: HTMLElement = fixture.debugElement.query( By.css('[data-testid="observable-values-initial-value-overwritten"]'), ).nativeElement; + expect(flattenJsonPipeFormatting(observableVals.textContent)).toBe( + flattenJsonPipeFormatting(`{ + "value": { + "name": "custom" + }, + "status": "VALID", + "touched": false, + "pristine": true, + "valid": true, + "invalid": false, + "pending": false, + "dirty": false, + "untouched": true + }`), + ); + + const signalVals: HTMLElement = fixture.debugElement.query( + By.css('[data-testid="signal-values-initial-value-overwritten"]'), + ).nativeElement; + expect(flattenJsonPipeFormatting(signalVals.textContent)).toBe( flattenJsonPipeFormatting(`{ "value": {