From 6c6e627545cdae766681cea30078fd5a3f6997ba Mon Sep 17 00:00:00 2001 From: uros Date: Thu, 1 Aug 2024 22:01:37 +0200 Subject: [PATCH] - fix DatePicker.spec.js --- packages/primevue/src/datepicker/DatePicker.spec.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/primevue/src/datepicker/DatePicker.spec.js b/packages/primevue/src/datepicker/DatePicker.spec.js index 2ecd2988f..901546fdd 100644 --- a/packages/primevue/src/datepicker/DatePicker.spec.js +++ b/packages/primevue/src/datepicker/DatePicker.spec.js @@ -14,23 +14,24 @@ describe('DatePicker.vue', () => { } }, props: { - modelValue: new Date() + modelValue: '' } }); }); it('should exist', async () => { expect(wrapper.find('.p-datepicker.p-component').exists()).toBe(true); - expect(wrapper.find('.p-inputtext').exists()).toBe(true); + expect(wrapper.find('.p-datepicker-input').exists()).toBe(true); - let input = wrapper.find('.p-inputtext'); + let input = wrapper.find('.p-datepicker-input'); await input.trigger('focus'); expect(wrapper.find('.p-datepicker.p-component').exists()).toBe(true); expect(wrapper.find('.p-datepicker-today').exists()).toBe(true); - expect(wrapper.find('.p-highlight').exists()).toBe(true); - expect(wrapper.find('.p-highlight').text()).toEqual(new Date().getDate().toString()); + expect(wrapper.find('.p-datepicker-prev-button').exists()).toBe(true); + expect(wrapper.find('.p-datepicker-prev-next').exists()).toBe(false); + expect(wrapper.find('.p-datepicker-today').text()).toEqual(new Date().getDate().toString()); }); it('should select a date', async () => {