From e30e8d7c1221daf944d4409f3a5b0a0b25bf58da Mon Sep 17 00:00:00 2001 From: "m.rashevskiy" Date: Wed, 29 Jan 2025 10:25:01 +0300 Subject: [PATCH] feat(legacy): input tag tests updated corresponding to v3 tests --- .../components/input-tag/test/input-tag.component.spec.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/legacy/components/input-tag/test/input-tag.component.spec.ts b/projects/legacy/components/input-tag/test/input-tag.component.spec.ts index af05ba0a4a31..696506202114 100644 --- a/projects/legacy/components/input-tag/test/input-tag.component.spec.ts +++ b/projects/legacy/components/input-tag/test/input-tag.component.spec.ts @@ -140,13 +140,14 @@ describe('InputTag', () => { }); it('when exiting the field adds input as a tag', async () => { + inputPO.sendText('0'); focusStealer.focus(); fixture.detectChanges(); await fixture.whenStable(); - expect(component.value.length).toBe(4); - expect(component.value[3]).toBe('89'); + expect(component.value.length).toBe(5); + expect(component.value[4]).toBe('0'); }); it('does not add empty tags when leaving the field', () => { @@ -167,7 +168,7 @@ describe('InputTag', () => { }); it('pressing Enter on the field adds the input as a tag', () => { - inputPO.sendText('0'); + inputPO.sendText(' 0'); inputPO.sendKeydown('enter'); expect(component.value[4]).toBe('0');