From 663c093a0032ffd43cee788ec0a63a086da5e8e3 Mon Sep 17 00:00:00 2001 From: pablone Date: Mon, 22 Apr 2024 18:17:01 +0200 Subject: [PATCH] feat: refs #4988 agency e2e --- src/i18n/locale/en.yml | 23 +++++++++---- src/i18n/locale/es.yml | 13 ++++++++ src/pages/Agency/Card/AgencyBasicData.vue | 2 +- src/pages/Agency/Card/AgencyModes.vue | 27 +-------------- src/pages/Agency/Card/AgencyWorkcenter.vue | 28 +++++++++++++++- test/cypress/integration/agency/spec.spec.js | 25 ++++++++++++++ .../pages/Agency/AgencyWorCenter.spec.js | 33 +++++++++++++++++++ test/vitest/setup-file.js | 1 - 8 files changed, 116 insertions(+), 36 deletions(-) create mode 100644 test/cypress/integration/agency/spec.spec.js create mode 100644 test/vitest/__tests__/pages/Agency/AgencyWorCenter.spec.js delete mode 100644 test/vitest/setup-file.js diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 3ac3d18a0..d978fa089 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -89,9 +89,14 @@ globals: basicData: Basic data log: Logs parkingList: Parkings list + agencyList: Agencies list + agency: Agency + workCenters: Work centers + modes: Modes created: Created worker: Worker now: Now + name: Name errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred @@ -1146,13 +1151,17 @@ item: stemMultiplier: Multiplier producer: Producer landed: Landed - create: - name: Name - tag: Tag - priority: Priority - type: Type - intrastat: Intrastat - origin: Origin +agency: + isOwn: Own + isAnyVolumeAllowed: Any volume allowed + notification: + removeItem: Agency removed successfully + removeItemError: Error removing agency + pageTitles: + agency: Agency + searchBar: + info: You can search by agency code + label: Search agency... components: topbar: {} userPanel: diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 4ecbcdbc0..aa4d88f5d 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -89,9 +89,14 @@ globals: basicData: Datos básicos log: Historial parkingList: Listado de parkings + agencyList: Listado de agencias + agency: Agencia + workCenters: Centros de trabajo + modes: Modos created: Fecha creación worker: Trabajador now: Ahora + name: Nombre errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor @@ -1152,6 +1157,14 @@ item: type: Tipo intrastat: Intrastat origin: Origen +agency: + isOwn: Propio + isAnyVolumeAllowed: Cualquier volumen + removeItem: Agencia eliminada correctamente + notification: + removeItemError: Error al eliminar la agencia + pageTitles: + agency: Agencia components: topbar: {} userPanel: diff --git a/src/pages/Agency/Card/AgencyBasicData.vue b/src/pages/Agency/Card/AgencyBasicData.vue index 00595ce1f..40510a205 100644 --- a/src/pages/Agency/Card/AgencyBasicData.vue +++ b/src/pages/Agency/Card/AgencyBasicData.vue @@ -30,7 +30,7 @@ const warehouses = ref([]); -import { useRoute, useRouter } from 'vue-router'; +import { useRoute } from 'vue-router'; import { useI18n } from 'vue-i18n'; import CardList from 'src/components/ui/CardList.vue'; @@ -7,19 +7,9 @@ import VnPaginate from 'src/components/ui/VnPaginate.vue'; import VnLv from 'src/components/ui/VnLv.vue'; const { t } = useI18n(); -const router = useRouter(); const route = useRoute(); console.log('route: ', route.path); const routeId = route.params.id; -const toAgencyModeCreate = (consigneeId) => { - router.push({ - name: 'AgencyMode', - params: { - id: route.params.id, - consigneeId, - }, - }); -}; - - - - - - {{ t('New mode') }} - - diff --git a/src/pages/Agency/Card/AgencyWorkcenter.vue b/src/pages/Agency/Card/AgencyWorkcenter.vue index cacd4b8f2..83231e6c2 100644 --- a/src/pages/Agency/Card/AgencyWorkcenter.vue +++ b/src/pages/Agency/Card/AgencyWorkcenter.vue @@ -1,4 +1,6 @@