Skip to content

Commit

Permalink
feat(legacy): input tag tests updated corresponding to v3 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m.rashevskiy authored and rashiddok committed Jan 29, 2025
1 parent b13d5a7 commit e30e8d7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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');
Expand Down

0 comments on commit e30e8d7

Please sign in to comment.