Skip to content

Commit

Permalink
add more unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Oct 11, 2023
1 parent 375df5a commit 67a74e5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/date-picker/test/value-commit.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,24 @@ describe('value commit', () => {
expectValueCommit('');
});
});

describe('value set programmatically', () => {
beforeEach(() => {
datePicker.value = TODAY_DATE;
valueChangedSpy.resetHistory();
validateSpy.resetHistory();
});

it('should not commit but validate on blur', () => {
datePicker.blur();
expectValidationOnly();
});

it('should not commit on Enter', async () => {
await sendKeys({ press: 'Enter' });
expectNoValueCommit();
});
});
});

describe('unparsable input entered', () => {
Expand Down

0 comments on commit 67a74e5

Please sign in to comment.