From 8ffbe400d51bf42fd53be596784adc2a4eb42219 Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 2 Sep 2024 14:21:58 +0200 Subject: [PATCH] refactor: refs #7354 modified VnInputTime --- src/components/common/VnInputTime.vue | 2 +- test/cypress/integration/zone/zoneBasicData.spec.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index 0b4e72cb8f..b3478bb23f 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -14,7 +14,7 @@ const props = defineProps({ default: false, }, }); -const initialDate = ref(model.value); +const initialDate = ref(model.value ?? Date.vnNew()); const { t } = useI18n(); const requiredFieldRule = (val) => !!val || t('globals.fieldRequired'); diff --git a/test/cypress/integration/zone/zoneBasicData.spec.js b/test/cypress/integration/zone/zoneBasicData.spec.js index 29f2dc01c2..c6151a49b6 100644 --- a/test/cypress/integration/zone/zoneBasicData.spec.js +++ b/test/cypress/integration/zone/zoneBasicData.spec.js @@ -8,14 +8,12 @@ describe('ZoneBasicData', () => { }); it('should throw an error if the name is empty', () => { - cy.get('.q-card > :nth-child(1)').click(); cy.get('.q-card > :nth-child(1)').clear(); cy.get('.q-btn-group > .q-btn--standard').click(); cy.get(notification).should('contains.text', "can't be blank"); }); it("should edit the basicData's zone", () => { - cy.get('.q-card > :nth-child(1)').click(); cy.get('.q-card > :nth-child(1)').type(' modified'); cy.get('.q-btn-group > .q-btn--standard').click(); cy.get(notification).should('contains.text', 'Data saved');