diff --git a/packages/date-picker/test/value-commit.common.js b/packages/date-picker/test/value-commit.common.js index 9537301b51..722ed79627 100644 --- a/packages/date-picker/test/value-commit.common.js +++ b/packages/date-picker/test/value-commit.common.js @@ -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', () => {