diff --git a/src/components/EntityCalendar.vue b/src/components/EntityCalendar.vue new file mode 100644 index 000000000..e6e54a832 --- /dev/null +++ b/src/components/EntityCalendar.vue @@ -0,0 +1,152 @@ + + + + + + {{ + calendarHeaderTitle + }} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/EntityCalendarGrid.vue b/src/components/EntityCalendarGrid.vue new file mode 100644 index 000000000..09ccaad07 --- /dev/null +++ b/src/components/EntityCalendarGrid.vue @@ -0,0 +1,126 @@ + + + + + + + {{ headerTitle }} + + + + emit('onDateSelected', data)" + /> + + + \ No newline at end of file diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 3b2507f1e..0cbe541fc 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -186,7 +186,7 @@ onMounted(() => { if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300); }); -const someIsLoading = computed(() => isLoading.value || arrayData?.isLoading?.value); +const someIsLoading = computed(() => isLoading.value || !!arrayData?.isLoading?.value); function findKeyInOptions() { if (!$props.options) return; return filter($props.modelValue, $props.options)?.length; @@ -376,7 +376,7 @@ function getCaption(opt) { > { @@ -391,7 +391,7 @@ function getCaption(opt) { { @@ -416,7 +416,7 @@ function getCaption(opt) { {{ opt[optionLabel] }} - + {{ `#${getCaption(opt)}` }} diff --git a/src/components/ui/VnConfirm.vue b/src/components/ui/VnConfirm.vue index c6f539879..5714db9b2 100644 --- a/src/components/ui/VnConfirm.vue +++ b/src/components/ui/VnConfirm.vue @@ -89,24 +89,26 @@ function cancel() { - - + + + + diff --git a/src/composables/getWeekdays.js b/src/composables/getWeekdays.js new file mode 100644 index 000000000..d619103da --- /dev/null +++ b/src/composables/getWeekdays.js @@ -0,0 +1,10 @@ +import { ref } from 'vue'; +import moment from 'moment'; + +export default function useWeekdaysOrder() { + + const firstDay = moment().weekday(1).day(); + const weekdays = [...Array(7).keys()].map(i => (i + firstDay) % 7); + + return ref(weekdays); +} diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 2e880a16d..9828b35ae 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -1,4 +1,4 @@ -import { onMounted, computed } from 'vue'; +import { onMounted, computed, ref } from 'vue'; import { useRouter, useRoute } from 'vue-router'; import axios from 'axios'; import { useArrayDataStore } from 'stores/useArrayDataStore'; @@ -346,7 +346,7 @@ export function useArrayData(key, userOptions) { } const totalRows = computed(() => (store.data && store.data.length) || 0); - const isLoading = computed(() => store.isLoading || false); + const isLoading = ref(store.isLoading || false); return { fetch, diff --git a/src/css/app.scss b/src/css/app.scss index dd5dbe247..351eeb599 100644 --- a/src/css/app.scss +++ b/src/css/app.scss @@ -343,3 +343,20 @@ input::-webkit-inner-spin-button { .q-item__section--main ~ .q-item__section--side { padding-inline: 0; } + +.calendars-header { + height: 45px; + display: flex; + justify-content: space-between; + align-items: center; + background-color: $primary; + font-weight: bold; + font-size: 16px; +} + +.calendars-container { + max-width: 800px; + display: flex; + flex-wrap: wrap; + justify-content: space-evenly; +} \ No newline at end of file diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 5f21ea15e..3c1c80954 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -346,6 +346,7 @@ globals: parking: Parking vehicleList: Vehicles vehicle: Vehicle + entryPreAccount: Pre-account unsavedPopup: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index fcaac9790..518985831 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -349,6 +349,7 @@ globals: parking: Parking vehicleList: Vehículos vehicle: Vehículo + entryPreAccount: Precontabilizar unsavedPopup: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? diff --git a/src/pages/Entry/EntryPreAccount.vue b/src/pages/Entry/EntryPreAccount.vue new file mode 100644 index 000000000..cda2ffd5e --- /dev/null +++ b/src/pages/Entry/EntryPreAccount.vue @@ -0,0 +1,477 @@ + + + (countries = data)" + auto-load + /> + (companies = data)" + auto-load + /> + (warehouses = data)" + auto-load + /> + (entryTypes = data)" + auto-load + /> + + (supplierFiscalTypes = data.map((x) => ({ locale: t(x.code), ...x }))) + " + auto-load + /> + (defaultDmsDescription = data?.defaultDmsDescription)" + auto-load + /> + (dmsTypeId = data?.id)" + auto-load + /> + + (totalAmount = data?.reduce((acc, entry) => acc + entry.amount, 0)) + " + auto-load + > + + + {{ t('entry.preAccount.btn') }} + + + + + + {{ row.id }} + + + + + + + + + {{ row.gestDocFk }} + + + + + {{ row.supplier }} + + + + + + {{ row.invoiceInFk }} + + + + + + + + + + + + + + + + + + + + +en: + IntraCommunity: Intra-community + NonCommunity: Non-community + CanaryIslands: Canary Islands +es: + IntraCommunity: Intracomunitaria + NonCommunity: Extracomunitaria + CanaryIsland: Islas Canarias + National: Nacional + diff --git a/src/pages/Entry/__tests__/EntryPreAccount.spec.js b/src/pages/Entry/__tests__/EntryPreAccount.spec.js new file mode 100644 index 000000000..0140a5f1e --- /dev/null +++ b/src/pages/Entry/__tests__/EntryPreAccount.spec.js @@ -0,0 +1,63 @@ +import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest'; +import { createWrapper } from 'app/test/vitest/helper'; +import EntryPreAccount from '../EntryPreAccount.vue'; +import axios from 'axios'; + +describe('EntryPreAccount', () => { + let wrapper; + let vm; + + beforeAll(() => { + vi.spyOn(axios, 'get').mockImplementation((url) => { + if (url == 'EntryConfigs/findOne') + return { data: { maxDays: 90, defaultDays: 30 } }; + return { data: [] }; + }); + wrapper = createWrapper(EntryPreAccount); + vm = wrapper.vm; + }); + + afterEach(() => { + vi.clearAllMocks(); + }); + + describe('filterByDaysAgo()', () => { + it('should set daysAgo to defaultDays if no value is provided', () => { + vm.filterByDaysAgo(); + expect(vm.daysAgo).toBe(vm.defaultDays); + expect(vm.arrayData.store.userParams.daysAgo).toBe(vm.defaultDays); + }); + + it('should set daysAgo to maxDays if the value exceeds maxDays', () => { + vm.filterByDaysAgo(500); + expect(vm.daysAgo).toBe(vm.maxDays); + expect(vm.arrayData.store.userParams.daysAgo).toBe(vm.maxDays); + }); + + it('should set daysAgo to the provided value if it is valid', () => { + vm.filterByDaysAgo(30); + expect(vm.daysAgo).toBe(30); + expect(vm.arrayData.store.userParams.daysAgo).toBe(30); + }); + }); + + describe('Dialog behavior when adding a new row', () => { + it('should open the dialog if the new row has invoiceInFk', async () => { + const dialogSpy = vi.spyOn(vm.quasar, 'dialog'); + const selectedRows = [{ id: 1, invoiceInFk: 123 }]; + vm.selectedRows = selectedRows; + await vm.$nextTick(); + expect(dialogSpy).toHaveBeenCalledWith({ + component: vm.VnConfirm, + componentProps: { title: vm.t('entry.preAccount.hasInvoice') }, + }); + }); + + it('should not open the dialog if the new row does not have invoiceInFk', async () => { + const dialogSpy = vi.spyOn(vm.quasar, 'dialog'); + vm.selectedRows = [{ id: 1, invoiceInFk: null }]; + await vm.$nextTick(); + expect(dialogSpy).not.toHaveBeenCalled(); + }); + }); +}); diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index 0bc92a5ea..3c0f078fe 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -118,6 +118,33 @@ entry: searchInfo: You can search by entry reference descriptorMenu: showEntryReport: Show entry report + preAccount: + gestDocFk: Gestdoc + dmsType: Gestdoc type + invoiceNumber: Entry ref. + reference: Gestdoc ref. + shipped: Shipped + landed: Landed + id: Entry + invoiceInFk: Invoice in + supplierFk: Supplier + country: Country + description: Entry type + payDem: Payment term + isBooked: B + isReceived: R + entryType: Entry type + isAgricultural: Agricultural + fiscalCode: Account type + daysAgo: Max 365 days + search: Search + searchInfo: You can search by supplier name or nickname + btn: Pre-account + hasInvoice: This entry has already an invoice in + success: It has been successfully pre-accounted + dialog: + title: Pre-account entries + message: Do you want the invoice to inherit the entry document? entryFilter: params: isExcludedFromAvailable: Excluded from available diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index 2c80299bc..0addbca94 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -69,6 +69,33 @@ entry: observationType: Tipo de observación search: Buscar entradas searchInfo: Puedes buscar por referencia de entrada + preAccount: + gestDocFk: Gestdoc + dmsType: Tipo gestdoc + invoiceNumber: Ref. Entrada + reference: Ref. GestDoc + shipped: F. envío + landed: F. llegada + id: Entrada + invoiceInFk: Recibida + supplierFk: Proveedor + country: País + description: Tipo de Entrada + payDem: Plazo de pago + isBooked: C + isReceived: R + entryType: Tipo de entrada + isAgricultural: Agricultural + fiscalCode: Tipo de cuenta + daysAgo: Máximo 365 días + search: Buscar + searchInfo: Puedes buscar por nombre o alias de proveedor + btn: Precontabilizar + hasInvoice: Esta entrada ya tiene una f. recibida + success: Se ha precontabilizado correctamente + dialog: + title: Precontabilizar entradas + message: ¿Desea que la factura herede el documento de la entrada? params: entryFk: Entrada observationTypeFk: Tipo de observación diff --git a/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue new file mode 100644 index 000000000..06141736c --- /dev/null +++ b/src/pages/Route/Vehicle/Card/VehicleEventInclusionForm.vue @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + deleteVehicleEvent(), + ) + " + /> + + + + + + + es: + Started: Inicio + Finished: Fin + Add vehicle event: Agregar evento + Edit vehicle event: Editar evento + diff --git a/src/pages/Route/Vehicle/Card/VehicleEvents.vue b/src/pages/Route/Vehicle/Card/VehicleEvents.vue new file mode 100644 index 000000000..5a90c9586 --- /dev/null +++ b/src/pages/Route/Vehicle/Card/VehicleEvents.vue @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + {{ t('eventsInclusionForm.addEvent') }} + + + + diff --git a/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue b/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue new file mode 100644 index 000000000..e3f22e93b --- /dev/null +++ b/src/pages/Route/Vehicle/Card/VehicleEventsPanel.vue @@ -0,0 +1,196 @@ + + + + + + {{ + t('eventsPanel.events') + }} + + + + + ({{ toDateFormat(event.started) }} - + {{ toDateFormat(event.finished) }}) + + {{ t('globals.description') }}: + {{ + dashIfEmpty(event.description) + }} + + {{ t('globals.state') }}: + {{ + getVehicleStateName(event.vehicleStateFk).state + }} + + + + deleteEvent(event.id), + ) + " + > + {{ t('eventsPanel.delete') }} + + + + + {{ t('globals.noResults') }} + + + + + + diff --git a/src/pages/Route/Vehicle/VehicleCalendar.vue b/src/pages/Route/Vehicle/VehicleCalendar.vue new file mode 100644 index 000000000..681bb966a --- /dev/null +++ b/src/pages/Route/Vehicle/VehicleCalendar.vue @@ -0,0 +1,13 @@ + + + + emit('onDateSelected', e)" + /> + \ No newline at end of file diff --git a/src/pages/Route/Vehicle/VehicleCalendarGrid.vue b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue new file mode 100644 index 000000000..99b6602c8 --- /dev/null +++ b/src/pages/Route/Vehicle/VehicleCalendarGrid.vue @@ -0,0 +1,97 @@ + + + + + \ No newline at end of file diff --git a/src/pages/Route/Vehicle/locale/en.yml b/src/pages/Route/Vehicle/locale/en.yml index af6f78fd1..aa1c6d185 100644 --- a/src/pages/Route/Vehicle/locale/en.yml +++ b/src/pages/Route/Vehicle/locale/en.yml @@ -15,6 +15,8 @@ vehicle: remove: Vehicle removed search: Search Vehicle searchInfo: Search by id or number plate + deleteTitle: This item will be deleted + deleteSubtitle: Are you sure you want to continue? params: vehicleTypeFk: Type vehicleStateFk: State diff --git a/src/pages/Route/Vehicle/locale/es.yml b/src/pages/Route/Vehicle/locale/es.yml index 9fd0d3e91..463784c55 100644 --- a/src/pages/Route/Vehicle/locale/es.yml +++ b/src/pages/Route/Vehicle/locale/es.yml @@ -15,6 +15,8 @@ vehicle: remove: Vehículo eliminado search: Buscar Vehículo searchInfo: Buscar por id o matrícula + deleteTitle: Este elemento será eliminado + deleteSubtitle: ¿Seguro que quieres continuar? params: vehicleTypeFk: Tipo vehicleStateFk: Estado diff --git a/src/pages/Worker/Card/WorkerCalendarItem.vue b/src/pages/Worker/Card/WorkerCalendarItem.vue index 86d227ad3..071fa06be 100644 --- a/src/pages/Worker/Card/WorkerCalendarItem.vue +++ b/src/pages/Worker/Card/WorkerCalendarItem.vue @@ -11,6 +11,7 @@ import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.scss'; import { useWeekdayStore } from 'src/stores/useWeekdayStore'; import useNotify from 'src/composables/useNotify.js'; import axios from 'axios'; +import useWeekdaysOrder from 'src/composables/getWeekdays'; const props = defineProps({ year: { @@ -44,6 +45,7 @@ const { locale } = useI18n(); const calendarRef = ref(null); const weekdayStore = useWeekdayStore(); +const weekDays = useWeekdaysOrder(); const selectedDate = ref(); const calendarEventDates = []; const today = ref(date.formatDate(Date.vnNew(), 'YYYY-MM-DD')); @@ -182,7 +184,7 @@ watch(_year, (newValue) => { no-outside-days :selected-dates="calendarEventDates" no-active-date - :weekdays="[1, 2, 3, 4, 5, 6, 0]" + :weekdays="weekDays" short-weekday-label :locale="locale" :now="today" diff --git a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue index 46ae4b698..e9b9cc915 100644 --- a/src/pages/Worker/Card/WorkerTimeControlCalendar.vue +++ b/src/pages/Worker/Card/WorkerTimeControlCalendar.vue @@ -4,6 +4,8 @@ import { useI18n } from 'vue-i18n'; import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js'; import QCalendarMonthWrapper from 'src/components/ui/QCalendarMonthWrapper.vue'; +import useWeekdaysOrder from 'src/composables/getWeekdays'; + const $props = defineProps({ modelValue: { type: String, @@ -32,6 +34,7 @@ const emit = defineEmits(['update:modelValue', 'clickDate', 'onMoved']); const { locale } = useI18n(); const calendarRef = ref(null); +const weekDays = useWeekdaysOrder(); const stateClasses = { CONFIRMED: { @@ -135,7 +138,7 @@ const paintWorkWeeks = async () => { ref="calendarRef" v-model="value" show-work-weeks - :weekdays="[1, 2, 3, 4, 5, 6, 0]" + :weekdays="weekDays" :selected-dates="selectedDates" :min-weekday-label="1" :locale="locale" diff --git a/src/pages/Zone/ZoneCalendar.vue b/src/pages/Zone/ZoneCalendar.vue index 7cae59698..c2c66d753 100644 --- a/src/pages/Zone/ZoneCalendar.vue +++ b/src/pages/Zone/ZoneCalendar.vue @@ -10,6 +10,7 @@ import { QCalendarMonth } from '@quasar/quasar-ui-qcalendar/src/index.js'; import '@quasar/quasar-ui-qcalendar/src/QCalendarVariables.scss'; import { useWeekdayStore } from 'src/stores/useWeekdayStore'; +import useWeekdaysOrder from 'src/composables/getWeekdays'; import axios from 'axios'; const props = defineProps({ @@ -46,6 +47,7 @@ const route = useRoute(); const calendarRef = ref(null); const weekdayStore = useWeekdayStore(); +const weekDays = useWeekdaysOrder(); const showZoneClosingTable = ref(false); const zoneClosingData = ref(null); const today = ref(date.formatDate(Date.vnNew(), 'YYYY-MM-DD')); @@ -161,7 +163,7 @@ const handleDateClick = (timestamp) => { show-work-weeks no-outside-days no-active-date - :weekdays="[1, 2, 3, 4, 5, 6, 0]" + :weekdays="weekDays" short-weekday-label :locale="locale" :now="today" diff --git a/src/pages/Zone/ZoneCalendarGrid.vue b/src/pages/Zone/ZoneCalendarGrid.vue index 1ef687b3f..026b15735 100644 --- a/src/pages/Zone/ZoneCalendarGrid.vue +++ b/src/pages/Zone/ZoneCalendarGrid.vue @@ -229,22 +229,3 @@ onUnmounted(() => arrayData.destroy()); - - diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js index 02eea8c6c..da380313b 100644 --- a/src/router/modules/entry.js +++ b/src/router/modules/entry.js @@ -85,6 +85,7 @@ export default { 'EntryLatestBuys', 'EntryStockBought', 'EntryWasteRecalc', + 'EntryPreAccount', ], }, component: RouterView, @@ -94,6 +95,7 @@ export default { name: 'EntryMain', path: '', component: () => import('src/components/common/VnModule.vue'), + props: (route) => ({ leftDrawer: route.name !== 'EntryPreAccount' }), redirect: { name: 'EntryIndexMain' }, children: [ { @@ -150,6 +152,15 @@ export default { }, component: () => import('src/pages/Entry/EntryWasteRecalc.vue'), }, + { + path: 'pre-account', + name: 'EntryPreAccount', + meta: { + title: 'entryPreAccount', + icon: 'account_balance', + }, + component: () => import('src/pages/Entry/EntryPreAccount.vue'), + }, ], }, ], diff --git a/src/router/modules/route.js b/src/router/modules/route.js index 2b7cfc5be..08ba1701f 100644 --- a/src/router/modules/route.js +++ b/src/router/modules/route.js @@ -170,6 +170,7 @@ const vehicleCard = { 'VehicleBasicData', 'VehicleNotes', 'VehicleDms', + 'VehicleEvents' ], }, children: [ @@ -209,6 +210,15 @@ const vehicleCard = { }, component: () => import('src/pages/Route/Vehicle/VehicleDms.vue'), }, + { + name: 'VehicleEvents', + path: 'events', + meta: { + title: 'calendar', + icon: 'vn:calendar', + }, + component: () => import('src/pages/Route/Vehicle/Card/VehicleEvents.vue'), + }, ], }; diff --git a/test/cypress/integration/entry/entryPreAccount.spec.js b/test/cypress/integration/entry/entryPreAccount.spec.js new file mode 100644 index 000000000..59fa4ee45 --- /dev/null +++ b/test/cypress/integration/entry/entryPreAccount.spec.js @@ -0,0 +1,48 @@ +/// +describe('Entry PreAccount Functionality', () => { + beforeEach(() => { + cy.login('administrative'); + cy.visit('/#/entry/pre-account'); + }); + + it("should pre-account without questions if it's agricultural", () => { + selectRowsByCol('id', [2]); + cy.dataCy('preAccount_btn').click(); + cy.checkNotification('It has been successfully pre-accounted'); + }); + + it("should ask to upload a doc. if it's not agricultural and doesn't have doc. ", () => { + selectRowsByCol('id', [3]); + cy.dataCy('preAccount_btn').click(); + cy.dataCy('Reference_input').type('{selectall}234343fh', { delay: 0 }); + cy.dataCy('VnDms_inputFile').selectFile('test/cypress/fixtures/image.jpg', { + force: true, + }); + cy.dataCy('FormModelPopup_save').click(); + cy.checkNotification('It has been successfully pre-accounted'); + }); + + it('should ask to inherit the doc. and open VnDms popup if user choose "no"', () => { + selectRowsByCol('id', [101]); + cy.dataCy('preAccount_btn').click(); + cy.dataCy('updateFileNo').click(); + cy.get('#formModel').should('be.visible'); + }); + + it('should ask to inherit the doc. and open VnDms popup if user choose "yes" and pre-account', () => { + selectRowsByCol('id', [101]); + cy.dataCy('preAccount_btn').click(); + cy.dataCy('updateFileYes').click(); + cy.checkNotification('It has been successfully pre-accounted'); + }); +}); + +function selectRowsByCol(col = 'id', vals = []) { + for (const val of vals) { + const regex = new RegExp(`^\\s*(${val})\\s*$`); + cy.contains(`[data-col-field="${col}"]`, regex) + .parent() + .find('td > .q-checkbox') + .click(); + } +} diff --git a/test/cypress/integration/item/itemTax.spec.js b/test/cypress/integration/item/itemTax.spec.js index 971e3a732..10c3ee889 100644 --- a/test/cypress/integration/item/itemTax.spec.js +++ b/test/cypress/integration/item/itemTax.spec.js @@ -6,7 +6,7 @@ describe('Item tax', () => { }); it('should modify the tax for Spain', () => { - cy.dataCy('Class_select').eq(1).type('General VAT{enter}'); + cy.dataCy('Class_select').eq(1).type('IVA General{enter}'); cy.dataCy('crudModelDefaultSaveBtn').click(); cy.checkNotification('Data saved'); }); diff --git a/test/cypress/integration/route/vehicle/vehicleEvents.spec.js b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js new file mode 100644 index 000000000..f03e11b29 --- /dev/null +++ b/test/cypress/integration/route/vehicle/vehicleEvents.spec.js @@ -0,0 +1,27 @@ +describe('Vehicle', () => { + + beforeEach(() => { + cy.viewport(1920, 1080); + cy.login('deliveryAssistant'); + cy.visit(`/#/route/vehicle/3/events`); + }); + + it('should add, edit and delete a vehicle event', () => { + cy.get('.q-page-sticky > div > .q-btn').click(); + cy.dataCy('Started_inputDate').type('01/01/2001'); + cy.dataCy('Finished_inputDate').type('08/02/2001'); + cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test'); + cy.selectOption('[data-cy="State_input"]', 3); + cy.get('.q-mt-lg > .q-btn--standard').click(); + + cy.get('.q-current-day > .q-calendar-month__day--content > .q-btn').click(); + cy.dataCy('Started_inputDate').clear().type('03/02/2001'); + cy.dataCy('Finished_inputDate').clear().type('15/03/2001'); + cy.get(':nth-child(5)').find('[data-cy="Description_input"]').clear().type('Test2'); + cy.selectOption('[data-cy="State_input"]', 5); + cy.get('.q-mt-lg > .q-btn--standard').click(); + + cy.dataCy('delete_event').eq(0).click(); + cy.dataCy('VnConfirm_confirm').click(); + }); +}); \ No newline at end of file