+
{{ t('Add ticket') }}
@@ -485,6 +420,20 @@ const markAsServed = () => {
>
{{ t('Preview') }}
+
+
+ {{ t('Summary') }}
+
+
@@ -505,8 +454,13 @@ const markAsServed = () => {
+
+es:
+ Search roadmaps: Buscar troncales
+ You can search by roadmap reference: Puedes buscar por referencia de la troncal
+ Delete roadmap(s): Eliminar troncal(es)
+ Selected roadmaps will be removed: Las troncales seleccionadas serán eliminadas
+ 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
+ Preview: Vista previa
+
diff --git a/src/pages/Route/RouteTickets.vue b/src/pages/Route/RouteTickets.vue
new file mode 100644
index 000000000..8410232c5
--- /dev/null
+++ b/src/pages/Route/RouteTickets.vue
@@ -0,0 +1,453 @@
+
+
+
+
+
+
+
+
+ (routeEntity = data)"
+ auto-load
+ :url="`Routes/${route.params?.id}`"
+ :filter="{
+ fields: ['vehicleFk'],
+ }"
+ />
+
+
+
+ {{ t('Select the starting date') }}
+
+
+
+
+
+
+
+
+ {{ t('Clone') }}
+
+
+
+
+
+
+
+
+ {{ t('Sort routes') }}
+
+
+ {{ t('Open buscaman') }}
+
+
+ {{ t('Delete priority') }}
+
+
+ {{
+ t('Renumber all tickets in the order you see on the screen')
+ }}
+
+
+
+ {{ t('Send SMS to all clients') }}
+
+
+
+
+
(ticketList = data)"
+ >
+
+
+
+
+
+
+
+
+ {{ t('Assign highest priority') }}
+
+
+
+
+
+
+
+
+
+ {{ value }}
+ {{ t('Open buscaman') }}
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+ {{ t('globals.remove') }}
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('Add ticket') }}
+
+
+
+
+
+
+
+
+es:
+ Order: Orden
+ Street: Dirección fiscal
+ City: Población
+ PC: CP
+ Client: Cliente
+ Warehouse: Almacén
+ Packages: Bultos
+ Packaging: Encajado
+ Confirm removal from route: Quitar de la ruta
+ Are you sure you want to remove this ticket from the route?: ¿Seguro que quieres quitar este ticket de la ruta?
+ Sort routes: Ordenar rutas
+ Open buscaman: Abrir buscaman
+ Delete priority: Borrar orden
+ Renumber all tickets in the order you see on the screen: Renumerar todos los tickets con el orden que ves por pantalla
+ Assign highest priority: Asignar máxima prioridad
+ Send SMS to all clients: Mandar sms a todos los clientes de las rutas
+ Send SMS to the selected tickets: Enviar SMS a los tickets seleccionados
+ Add ticket: Añadir ticket
+
diff --git a/src/pages/Supplier/Card/SupplierAccounts.vue b/src/pages/Supplier/Card/SupplierAccounts.vue
index 302e03217..41df6adb9 100644
--- a/src/pages/Supplier/Card/SupplierAccounts.vue
+++ b/src/pages/Supplier/Card/SupplierAccounts.vue
@@ -18,13 +18,16 @@ const quasar = useQuasar();
const { notify } = useNotify();
const route = useRoute();
const { t } = useI18n();
+
+const bankEntitiesRef = ref(null);
const supplier = ref(null);
const supplierAccountRef = ref(null);
const wireTransferFk = ref(null);
const bankEntitiesOptions = ref([]);
-const onBankEntityCreated = (data) => {
- bankEntitiesOptions.value.push(data);
+const onBankEntityCreated = async (dataSaved, rowData) => {
+ await bankEntitiesRef.value.fetch();
+ rowData.bankEntityFk = dataSaved.id;
};
const onChangesSaved = () => {
@@ -63,6 +66,7 @@ onMounted(() => {
(bankEntitiesOptions = data)"
auto-load
@@ -114,13 +118,16 @@ onMounted(() => {
:label="t('worker.create.bankEntity')"
v-model="row.bankEntityFk"
:options="bankEntitiesOptions"
- option-label="name"
+ option-label="bic"
option-value="id"
hide-selected
>
+ onBankEntityCreated(requestResponse, row)
+ "
:show-entity-field="false"
/>
diff --git a/src/pages/Supplier/Card/SupplierAddresses.vue b/src/pages/Supplier/Card/SupplierAddresses.vue
index c6b08075f..735b50625 100644
--- a/src/pages/Supplier/Card/SupplierAddresses.vue
+++ b/src/pages/Supplier/Card/SupplierAddresses.vue
@@ -83,8 +83,13 @@ const redirectToUpdateView = (addressData) => {
- {{ t('supplier.list.newSupplier') }}
+ {{ t('New address') }}
+
+
+es:
+ New address: Nueva dirección
+
diff --git a/src/pages/Supplier/Card/SupplierBasicData.vue b/src/pages/Supplier/Card/SupplierBasicData.vue
index bc50deb9b..01741dd77 100644
--- a/src/pages/Supplier/Card/SupplierBasicData.vue
+++ b/src/pages/Supplier/Card/SupplierBasicData.vue
@@ -26,6 +26,7 @@ const workersOptions = ref([]);
:url-update="`Suppliers/${route.params.id}`"
model="supplier"
auto-load
+ :clear-store-on-unmount="false"
>
diff --git a/src/pages/Supplier/Card/SupplierBillingData.vue b/src/pages/Supplier/Card/SupplierBillingData.vue
index bf5ccb115..26b6e5461 100644
--- a/src/pages/Supplier/Card/SupplierBillingData.vue
+++ b/src/pages/Supplier/Card/SupplierBillingData.vue
@@ -33,6 +33,7 @@ const formatPayDems = (data) => {
:url-update="`Suppliers/${route.params.id}`"
model="supplier"
auto-load
+ :clear-store-on-unmount="false"
>
diff --git a/src/pages/Supplier/Card/SupplierContacts.vue b/src/pages/Supplier/Card/SupplierContacts.vue
index d69b74a4c..3abe5a9cc 100644
--- a/src/pages/Supplier/Card/SupplierContacts.vue
+++ b/src/pages/Supplier/Card/SupplierContacts.vue
@@ -1,5 +1,5 @@
+
+
+ (deviceProductionsOptions = data)"
+ />
+ setCurrentPDA(data[0])"
+ />
+
+ setCurrentPDA(data)"
+ >
+
+
+
+
+ {{ currentPDA.description }}
+
+
+
+
+
+ {{ t('worker.pda.removePDA') }}
+
+
+
+
+
+
+
+
+
+ ID: {{ scope.opt?.id }}
+
+ {{ scope.opt?.modelFk }},
+ {{ scope.opt?.serialNumber }}
+
+
+
+
+
+
+
+
+
+
+
+es:
+ PDA deallocated: PDA desasignada
+
diff --git a/src/router/modules/Supplier.js b/src/router/modules/Supplier.js
index d341ddc25..379a2c2c2 100644
--- a/src/router/modules/Supplier.js
+++ b/src/router/modules/Supplier.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'suppliers',
icon: 'vn:supplier',
+ moduleName: 'Supplier',
},
component: RouterView,
redirect: { name: 'SupplierMain' },
diff --git a/src/router/modules/claim.js b/src/router/modules/claim.js
index 67313cd44..65c714418 100644
--- a/src/router/modules/claim.js
+++ b/src/router/modules/claim.js
@@ -6,15 +6,15 @@ export default {
meta: {
title: 'claims',
icon: 'vn:claims',
+ moduleName: 'Claim',
},
component: RouterView,
redirect: { name: 'ClaimMain' },
menus: {
- main: ['ClaimList', 'ClaimRmaList'],
+ main: ['ClaimList'],
card: [
'ClaimBasicData',
'ClaimLines',
- 'ClaimRma',
'ClaimPhotos',
'ClaimNotes',
'ClaimDevelopment',
@@ -38,16 +38,6 @@ export default {
},
component: () => import('src/pages/Claim/ClaimList.vue'),
},
- {
- name: 'ClaimRmaList',
- path: 'rma',
- meta: {
- title: 'rmaList',
- icon: 'vn:barcode',
- roles: ['claimManager'],
- },
- component: () => import('src/pages/Claim/ClaimRmaList.vue'),
- },
],
},
{
@@ -84,16 +74,6 @@ export default {
},
component: () => import('src/pages/Claim/Card/ClaimLines.vue'),
},
- {
- name: 'ClaimRma',
- path: 'rma',
- meta: {
- title: 'rma',
- icon: 'vn:barcode',
- roles: ['claimManager'],
- },
- component: () => import('src/pages/Claim/Card/ClaimRma.vue'),
- },
{
name: 'ClaimPhotos',
path: 'photos',
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index 716b0fa6c..75188bd32 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'customers',
icon: 'vn:client',
+ moduleName: 'Customer',
},
component: RouterView,
redirect: { name: 'CustomerMain' },
diff --git a/src/router/modules/entry.js b/src/router/modules/entry.js
index 2f6c8cb4c..50a651af5 100644
--- a/src/router/modules/entry.js
+++ b/src/router/modules/entry.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'entries',
icon: 'vn:entry',
+ moduleName: 'Entry',
},
component: RouterView,
redirect: { name: 'EntryMain' },
diff --git a/src/router/modules/index.js b/src/router/modules/index.js
index 84a26798d..076605f24 100644
--- a/src/router/modules/index.js
+++ b/src/router/modules/index.js
@@ -13,6 +13,7 @@ import Travel from './travel';
import Order from './order';
import Department from './department';
import Entry from './entry';
+import roadmap from "./roadmap";
export default [
Item,
@@ -30,4 +31,5 @@ export default [
invoiceIn,
Department,
Entry,
+ roadmap
];
diff --git a/src/router/modules/invoiceIn.js b/src/router/modules/invoiceIn.js
index 01ed37036..869a3555a 100644
--- a/src/router/modules/invoiceIn.js
+++ b/src/router/modules/invoiceIn.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'invoiceIns',
icon: 'vn:invoice-in',
+ moduleName: 'InvoiceIn',
},
component: RouterView,
redirect: { name: 'InvoiceInMain' },
diff --git a/src/router/modules/invoiceOut.js b/src/router/modules/invoiceOut.js
index 084cf6ac3..386e04ed8 100644
--- a/src/router/modules/invoiceOut.js
+++ b/src/router/modules/invoiceOut.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'invoiceOuts',
icon: 'vn:invoice-out',
+ moduleName: 'InvoiceOut',
},
component: RouterView,
redirect: { name: 'InvoiceOutMain' },
diff --git a/src/router/modules/order.js b/src/router/modules/order.js
index 4599394cd..16d73281b 100644
--- a/src/router/modules/order.js
+++ b/src/router/modules/order.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'order',
icon: 'vn:basket',
+ moduleName: 'Order',
},
component: RouterView,
redirect: { name: 'OrderMain' },
diff --git a/src/router/modules/roadmap.js b/src/router/modules/roadmap.js
new file mode 100644
index 000000000..02edf94be
--- /dev/null
+++ b/src/router/modules/roadmap.js
@@ -0,0 +1,52 @@
+import { RouterView } from 'vue-router';
+
+export default {
+ path: '/route/roadmap',
+ name: 'Roadmap',
+ meta: {
+ title: 'roadmap',
+ icon: 'vn:troncales',
+ },
+ component: RouterView,
+ redirect: { name: 'RouteMain' },
+ menus: {
+ card: ['RoadmapBasicData', 'RoadmapStops'],
+ },
+ children: [
+ {
+ name: 'RouteRoadmapCard',
+ path: ':id',
+ component: () => import('src/pages/Route/Roadmap/RoadmapCard.vue'),
+ redirect: { name: 'RoadmapSummary' },
+ children: [
+ {
+ name: 'RoadmapSummary',
+ path: 'summary',
+ meta: {
+ title: 'summary',
+ icon: 'open_in_new',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapSummary.vue'),
+ },
+ {
+ name: 'RoadmapBasicData',
+ path: 'basic-data',
+ meta: {
+ title: 'basicData',
+ icon: 'vn:settings',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapBasicData.vue'),
+ },
+ {
+ name: 'RoadmapStops',
+ path: 'stops',
+ meta: {
+ title: 'stops',
+ icon: 'vn:lines',
+ },
+ component: () => import('pages/Route/Roadmap/RoadmapStops.vue'),
+ },
+ ],
+ },
+ ],
+};
diff --git a/src/router/modules/route.js b/src/router/modules/route.js
index 614345913..099492981 100644
--- a/src/router/modules/route.js
+++ b/src/router/modules/route.js
@@ -6,12 +6,13 @@ export default {
meta: {
title: 'routes',
icon: 'vn:delivery',
+ moduleName: 'Route',
},
component: RouterView,
redirect: { name: 'RouteMain' },
menus: {
- main: ['RouteList', 'CmrList'],
- card: ['RouteBasicData'],
+ main: ['RouteList', 'RouteAutonomous', 'RouteRoadmap', 'CmrList'],
+ card: ['RouteBasicData', 'RouteTickets', 'RouteLog'],
},
children: [
{
@@ -20,15 +21,6 @@ export default {
component: () => import('src/pages/Route/RouteMain.vue'),
redirect: { name: 'RouteList' },
children: [
- {
- path: 'cmr',
- name: 'CmrList',
- meta: {
- title: 'cmrsList',
- icon: 'fact_check',
- },
- component: () => import('src/pages/Route/Cmr/CmrList.vue'),
- },
{
path: 'list',
name: 'RouteList',
@@ -46,6 +38,42 @@ export default {
},
component: () => import('src/pages/Route/Card/RouteForm.vue'),
},
+ {
+ path: 'agency-term',
+ name: 'RouteAutonomous',
+ meta: {
+ title: 'autonomous',
+ icon: 'vn:agency-term',
+ },
+ component: () => import('src/pages/Route/RouteAutonomous.vue'),
+ },
+ {
+ path: 'roadmap',
+ name: 'RouteRoadmap',
+ meta: {
+ title: 'RouteRoadmap',
+ icon: 'vn:troncales',
+ },
+ component: () => import('src/pages/Route/RouteRoadmap.vue'),
+ },
+ {
+ path: 'roadmap/create',
+ name: 'RouteRoadmapCreate',
+ meta: {
+ title: 'RouteRoadmapCreate',
+ icon: 'vn:troncales',
+ },
+ component: () => import('src/pages/Route/Roadmap/RoadmapCreate.vue'),
+ },
+ {
+ path: 'cmr',
+ name: 'CmrList',
+ meta: {
+ title: 'cmrsList',
+ icon: 'fact_check',
+ },
+ component: () => import('src/pages/Route/Cmr/CmrList.vue'),
+ },
],
},
{
@@ -72,6 +100,24 @@ export default {
},
component: () => import('pages/Route/Card/RouteSummary.vue'),
},
+ {
+ path: 'tickets',
+ name: 'RouteTickets',
+ meta: {
+ title: 'tickets',
+ icon: 'vn:ticket',
+ },
+ component: () => import('src/pages/Route/RouteTickets.vue'),
+ },
+ {
+ path: 'log',
+ name: 'RouteLog',
+ meta: {
+ title: 'log',
+ icon: 'vn:History',
+ },
+ component: () => import('src/pages/Route/RouteLog.vue'),
+ },
],
},
],
diff --git a/src/router/modules/shelving.js b/src/router/modules/shelving.js
index 494f286c3..d32c7d9f3 100644
--- a/src/router/modules/shelving.js
+++ b/src/router/modules/shelving.js
@@ -1,17 +1,18 @@
-import {RouterView} from "vue-router";
+import { RouterView } from 'vue-router';
export default {
path: '/shelving',
name: 'Shelving',
meta: {
title: 'shelving',
- icon: 'vn:inventory'
+ icon: 'vn:inventory',
+ moduleName: 'Shelving',
},
component: RouterView,
redirect: { name: 'ShelvingMain' },
menus: {
main: ['ShelvingList'],
- card: ['ShelvingBasicData', 'ShelvingLog']
+ card: ['ShelvingBasicData', 'ShelvingLog'],
},
children: [
{
@@ -51,8 +52,7 @@ export default {
meta: {
title: 'summary',
},
- component: () =>
- import('pages/Shelving/Card/ShelvingSummary.vue'),
+ component: () => import('pages/Shelving/Card/ShelvingSummary.vue'),
},
{
name: 'ShelvingBasicData',
@@ -75,6 +75,5 @@ export default {
},
],
},
- ]
+ ],
};
-
diff --git a/src/router/modules/ticket.js b/src/router/modules/ticket.js
index 73c441b4d..d6b714154 100644
--- a/src/router/modules/ticket.js
+++ b/src/router/modules/ticket.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'tickets',
icon: 'vn:ticket',
+ moduleName: 'Ticket',
},
component: RouterView,
redirect: { name: 'TicketMain' },
diff --git a/src/router/modules/travel.js b/src/router/modules/travel.js
index 792b393e4..2f1e2150e 100644
--- a/src/router/modules/travel.js
+++ b/src/router/modules/travel.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'travel',
icon: 'local_airport',
+ moduleName: 'Travel',
},
component: RouterView,
redirect: { name: 'TravelMain' },
diff --git a/src/router/modules/wagon.js b/src/router/modules/wagon.js
index 238e482dd..6f9a4c819 100644
--- a/src/router/modules/wagon.js
+++ b/src/router/modules/wagon.js
@@ -6,6 +6,7 @@ export default {
meta: {
title: 'wagons',
icon: 'vn:trolley',
+ moduleName: 'Wagon',
},
component: RouterView,
redirect: { name: 'WagonMain' },
diff --git a/src/router/modules/worker.js b/src/router/modules/worker.js
index 27a6f19a9..1c722afe8 100644
--- a/src/router/modules/worker.js
+++ b/src/router/modules/worker.js
@@ -6,12 +6,13 @@ export default {
meta: {
title: 'workers',
icon: 'vn:worker',
+ moduleName: 'Worker',
},
component: RouterView,
redirect: { name: 'WorkerMain' },
menus: {
main: ['WorkerList', 'WorkerDepartment'],
- card: ['WorkerNotificationsManager'],
+ card: ['WorkerNotificationsManager', 'WorkerPda'],
departmentCard: ['BasicData'],
},
children: [
@@ -75,6 +76,15 @@ export default {
component: () =>
import('src/pages/Worker/Card/WorkerNotificationsManager.vue'),
},
+ {
+ name: 'WorkerPda',
+ path: 'pda',
+ meta: {
+ title: 'pda',
+ icon: 'phone_android',
+ },
+ component: () => import('src/pages/Worker/Card/WorkerPda.vue'),
+ },
],
},
],
diff --git a/src/router/routes.js b/src/router/routes.js
index d1027955f..32f43965f 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -13,6 +13,7 @@ import department from './modules/department';
import shelving from 'src/router/modules/shelving';
import order from 'src/router/modules/order';
import entry from 'src/router/modules/entry';
+import roadmap from "src/router/modules/roadmap";
const routes = [
{
@@ -66,6 +67,7 @@ const routes = [
supplier,
travel,
department,
+ roadmap,
entry,
{
path: '/:catchAll(.*)*',
diff --git a/src/utils/buscaman.js b/src/utils/buscaman.js
new file mode 100644
index 000000000..0778a21e8
--- /dev/null
+++ b/src/utils/buscaman.js
@@ -0,0 +1,22 @@
+import axios from 'axios';
+
+const BUSCAMAN_URL = 'https://gps.buscalia.com/usuario/localizar.aspx?bmi=true&addr=';
+
+export async function openBuscaman(vehicleId, tickets) {
+ if (!vehicleId) throw new Error(`The route doesn't have a vehicle`);
+
+ const response = await axios.get(`Routes/${vehicleId}/getDeliveryPoint`);
+
+ if (!response.data) {
+ throw new Error(`The route's vehicle doesn't have a delivery point`);
+ }
+
+ let addresses = response.data;
+ tickets.forEach((ticket, index) => {
+ const previousLine = tickets[index - 1] ? tickets[index - 1].street : null;
+ if (previousLine !== tickets.street) {
+ addresses += `+to:${ticket.postalCode} ${ticket.city} ${ticket.street}`;
+ }
+ });
+ window.open(BUSCAMAN_URL + encodeURI(addresses), '_blank');
+}
diff --git a/test/vitest/__tests__/composables/useSession.spec.js b/test/vitest/__tests__/composables/useSession.spec.js
index 4f900aca6..f9f3dcb80 100644
--- a/test/vitest/__tests__/composables/useSession.spec.js
+++ b/test/vitest/__tests__/composables/useSession.spec.js
@@ -54,7 +54,8 @@ describe('session', () => {
expect(localStorage.getItem('token')).toEqual('tokenToBeGone');
expect(user.value).toEqual(previousUser);
- session.destroy();
+ vi.spyOn(axios, 'post').mockResolvedValue({ data: true });
+ await session.destroy();
user = state.getUser();
expect(localStorage.getItem('token')).toBeNull();
@@ -92,9 +93,10 @@ describe('session', () => {
});
const expectedToken = 'mySessionToken';
+ const expectedTokenMultimedia = 'mySessionTokenMultimedia';
const keepLogin = false;
- await session.login(expectedToken, keepLogin);
+ await session.login(expectedToken,expectedTokenMultimedia, keepLogin);
const roles = state.getRoles();
const localToken = localStorage.getItem('token');
@@ -104,7 +106,7 @@ describe('session', () => {
expect(localToken).toBeNull();
expect(sessionToken).toEqual(expectedToken);
- session.destroy(); // this clears token and user for any other test
+ await session.destroy(); // this clears token and user for any other test
});
it('should fetch the user roles and then set token in the localStorage', async () => {
@@ -114,9 +116,10 @@ describe('session', () => {
});
const expectedToken = 'myLocalToken';
+ const expectedTokenMultimedia = 'myLocalTokenMultimedia';
const keepLogin = true;
- await session.login(expectedToken, keepLogin);
+ await session.login(expectedToken, expectedTokenMultimedia, keepLogin);
const roles = state.getRoles();
const localToken = localStorage.getItem('token');
@@ -126,7 +129,7 @@ describe('session', () => {
expect(localToken).toEqual(expectedToken);
expect(sessionToken).toBeNull();
- session.destroy(); // this clears token and user for any other test
+ await session.destroy(); // this clears token and user for any other test
});
});
});
diff --git a/test/vitest/__tests__/pages/Login/Login.spec.js b/test/vitest/__tests__/pages/Login/Login.spec.js
index fadfc898f..6e2de9870 100644
--- a/test/vitest/__tests__/pages/Login/Login.spec.js
+++ b/test/vitest/__tests__/pages/Login/Login.spec.js
@@ -22,9 +22,9 @@ describe('Login', () => {
darkMode: false,
},
};
- vi.spyOn(axios, 'post').mockResolvedValue({ data: { token: 'token' } });
+ vi.spyOn(axios, 'post').mockResolvedValueOnce({ data: { token: 'token' } });
vi.spyOn(axios, 'get').mockResolvedValue({
- data: { roles: [], user: expectedUser },
+ data: { roles: [], user: expectedUser , multimediaToken: {id:'multimediaToken' }},
});
vi.spyOn(vm.quasar, 'notify');
@@ -36,7 +36,7 @@ describe('Login', () => {
expect(vm.quasar.notify).toHaveBeenCalledWith(
expect.objectContaining({ type: 'positive' })
);
- vm.session.destroy();
+ await vm.session.destroy();
});
it('should not set the token into session if any error occurred', async () => {