diff --git a/src/composables/getColAlign.js b/src/composables/getColAlign.js index a930fd7d8..c1841e134 100644 --- a/src/composables/getColAlign.js +++ b/src/composables/getColAlign.js @@ -9,6 +9,8 @@ export function getColAlign(col) { case 'number': align = 'right'; break; + case 'time': + case 'date': case 'checkbox': align = 'center'; break; diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 7095942ee..2087fd4e7 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -159,6 +159,7 @@ globals: raid: 'Raid {daysInForward} days' isVies: Vies noData: No data available + vehicle: Vehicle pageTitles: logIn: Login addressEdit: Update address diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 3336f3b99..3956b2e4c 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -163,6 +163,7 @@ globals: raid: 'Redada {daysInForward} días' isVies: Vies noData: Datos no disponibles + vehicle: Vehículo pageTitles: logIn: Inicio de sesión addressEdit: Modificar consignatario diff --git a/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue b/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue new file mode 100644 index 000000000..e5c1249b2 --- /dev/null +++ b/src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue index 9a9213868..d33c9f753 100644 --- a/src/pages/Route/Agency/Card/AgencyWorkcenter.vue +++ b/src/pages/Route/Agency/Card/AgencyWorkcenter.vue @@ -80,6 +80,7 @@ async function deleteWorCenter(id) { color="primary" round flat + data-cy="removeWorkCenterBtn" /> diff --git a/src/pages/Route/Card/RouteDescriptorProxy.vue b/src/pages/Route/Card/RouteDescriptorProxy.vue index 1ff39a51e..7553469f3 100644 --- a/src/pages/Route/Card/RouteDescriptorProxy.vue +++ b/src/pages/Route/Card/RouteDescriptorProxy.vue @@ -7,6 +7,10 @@ const $props = defineProps({ type: Number, required: true, }, + summary: { + type: Object, + default: null, + }, }); diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue index 21858102b..cb5158517 100644 --- a/src/pages/Route/Card/RouteFilter.vue +++ b/src/pages/Route/Card/RouteFilter.vue @@ -25,7 +25,7 @@ const emit = defineEmits(['search']); > - {{ t(`params.${tag.label}`) }}: + {{ t(`route.params.${tag.label}`) }}: {{ formatFn(tag.value) }} @@ -33,6 +33,7 @@ const emit = defineEmits(['search']); @@ -146,7 +147,7 @@ const emit = defineEmits(['search']); @@ -154,38 +155,3 @@ const emit = defineEmits(['search']); - - -en: - params: - warehouseFk: Warehouse - description: Description - m3: m³ - scopeDays: Days Onward - vehicleFk: Vehicle - agencyModeFk: Agency - workerFk: Worker - from: From - to: To - Served: Served -es: - params: - warehouseFk: Almacén - description: Descripción - m3: m³ - scopeDays: Días en adelante - vehicleFk: Vehículo - agencyModeFk: Agencia - workerFk: Trabajador - from: Desde - to: Hasta - Warehouse: Almacén - Description: Descripción - Vehicle: Vehículo - Agency: Agencia - Worker: Trabajador - From: Desde - To: Hasta - Served: Servida - Days Onward: Días en adelante - diff --git a/src/pages/Route/RouteAutonomous.vue b/src/pages/Route/RouteAutonomous.vue index 3047cdf86..15db2a55f 100644 --- a/src/pages/Route/RouteAutonomous.vue +++ b/src/pages/Route/RouteAutonomous.vue @@ -13,6 +13,7 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue'; import RouteDescriptorProxy from 'pages/Route/Card/RouteDescriptorProxy.vue'; import InvoiceInDescriptorProxy from 'pages/InvoiceIn/Card/InvoiceInDescriptorProxy.vue'; import SupplierDescriptorProxy from 'pages/Supplier/Card/SupplierDescriptorProxy.vue'; +import AgencyDescriptorProxy from 'pages/Route/Agency/Card/AgencyDescriptorProxy.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; import VnDms from 'components/common/VnDms.vue'; import VnTable from 'components/VnTable/VnTable.vue'; @@ -236,10 +237,16 @@ onUnmounted(() => (stateStore.rightDrawer = false)); selection: 'multiple', }" > - + - {{ row.routeFk }} - + {{ row?.agencyModeName }} + + + + + + {{ row?.agencyAgreement }} + diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue index a7e192765..fb19323c9 100644 --- a/src/pages/Route/RouteExtendedList.vue +++ b/src/pages/Route/RouteExtendedList.vue @@ -38,7 +38,7 @@ const routeFilter = { }; const columns = computed(() => [ { - align: 'center', + align: 'right', name: 'id', label: 'Id', chip: { @@ -46,11 +46,11 @@ const columns = computed(() => [ }, isId: true, columnFilter: false, + width: '25px', }, { - align: 'center', name: 'workerFk', - label: t('route.Worker'), + label: t('globals.worker'), create: true, component: 'select', attrs: { @@ -71,9 +71,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.workerUserName), }, { - align: 'center', name: 'agencyModeFk', - label: t('route.Agency'), + label: t('globals.agency'), isTitle: true, cardVisible: true, create: true, @@ -90,9 +89,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.agencyName), }, { - align: 'center', name: 'vehicleFk', - label: t('route.Vehicle'), + label: t('globals.vehicle'), cardVisible: true, create: true, component: 'select', @@ -111,9 +109,8 @@ const columns = computed(() => [ format: (row, dashIfEmpty) => dashIfEmpty(row.vehiclePlateNumber), }, { - align: 'center', name: 'dated', - label: t('route.Date'), + label: t('globals.date'), columnFilter: false, cardVisible: true, create: true, @@ -122,9 +119,8 @@ const columns = computed(() => [ dated === '0000-00-00' ? dashIfEmpty(null) : toDate(dated), }, { - align: 'center', name: 'from', - label: t('route.From'), + label: t('globals.from'), visible: false, cardVisible: true, create: true, @@ -132,9 +128,8 @@ const columns = computed(() => [ format: ({ from }) => toDate(from), }, { - align: 'center', name: 'to', - label: t('route.To'), + label: t('globals.to'), visible: false, cardVisible: true, create: true, @@ -142,30 +137,31 @@ const columns = computed(() => [ format: ({ date }) => toDate(date), }, { - align: 'center', + align: 'right', name: 'm3', label: 'm3', cardVisible: true, columnClass: 'shrink', + width: '50px', }, { - align: 'center', name: 'started', label: t('route.hourStarted'), component: 'time', columnFilter: false, format: ({ started }) => toHour(started), + width: '50px', }, { - align: 'center', name: 'finished', label: t('route.hourFinished'), component: 'time', columnFilter: false, format: ({ finished }) => toHour(finished), + width: '50px', }, { - align: 'center', + align: 'right', name: 'kmStart', label: t('route.KmStart'), columnClass: 'shrink', @@ -173,7 +169,7 @@ const columns = computed(() => [ visible: false, }, { - align: 'center', + align: 'right', name: 'kmEnd', label: t('route.KmEnd'), columnClass: 'shrink', @@ -181,16 +177,15 @@ const columns = computed(() => [ visible: false, }, { - align: 'center', + align: 'left', name: 'description', - label: t('route.Description'), + label: t('globals.description'), isTitle: true, create: true, component: 'input', field: 'description', }, { - align: 'center', name: 'isOk', label: t('route.Served'), component: 'checkbox', @@ -202,7 +197,7 @@ const columns = computed(() => [ name: 'tableActions', actions: [ { - title: t('route.Add tickets'), + title: t('route.addTicket'), icon: 'vn:ticketAdd', action: (row) => openTicketsDialog(row?.id), isPrimary: true, @@ -214,7 +209,7 @@ const columns = computed(() => [ isPrimary: true, }, { - title: t('route.Route summary'), + title: t('route.routeSummary'), icon: 'arrow_forward', action: (row) => navigate(row?.id), isPrimary: true, @@ -276,11 +271,13 @@ const openTicketsDialog = (id) => { - {{ t('route.Select the starting date') }} + + {{ t('route.extendedList.selectStartingDate') }} + @@ -288,7 +285,7 @@ const openTicketsDialog = (id) => { @@ -339,7 +336,7 @@ const openTicketsDialog = (id) => { :disable="!selectedRows?.length" @click="confirmationDialog = true" > - {{ t('route.Clone Selected Routes') }} + {{ t('route.extendedList.cloneSelectedRoutes') }} { :disable="!selectedRows?.length" @click="showRouteReport" > - {{ t('route.Download selected routes as PDF') }} + {{ + t('route.extendedList.downloadSelectedRoutes') + }} { :disable="!selectedRows?.length" @click="markAsServed()" > - {{ t('route.Mark as served') }} + {{ t('route.extendedList.markServed') }} diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 63bd61e33..7fc1027ea 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -7,6 +7,8 @@ import RouteSummary from 'pages/Route/Card/RouteSummary.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; import VnTable from 'components/VnTable/VnTable.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import AgencyDescriptorProxy from 'src/pages/Route/Agency/Card/AgencyDescriptorProxy.vue'; +import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue'; import VnSection from 'src/components/common/VnSection.vue'; import VnSelectWorker from 'src/components/common/VnSelectWorker.vue'; import RouteTickets from './RouteTickets.vue'; @@ -41,25 +43,29 @@ const columns = computed(() => [ condition: () => true, }, columnFilter: false, + width: '25px', }, { - align: 'left', name: 'workerFk', - label: t('route.Worker'), + label: t('gloabls.worker'), component: markRaw(VnSelectWorker), create: true, - cardVisible: true, format: (row, dashIfEmpty) => dashIfEmpty(row.travelRef), columnFilter: false, + width: '100px', }, { - align: 'left', - name: 'agencyName', - label: t('route.Agency'), + name: 'workerFk', + label: t('globals.worker'), + visible: false, cardVisible: true, }, { - label: t('route.Agency'), + name: 'agencyName', + label: t('globals.agency'), + }, + { + label: t('globals.Agency'), name: 'agencyModeFk', component: 'select', attrs: { @@ -75,14 +81,18 @@ const columns = computed(() => [ visible: false, }, { - align: 'left', - name: 'vehiclePlateNumber', - label: t('route.Vehicle'), + name: 'agencyName', + label: t('globals.agency'), + visible: false, cardVisible: true, }, + { + name: 'vehiclePlateNumber', + label: t('globals.vehicle'), + }, { name: 'vehicleFk', - label: t('route.Vehicle'), + label: t('globals.Vehicle'), cardVisible: true, component: 'select', attrs: { @@ -100,25 +110,27 @@ const columns = computed(() => [ visible: false, }, { - align: 'left', + align: 'center', name: 'started', label: t('route.hourStarted'), cardVisible: true, columnFilter: false, format: ({ started }) => toHour(started), + width: '50px', }, { - align: 'left', + align: 'center', name: 'finished', label: t('route.hourFinished'), cardVisible: true, columnFilter: false, format: ({ finished }) => toHour(finished), + width: '50px', }, { align: 'left', name: 'description', - label: t('route.Description'), + label: t('globals.description'), cardVisible: true, isTitle: true, create: true, @@ -126,7 +138,6 @@ const columns = computed(() => [ columnFilter: false, }, { - align: 'left', name: 'isOk', label: t('route.Served'), component: 'checkbox', @@ -168,6 +179,7 @@ const columns = computed(() => [ [ + + + {{ row?.agencyName }} + + + + + + {{ row?.vehiclePlateNumber }} + + + diff --git a/src/pages/Route/RouteRoadmap.vue b/src/pages/Route/RouteRoadmap.vue index badee148b..c981b86a5 100644 --- a/src/pages/Route/RouteRoadmap.vue +++ b/src/pages/Route/RouteRoadmap.vue @@ -2,10 +2,9 @@ import { useI18n } from 'vue-i18n'; import { computed, ref } from 'vue'; import { dashIfEmpty } from 'src/filters'; -import { toDate, toDateHourMin } from 'filters/index'; +import { toDate, toDateHourMin, toCurrency } from 'filters/index'; import { useQuasar } from 'quasar'; import { useSummaryDialog } from 'composables/useSummaryDialog'; -import toCurrency from 'filters/toCurrency'; import axios from 'axios'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; @@ -16,6 +15,8 @@ import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputTime from 'src/components/common/VnInputTime.vue'; import VnSection from 'src/components/common/VnSection.vue'; import RoadmapFilter from './Roadmap/RoadmapFilter.vue'; +import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue'; +import SupplierDescriptorProxy from 'src/pages/Supplier/Card/SupplierDescriptorProxy.vue'; const { viewSummary } = useSummaryDialog(); const { t } = useI18n(); @@ -32,7 +33,7 @@ const columns = computed(() => [ { align: 'left', name: 'name', - label: t('Roadmap'), + label: t('route.roadmap.roadmap'), create: true, cardVisible: true, columnFilter: { @@ -40,9 +41,9 @@ const columns = computed(() => [ }, }, { - align: 'left', + align: 'center', name: 'etd', - label: t('ETD'), + label: t('route.roadmap.etd'), component: 'date', columnFilter: { inWhere: true, @@ -53,7 +54,7 @@ const columns = computed(() => [ { align: 'left', name: 'supplierFk', - label: t('Carrier'), + label: t('route.roadmap.carrier'), component: 'select', attrs: { url: 'suppliers', @@ -64,21 +65,21 @@ const columns = computed(() => [ }, { name: 'tractorPlate', - label: t('Plate'), + label: t('route.roadmap.vehicle'), field: (row) => row.tractorPlate, sortable: true, align: 'left', }, { name: 'price', - label: t('Price'), - field: (row) => toCurrency(row.price), + label: t('route.roadmap.price'), + format: ({ price }) => toCurrency(price), sortable: true, - align: 'left', + align: 'right', }, { name: 'observations', - label: t('Observations'), + label: t('route.roadmap.observations'), field: (row) => dashIfEmpty(row.observations), sortable: true, align: 'left', @@ -88,7 +89,7 @@ const columns = computed(() => [ name: 'tableActions', actions: [ { - title: t('Ver cmr'), + title: t('route.roadmap.seeCmr'), icon: 'preview', isPrimary: true, action: (row) => viewSummary(row?.id, RoadmapSummary), @@ -123,8 +124,8 @@ function confirmRemove() { .dialog({ component: VnConfirm, componentProps: { - title: t('Selected roadmaps will be removed'), - message: t('Are you sure you want to continue?'), + title: t('route.roadmap.selectedRoadmapsRemoved'), + message: t('route.roadmap.areYouSure'), promise: removeSelection, }, }) @@ -156,15 +157,24 @@ function exprBuilder(param, value) { - {{ t('Select the estimated date of departure (ETD)') }} + {{ t('route.roadmap.selectEtd') }} - + - + {{ t('globals.clone') }} @@ -180,7 +190,7 @@ function exprBuilder(param, value) { :disable="!selectedRows?.length" @click="isCloneDialogOpen = true" > - {{ t('Clone Selected Routes') }} + {{ t('route.roadmap.cloneSelected') }} - {{ t('Delete roadmap(s)') }} + {{ t('route.roadmap.deleteRoadmap') }} @@ -221,7 +231,7 @@ function exprBuilder(param, value) { redirect="route/roadmap" :create="{ urlCreate: 'Roadmaps', - title: t('Create routemap'), + title: t('route.roadmap.createRoadmap'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: {}, }" @@ -231,7 +241,10 @@ function exprBuilder(param, value) { {{ toDateHourMin(row.etd) }} - {{ row.supplierFk }} + + {{ row.driverName }} + + @@ -250,21 +263,3 @@ function exprBuilder(param, value) { gap: 12px; } - -es: - Create routemap: Crear troncal - Search roadmaps: Buscar troncales - You can search by roadmap reference: Puedes buscar por referencia del troncal - Delete roadmap(s): Eliminar troncal(es) - Selected roadmaps will be removed: Los troncales seleccionadas serán eliminados - Are you sure you want to continue?: ¿Seguro que quieres continuar? - The date can't be empty: La fecha no puede estar vacía - Clone Selected Routes: Clonar rutas seleccionadas - Create roadmap: Crear troncal - Roadmap: Troncal - Carrier: Transportista - Plate: Matrícula - Price: Precio - Observations: Observaciones - Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida - diff --git a/src/pages/Route/Vehicle/Card/VehicleDescriptor.vue b/src/pages/Route/Vehicle/Card/VehicleDescriptor.vue index 50129cd9a..ad2ae61e4 100644 --- a/src/pages/Route/Vehicle/Card/VehicleDescriptor.vue +++ b/src/pages/Route/Vehicle/Card/VehicleDescriptor.vue @@ -1,14 +1,27 @@ diff --git a/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue b/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue new file mode 100644 index 000000000..cc0943cb8 --- /dev/null +++ b/src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue @@ -0,0 +1,20 @@ + + + + + + diff --git a/src/pages/Route/locale/en.yml b/src/pages/Route/locale/en.yml index ec7f5287a..447d641f0 100644 --- a/src/pages/Route/locale/en.yml +++ b/src/pages/Route/locale/en.yml @@ -1,49 +1,69 @@ route: + filter: + Served: Served + extendedList: + selectStartingDate: Select the starting date + startingDate: Starting date + cloneSelectedRoutes: Clone selected routes + downloadSelectedRoutes: Download selected routes as PDF + markServed: Mark as served roadmap: + roadmap: Roadmap + carrier: Carrier + vehicle: Vehicle + price: Price + observations: Observations + etd: ETD + dateCantEmpty: The date can't be empty + createRoadmap: Create roadmap + deleteRoadmap: Delete roadmap(s) + cloneSelected: Clone selected routes + selectedRoadmapsRemoved: Selected roadmaps will be removed + areYouSure: Are you sure you want to continue? + selectEtd: Select the estimated date of departure (ETD) search: Search roadmap searchInfo: You can search by roadmap reference params: - id: Id - name: Name + warehouseFk: Warehouse + description: Description + m3: m³ + scopeDays: Days Onward + vehicleFk: Vehicle + agencyModeFk: Agency + workerFk: Worker + from: From + to: To + isOk: Served etd: ETD tractorPlate: Plate price: Price observations: Observations + id: Id + name: Name cmrFk: CMR id hasCmrDms: Attached in gestdoc ticketFk: Ticketd id routeFk: Route id clientFk: Client id countryFk: Country - warehouseFk: Warehouse shipped: Shipped agencyAgreement: Agency agreement agencyModeName: Agency route - Worker: Worker - Agency: Agency - Vehicle: Vehicle - Description: Description hourStarted: H.Start hourFinished: H.End - dated: Dated - From: From - To: To + createRoute: Create route Date: Date KmStart: Km start KmEnd: Km end Served: Served - Clone Selected Routes: Clone selected routes - Select the starting date: Select the starting date - Stating date: Starting date - Cancel: Cancel - Mark as served: Mark as served - Download selected routes as PDF: Download selected routes as PDF - Add ticket: Add ticket - Summary: Summary + addTicket: Add ticket + routeSummary: Go to summary Route is closed: Route is closed Route is not served: Route is not served search: Search route searchInfo: You can search by route reference + dated: Dated + preview: Preview cmr: search: Search Cmr searchInfo: You can search Cmr by Id diff --git a/src/pages/Route/locale/es.yml b/src/pages/Route/locale/es.yml index 1e247ab68..896fb2087 100644 --- a/src/pages/Route/locale/es.yml +++ b/src/pages/Route/locale/es.yml @@ -1,14 +1,45 @@ route: + filter: + Served: Servida + extendedList: + selectStartingDate: Seleccione la fecha de inicio + statingDate: Fecha de inicio + cloneSelectedRoutes: Clonar rutas seleccionadas + downloadSelectedRoutes: Descargar rutas seleccionadas como PDF + markServed: Marcar como servidas roadmap: + roadmap: Troncal + carrier: Transportista + vehicle: Vehículo + price: Precio + observations: Observaciones + etd: ETD + dateCantEmpty: La fecha no puede estar vacía + createRoadmap: Crear troncal + deleteRoadmap: Eliminar troncal(es) + cloneSelected: Clonar rutas seleccionadas + selectedRoadmapsRemoved: Los troncales seleccionadas serán eliminados + areYouSure: ¿Seguro que quieres continuar? + selectEtd: Selecciona la fecha estimada de salida search: Buscar troncales searchInfo: Puedes buscar por referencia del troncal params: - id: Id - name: Troncal + warehouseFk: Almacén + description: Descripción + m3: m³ + scopeDays: Días adelante + vehicleFk: Vehículo + agencyModeFk: Agencia + workerFk: Trabajador + from: Desde + to: Hasta + isOk: Servida etd: ETD tractorPlate: Matrícula price: Precio observations: Observaciones + id: Id + name: Troncal cmrFk: Id CMR hasCmrDms: Gestdoc search: Búsqueda general @@ -16,7 +47,6 @@ route: routeFk: Id ruta clientFk: Id cliente countryFk: Pais - warehouseFk: Almacén shipped: Fecha preparación agencyModeName: Agencia Ruta agencyAgreement: Agencia Acuerdo @@ -27,25 +57,18 @@ route: hourStarted: H.Inicio hourFinished: H.Fin createRoute: Crear ruta - From: Desde - To: Hasta Date: Fecha KmStart: Km inicio KmEnd: Km fin Served: Servida - Clone Selected Routes: Clonar rutas seleccionadas - Select the starting date: Seleccione la fecha de inicio - Stating date: Fecha de inicio - Cancel: Cancelar - Mark as served: Marcar como servidas - Download selected routes as PDF: Descargar rutas seleccionadas como PDF - Add ticket: Añadir tickets - preview: Vista previa - Summary: Resumen + addTicket: Añadir tickets + routeSummary: Ir a vista previa Route is closed: La ruta está cerrada Route is not served: La ruta no está servida search: Buscar rutas searchInfo: Puedes buscar por referencia de la ruta + dated: Fecha + preview: Vista previa cmr: list: results: resultados diff --git a/test/cypress/integration/claim/claimAction.spec.js b/test/cypress/integration/claim/claimAction.spec.js index b0a16a2ad..7eba07f51 100644 --- a/test/cypress/integration/claim/claimAction.spec.js +++ b/test/cypress/integration/claim/claimAction.spec.js @@ -15,12 +15,14 @@ describe('ClaimAction', () => { cy.get('[title="Import claim"]').click(); }); - it('should change destination', () => { + // https://redmine.verdnatura.es/issues/8756 + xit('should change destination', () => { const rowData = [true, null, null, 'Bueno']; cy.fillRow(firstRow, rowData); }); - it('should change destination from other button', () => { + // https://redmine.verdnatura.es/issues/8756 + xit('should change destination from other button', () => { const rowData = [true]; cy.fillRow(firstRow, rowData); @@ -33,7 +35,8 @@ describe('ClaimAction', () => { cy.get('[title="Regularize"]').click(); }); - it('should remove the line', () => { + // https://redmine.verdnatura.es/issues/8756 + xit('should remove the line', () => { cy.fillRow(firstRow, [true]); cy.removeCard(); cy.clickConfirm(); diff --git a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js index 5679ceba1..a3e0aac81 100644 --- a/test/cypress/integration/route/agency/agencyWorkCenter.spec.js +++ b/test/cypress/integration/route/agency/agencyWorkCenter.spec.js @@ -1,27 +1,34 @@ -describe.skip('AgencyWorkCenter', () => { +describe('AgencyWorkCenter', () => { + const selectors = { + workCenter: 'workCenter_select', + popupSave: 'FormModelPopup_save', + popupCancel: 'FormModelPopup_cancel', + remove: 'removeWorkCenterBtn', + }; + + const messages = { + dataCreated: 'Data created', + alreadyAssigned: 'This workCenter is already assigned to this agency', + removed: 'WorkCenter removed successfully', + }; + beforeEach(() => { cy.viewport(1920, 1080); cy.login('developer'); cy.visit(`/#/route/agency/11/workCenter`); }); - const createButton = '.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon'; - const workCenterCombobox = 'input[role="combobox"]'; - it('check workCenter crud', () => { - // create - cy.get(createButton).click(); - cy.get(workCenterCombobox).type('workCenterOne{enter}'); + it('Should add work center, check already assigned and remove work center', () => { + cy.addBtnClick(); + cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne'); + cy.dataCy(selectors.popupSave).click(); cy.checkNotification('Data created'); - - // expect error when duplicate - cy.get(createButton).click(); - cy.selectOption(workCenterCombobox, 'workCenterOne'); - cy.get('[data-cy="FormModelPopup_save"]').click(); - cy.checkNotification('This workCenter is already assigned to this agency'); - cy.get('[data-cy="FormModelPopup_cancel"]').click(); - - // delete - cy.get('.q-item__section--side > .q-btn > .q-btn__content > .q-icon').click(); - cy.checkNotification('WorkCenter removed successfully'); + cy.addBtnClick(); + cy.selectOption('[data-cy="workCenter_select"]', 'workCenterOne'); + cy.dataCy(selectors.popupSave).click(); + cy.checkNotification(messages.alreadyAssigned); + cy.dataCy(selectors.popupCancel).click(); + cy.dataCy(selectors.remove).click(); + cy.checkNotification(messages.removed); }); });
{{ t('route.Select the starting date') }}
+ {{ t('route.extendedList.selectStartingDate') }} +
- {{ t('Select the estimated date of departure (ETD)') }} + {{ t('route.roadmap.selectEtd') }}