0
0
Fork 0

refactor: refs #7354 modified VnInputTime

This commit is contained in:
Jon Elias 2024-09-02 14:21:58 +02:00
parent 127d5c9fd3
commit 8ffbe400d5
2 changed files with 1 additions and 3 deletions

View File

@ -14,7 +14,7 @@ const props = defineProps({
default: false, default: false,
}, },
}); });
const initialDate = ref(model.value); const initialDate = ref(model.value ?? Date.vnNew());
const { t } = useI18n(); const { t } = useI18n();
const requiredFieldRule = (val) => !!val || t('globals.fieldRequired'); const requiredFieldRule = (val) => !!val || t('globals.fieldRequired');

View File

@ -8,14 +8,12 @@ describe('ZoneBasicData', () => {
}); });
it('should throw an error if the name is empty', () => { 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-card > :nth-child(1)').clear();
cy.get('.q-btn-group > .q-btn--standard').click(); cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(notification).should('contains.text', "can't be blank"); cy.get(notification).should('contains.text', "can't be blank");
}); });
it("should edit the basicData's zone", () => { 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-card > :nth-child(1)').type(' modified');
cy.get('.q-btn-group > .q-btn--standard').click(); cy.get('.q-btn-group > .q-btn--standard').click();
cy.get(notification).should('contains.text', 'Data saved'); cy.get(notification).should('contains.text', 'Data saved');