@@ -515,7 +515,7 @@ onMounted(async () => {
@click-date="onInputChange"
@on-moved="getMailStates"
/>
-
+
diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue
index 59049a5b3..02ec12fe7 100644
--- a/src/pages/Zone/Card/ZoneCard.vue
+++ b/src/pages/Zone/Card/ZoneCard.vue
@@ -28,11 +28,12 @@ const searchBarDataKeys = {
data-key="Zone"
:descriptor="ZoneDescriptor"
:search-data-key="searchBarDataKeys[routeName]"
- :search-custom-route-redirect="customRouteRedirectName"
- :search-redirect="!!customRouteRedirectName"
- :search-make-fetch="searchbarMakeFetch"
- :searchbar-label="t('list.searchZone')"
- :searchbar-info="t('list.searchInfo')"
+ :filter-panel="ZoneFilterPanel"
+ :searchbar-props="{
+ url: 'Zones',
+ label: t('list.searchZone'),
+ info: t('list.searchInfo'),
+ }"
>
diff --git a/src/router/modules/customer.js b/src/router/modules/customer.js
index d9d047433..684b83b0f 100644
--- a/src/router/modules/customer.js
+++ b/src/router/modules/customer.js
@@ -187,87 +187,32 @@ export default {
},
{
path: 'notes',
- name: 'CustomerNotesCard',
- redirect: { name: 'CustomerNotes' },
- children: [
- {
- path: '',
- name: 'CustomerNotes',
- meta: {
- title: 'notes',
- icon: 'vn:notes',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerNotes.vue'),
- },
- {
- path: 'create',
- name: 'CustomerNoteCreate',
- meta: {
- title: 'note-create',
- },
- component: () =>
- import(
- 'src/pages/Customer/components/CustomerNoteCreate.vue'
- ),
- },
- ],
+ name: 'CustomerNotes',
+ meta: {
+ title: 'notes',
+ icon: 'vn:notes',
+ },
+ component: () => import('src/pages/Customer/Card/CustomerNotes.vue'),
},
{
path: 'credits',
- name: 'CreditsCard',
- redirect: { name: 'CustomerCredits' },
- children: [
- {
- path: '',
- name: 'CustomerCredits',
- meta: {
- title: 'credits',
- icon: 'vn:credit',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerCredits.vue'),
- },
- {
- path: 'create',
- name: 'CustomerCreditCreate',
- meta: {
- title: 'credit-create',
- },
- component: () =>
- import(
- 'src/pages/Customer/components/CustomerCreditCreate.vue'
- ),
- },
- ],
+ name: 'CustomerCredits',
+ meta: {
+ title: 'credits',
+ icon: 'vn:credit',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerCredits.vue'),
},
{
path: 'greuges',
- name: 'GreugesCard',
- redirect: { name: 'CustomerGreuges' },
- children: [
- {
- path: '',
- name: 'CustomerGreuges',
- meta: {
- title: 'greuges',
- icon: 'vn:greuge',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerGreuges.vue'),
- },
- {
- path: 'create',
- name: 'CustomerGreugeCreate',
- meta: {
- title: 'greuge-create',
- },
- component: () =>
- import(
- 'src/pages/Customer/components/CustomerGreugeCreate.vue'
- ),
- },
- ],
+ name: 'CustomerGreuges',
+ meta: {
+ title: 'greuges',
+ icon: 'vn:greuge',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerGreuges.vue'),
},
{
path: 'balance',
@@ -281,31 +226,13 @@ export default {
},
{
path: 'recoveries',
- name: 'RecoveriesCard',
- redirect: { name: 'CustomerRecoveries' },
- children: [
- {
- path: '',
- name: 'CustomerRecoveries',
- meta: {
- title: 'recoveries',
- icon: 'vn:recovery',
- },
- component: () =>
- import('src/pages/Customer/Card/CustomerRecoveries.vue'),
- },
- {
- path: 'create',
- name: 'CustomerRecoverieCreate',
- meta: {
- title: 'recoverie-create',
- },
- component: () =>
- import(
- 'src/pages/Customer/components/CustomerRecoverieCreate.vue'
- ),
- },
- ],
+ name: 'CustomerRecoveries',
+ meta: {
+ title: 'recoveries',
+ icon: 'vn:recovery',
+ },
+ component: () =>
+ import('src/pages/Customer/Card/CustomerRecoveries.vue'),
},
{
path: 'web-access',
diff --git a/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js b/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
index a297a60f4..f6dac4c73 100644
--- a/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInIntrastat.spec.js
@@ -1,8 +1,9 @@
///
describe('InvoiceInIntrastat', () => {
- const inputBtns = 'label button';
+ const firstRow = 'tbody > :nth-child(1)';
const thirdRow = 'tbody > :nth-child(3)';
- const firstLineCode = 'tbody > :nth-child(1) > :nth-child(2)';
+ const firstRowCode = `${firstRow} > :nth-child(2)`;
+ const firstRowAmount = `${firstRow} > :nth-child(3)`;
beforeEach(() => {
cy.login('developer');
@@ -10,10 +11,10 @@ describe('InvoiceInIntrastat', () => {
});
it('should edit the first line', () => {
- cy.selectOption(firstLineCode, 'Plantas vivas: Esqueje/injerto, Vid');
- cy.get(inputBtns).eq(1).click();
+ cy.selectOption(firstRowCode, 'Plantas vivas: Esqueje/injerto, Vid');
+ cy.get(firstRowAmount).clear();
cy.saveCard();
- cy.get(`${firstLineCode} span`).should(
+ cy.get(`${firstRowCode} span`).should(
'have.text',
'6021010:Plantas vivas: Esqueje/injerto, Vid'
);
diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
index b2fa10d52..fa0d1c5e4 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -1,23 +1,23 @@
///
describe('InvoiceInList', () => {
- const firstCard = '.q-card:nth-child(1)';
- const firstChipId =
- ':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
- const firstDetailBtn = '.q-card:nth-child(1) .q-btn:nth-child(2)';
+ const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
+ const firstId = `${firstRow} > td:nth-child(1) span`;
+ const firstDetailBtn = `${firstRow} .q-btn:nth-child(1)`;
const summaryHeaders = '.summaryBody .header-link';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/invoice-in/list`);
+ cy.get('#searchbar input').type('{enter}');
});
it('should redirect on clicking a invoice', () => {
- cy.get(firstChipId)
+ cy.get(firstId)
.invoke('text')
.then((content) => {
const id = content.replace(/\D/g, '');
- cy.get(firstCard).click();
+ cy.get(firstRow).click();
cy.url().should('include', `/invoice-in/${id}/summary`);
});
});
diff --git a/test/cypress/integration/invoiceIn/invoiceInVat.spec.js b/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
index 932aca96d..018ae7a53 100644
--- a/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInVat.spec.js
@@ -4,8 +4,7 @@ describe('InvoiceInVat', () => {
const firstLineVat = 'tbody > :nth-child(1) > :nth-child(4)';
const dialogInputs = '.q-dialog label input';
const dialogBtns = '.q-dialog button';
- const acrossInput =
- ':nth-child(1) > .q-td.q-table--col-auto-width > .q-field > .q-field__inner > .q-field__control > :nth-child(2) > .default-icon';
+ const acrossInput = 'tbody tr:nth-child(1) td:nth-child(2) .default-icon';
const randomInt = Math.floor(Math.random() * 100);
beforeEach(() => {
diff --git a/test/cypress/integration/logout.spec.js b/test/cypress/integration/logout.spec.js
index b35a8415a..af705223b 100644
--- a/test/cypress/integration/logout.spec.js
+++ b/test/cypress/integration/logout.spec.js
@@ -7,9 +7,7 @@ describe('Logout', () => {
});
describe('by user', () => {
it('should logout', () => {
- cy.get(
- '#user > .q-btn__content > .q-avatar > .q-avatar__content > .q-img > .q-img__container > .q-img__image'
- ).click();
+ cy.get('#user').click();
cy.get('.block').click();
});
});
diff --git a/test/cypress/integration/worker/workerLocker.spec.js b/test/cypress/integration/worker/workerLocker.spec.js
index 9a4a19c7a..9a4066f54 100644
--- a/test/cypress/integration/worker/workerLocker.spec.js
+++ b/test/cypress/integration/worker/workerLocker.spec.js
@@ -2,7 +2,7 @@ describe('WorkerLocker', () => {
const workerId = 1109;
const lockerCode = '2F';
const input = '.q-card input';
- const thirdOpt = '[role="listbox"] .q-item:nth-child(3)';
+ const thirdOpt = '[role="listbox"] .q-item:nth-child(1)';
beforeEach(() => {
cy.viewport(1280, 720);
cy.login('productionBoss');
diff --git a/test/vitest/__tests__/pages/Login/Login.spec.js b/test/vitest/__tests__/pages/Login/Login.spec.js
index 9b9968736..5ab4cee9e 100644
--- a/test/vitest/__tests__/pages/Login/Login.spec.js
+++ b/test/vitest/__tests__/pages/Login/Login.spec.js
@@ -25,18 +25,20 @@ describe('Login', () => {
vi.spyOn(axios, 'post').mockResolvedValueOnce({ data: { token: 'token' } });
vi.spyOn(axios, 'get').mockImplementation((url) => {
if (url === 'VnUsers/acls') return Promise.resolve({ data: [] });
- return Promise.resolve({data: { roles: [], user: expectedUser , multimediaToken: {id:'multimediaToken' }}});
+ return Promise.resolve({
+ data: {
+ roles: [],
+ user: expectedUser,
+ multimediaToken: { id: 'multimediaToken' },
+ },
+ });
});
- vi.spyOn(vm.quasar, 'notify');
expect(vm.session.getToken()).toEqual('');
await vm.onSubmit();
expect(vm.session.getToken()).toEqual('token');
- expect(vm.quasar.notify).toHaveBeenCalledWith(
- expect.objectContaining({ type: 'positive' })
- );
await vm.session.destroy();
});