forked from verdnatura/salix-front
refactor: refs #7354 modified VnInputTime
This commit is contained in:
parent
127d5c9fd3
commit
8ffbe400d5
|
@ -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');
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue