Skip to content

Commit

Permalink
test: fix test errors in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
tomivirkki committed Nov 22, 2023
1 parent f0793b9 commit a1d37c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/date-picker/test/keyboard-navigation.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ describe('keyboard navigation', () => {
return date.year === 2010 && date.month === 0 && date.day === 29;
};

await open(datePicker);
await nextRender();
await open(datePicker);

input = datePicker.inputElement;
input.focus();
});
Expand Down
4 changes: 2 additions & 2 deletions packages/date-picker/test/validation.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('validation', () => {
expect(selectResult).to.be.equal(false);
});

it('should reflect correct invalid value on value-changed eventListener when using isDateDisabled', () => {
it('should reflect correct invalid value on value-changed eventListener when using isDateDisabled', async () => {
datePicker.isDateDisabled = (date) => {
if (!date) {
return false;
Expand All @@ -182,7 +182,7 @@ describe('validation', () => {
};
datePicker.value = '2016-01-01'; // Valid

datePicker.open();
await open(datePicker);
const selectResult = datePicker._overlayContent._selectDate(new Date('2017-01-01T12:00:00')); // Invalid
expect(selectResult).to.be.equal(false);
});
Expand Down

0 comments on commit a1d37c1

Please sign in to comment.