+
diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 9a60e9da138..9e46c54e36a 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -153,6 +153,7 @@ globals:
maxTemperature: Max
minTemperature: Min
changePass: Change password
+ setPass: Set password
deleteConfirmTitle: Delete selected elements
changeState: Change state
raid: 'Raid {daysInForward} days'
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 846c442ea51..fd42d37c79c 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -157,6 +157,7 @@ globals:
maxTemperature: Máx
minTemperature: Mín
changePass: Cambiar contraseña
+ setPass: Establecer contraseña
deleteConfirmTitle: Eliminar los elementos seleccionados
changeState: Cambiar estado
raid: 'Redada {daysInForward} días'
@@ -786,7 +787,7 @@ worker:
notes: Notas
operator:
numberOfWagons: Número de vagones
- train: tren
+ train: Tren
itemPackingType: Tipo de embalaje
warehouse: Almacén
sector: Sector
diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue
index 30584c61f46..eafd62df60b 100644
--- a/src/pages/Account/Card/AccountDescriptorMenu.vue
+++ b/src/pages/Account/Card/AccountDescriptorMenu.vue
@@ -25,12 +25,13 @@ const $props = defineProps({
const { t } = useI18n();
const { hasAccount } = toRefs($props);
const { openConfirmationModal } = useVnConfirm();
+const arrayData = useArrayData('Account');
const route = useRoute();
const router = useRouter();
const state = useState();
const user = state.getUser();
const { notify } = useQuasar();
-const account = computed(() => useArrayData('Account').store.data[0]);
+const account = computed(() => arrayData.store.data);
account.value.hasAccount = hasAccount.value;
const entityId = computed(() => +route.params.id);
const hasitManagementAccess = ref();
@@ -39,7 +40,7 @@ const isHimself = computed(() => user.value.id === account.value.id);
const url = computed(() =>
isHimself.value
? 'Accounts/change-password'
- : `Accounts/${entityId.value}/setPassword`
+ : `Accounts/${entityId.value}/setPassword`,
);
async function updateStatusAccount(active) {
@@ -153,6 +154,7 @@ onMounted(() => {
t('account.card.actions.disableAccount.title'),
t('account.card.actions.disableAccount.subtitle'),
() => deleteAccount(),
+ () => deleteAccount(),
)
"
>
@@ -172,6 +174,7 @@ onMounted(() => {
t('account.card.actions.enableAccount.title'),
t('account.card.actions.enableAccount.subtitle'),
() => updateStatusAccount(true),
+ () => updateStatusAccount(true),
)
"
>
@@ -186,6 +189,7 @@ onMounted(() => {
t('account.card.actions.disableAccount.title'),
t('account.card.actions.disableAccount.subtitle'),
() => updateStatusAccount(false),
+ () => updateStatusAccount(false),
)
"
>
@@ -201,6 +205,7 @@ onMounted(() => {
t('account.card.actions.activateUser.title'),
t('account.card.actions.activateUser.title'),
() => updateStatusUser(true),
+ () => updateStatusUser(true),
)
"
>
@@ -215,6 +220,7 @@ onMounted(() => {
t('account.card.actions.deactivateUser.title'),
t('account.card.actions.deactivateUser.title'),
() => updateStatusUser(false),
+ () => updateStatusUser(false),
)
"
>
diff --git a/src/pages/Entry/Card/EntryBuys.vue b/src/pages/Entry/Card/EntryBuys.vue
index 81578c609e1..67333b5bdb2 100644
--- a/src/pages/Entry/Card/EntryBuys.vue
+++ b/src/pages/Entry/Card/EntryBuys.vue
@@ -639,7 +639,7 @@ onMounted(() => {
'flex-wrap': 'wrap',
gap: '16px',
position: 'relative',
- height: '450px',
+ height: '500px',
},
columnGridStyle: {
'max-width': '50%',
@@ -650,7 +650,7 @@ onMounted(() => {
:is-editable="editableMode"
:without-header="!editableMode"
:with-filters="editableMode"
- :right-search="true"
+ :right-search="editableMode"
:right-search-icon="true"
:row-click="false"
:columns="columns"
diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue
index 3c96a230286..a9cf2a5e2e2 100644
--- a/src/pages/Entry/EntryList.vue
+++ b/src/pages/Entry/EntryList.vue
@@ -274,7 +274,7 @@ onBeforeMount(async () => {
:array-data-props="{
url: 'Entries/filter',
order: 'landed DESC',
- userFilter: EntryFilter,
+ userFilter: entryQueryFilter,
}"
>
diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue
index f32dcd0d9a2..a7e192765c1 100644
--- a/src/pages/Route/RouteExtendedList.vue
+++ b/src/pages/Route/RouteExtendedList.vue
@@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import { useQuasar } from 'quasar';
-import { dashIfEmpty, toDate, toHour } from 'src/filters';
+import { toDate, toHour } from 'src/filters';
import { useRouter } from 'vue-router';
import { usePrintService } from 'src/composables/usePrintService';
diff --git a/src/pages/Shelving/Parking/Card/ParkingSummary.vue b/src/pages/Shelving/Parking/Card/ParkingSummary.vue
index 95620ebfd75..7188ebeb61f 100644
--- a/src/pages/Shelving/Parking/Card/ParkingSummary.vue
+++ b/src/pages/Shelving/Parking/Card/ParkingSummary.vue
@@ -45,8 +45,6 @@ const filter = {
:label="t('parking.sector')"
:value="entity.sector?.description"
/>
-
-
diff --git a/src/pages/Shelving/Parking/ParkingList.vue b/src/pages/Shelving/Parking/ParkingList.vue
index fe6c93ba538..7c5058a74c4 100644
--- a/src/pages/Shelving/Parking/ParkingList.vue
+++ b/src/pages/Shelving/Parking/ParkingList.vue
@@ -1,19 +1,15 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue
index fcf0f0369e2..56a9548c626 100644
--- a/src/pages/Worker/Card/WorkerBasicData.vue
+++ b/src/pages/Worker/Card/WorkerBasicData.vue
@@ -17,6 +17,12 @@ const maritalStatus = [
{ code: 'M', name: t('Married') },
{ code: 'S', name: t('Single') },
];
+async function setAdvancedSummary(data) {
+ const advanced = (await useAdvancedSummary('Workers', data.id)) ?? {};
+ Object.assign(form.value.formData, advanced);
+ await nextTick();
+ if (form.value) form.value.hasChanges = false;
+}
{
- Object.assign(data, (await useAdvancedSummary('Workers', data.id)) ?? {});
- await $nextTick();
- if (form) form.hasChanges = false;
- }
- "
+ @on-fetch="setAdvancedSummary"
>
-
-
+
+
diff --git a/src/pages/Worker/Card/WorkerDescriptorProxy.vue b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
index a142570f9ca..5f71abbead8 100644
--- a/src/pages/Worker/Card/WorkerDescriptorProxy.vue
+++ b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
@@ -12,6 +12,11 @@ const $props = defineProps({
-
+
diff --git a/src/pages/Worker/Card/WorkerOperator.vue b/src/pages/Worker/Card/WorkerOperator.vue
index 6faeefe6704..8ab802b9f29 100644
--- a/src/pages/Worker/Card/WorkerOperator.vue
+++ b/src/pages/Worker/Card/WorkerOperator.vue
@@ -54,9 +54,8 @@ watch(
selected.value = [];
}
},
- { immediate: true, deep: true }
+ { immediate: true, deep: true },
);
-
@@ -105,6 +104,7 @@ watch(
:options="trainsData"
hide-selected
v-model="row.trainFk"
+ :required="true"
/>
@@ -115,12 +115,14 @@ watch(
option-label="code"
option-value="code"
v-model="row.itemPackingTypeFk"
+ :required="true"
/>
@@ -175,6 +177,7 @@ watch(
:label="t('worker.operator.isOnReservationMode')"
v-model="row.isOnReservationMode"
lazy-rules
+ :required="true"
/>
diff --git a/src/pages/Worker/Card/WorkerPBX.vue b/src/pages/Worker/Card/WorkerPBX.vue
index 12f2a4b2376..dae1984388c 100644
--- a/src/pages/Worker/Card/WorkerPBX.vue
+++ b/src/pages/Worker/Card/WorkerPBX.vue
@@ -1,8 +1,8 @@
-src/pages/Worker/Card/WorkerPBX.vue
-
@@ -26,3 +26,8 @@ import VnInput from 'src/components/common/VnInput.vue';
+
+
+ es:
+ It must be a 4-digit number and must not end in 00: Debe ser un número de 4 cifras y no terminar en 00
+
diff --git a/src/pages/Worker/Card/WorkerPda.vue b/src/pages/Worker/Card/WorkerPda.vue
index 47e13cf6d53..d329414946c 100644
--- a/src/pages/Worker/Card/WorkerPda.vue
+++ b/src/pages/Worker/Card/WorkerPda.vue
@@ -140,6 +140,7 @@ function reloadData() {
id="deviceProductionFk"
hide-selected
data-cy="pda-dialog-select"
+ :required="true"
>
diff --git a/src/pages/Worker/WorkerDepartment.vue b/src/pages/Worker/WorkerDepartment.vue
index baf6db15431..e1411250b74 100644
--- a/src/pages/Worker/WorkerDepartment.vue
+++ b/src/pages/Worker/WorkerDepartment.vue
@@ -1,16 +1,9 @@
-
-
-
-
-
-
-
+
diff --git a/test/cypress/integration/account/accountDescriptorMenu.spec.js b/test/cypress/integration/account/accountDescriptorMenu.spec.js
new file mode 100644
index 00000000000..67a7d8ef66d
--- /dev/null
+++ b/test/cypress/integration/account/accountDescriptorMenu.spec.js
@@ -0,0 +1,24 @@
+describe('ClaimNotes', () => {
+ const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
+ const url = '/#/account/1/summary';
+
+ it('should see all the account options', () => {
+ cy.login('itManagement');
+ cy.visit(url);
+ cy.dataCy('descriptor-more-opts').click();
+ cy.get(descriptorOptions)
+ .find('.q-item')
+ .its('length')
+ .then((count) => {
+ cy.log('Número de opciones:', count);
+ expect(count).to.equal(5);
+ });
+ });
+
+ it('should not see any option', () => {
+ cy.login('salesPerson');
+ cy.visit(url);
+ cy.dataCy('descriptor-more-opts').click();
+ cy.get(descriptorOptions).should('not.be.visible');
+ });
+});
diff --git a/test/cypress/integration/claim/claimDevelopment.spec.js b/test/cypress/integration/claim/claimDevelopment.spec.js
index df9d09a49db..7ca6472af13 100755
--- a/test/cypress/integration/claim/claimDevelopment.spec.js
+++ b/test/cypress/integration/claim/claimDevelopment.spec.js
@@ -35,8 +35,7 @@ describe('ClaimDevelopment', () => {
cy.saveCard();
});
- // TODO: #8112
- xit('should add and remove new line', () => {
+ it('should add and remove new line', () => {
cy.wait(['@workers', '@workers']);
cy.addCard();
diff --git a/test/cypress/integration/claim/claimNotes.spec.js b/test/cypress/integration/claim/claimNotes.spec.js
index 576671a3839..fa4a214a14d 100644
--- a/test/cypress/integration/claim/claimNotes.spec.js
+++ b/test/cypress/integration/claim/claimNotes.spec.js
@@ -8,10 +8,7 @@ describe('ClaimNotes', () => {
it('should add a new note', () => {
const message = 'This is a new message.';
- cy.get('.q-textarea')
- .should('be.visible')
- .should('not.be.disabled')
- .type(message);
+ cy.get('.q-textarea').should('not.be.disabled').type(message);
cy.get(saveBtn).click();
cy.get(firstNote).should('have.text', message);
diff --git a/test/cypress/integration/claim/claimPhoto.spec.js b/test/cypress/integration/claim/claimPhoto.spec.js
index 2d33e66c1e6..c3522cbfed1 100755
--- a/test/cypress/integration/claim/claimPhoto.spec.js
+++ b/test/cypress/integration/claim/claimPhoto.spec.js
@@ -25,33 +25,33 @@ describe.skip('ClaimPhoto', () => {
it('should open first image dialog change to second and close', () => {
cy.get(':nth-last-child(1) > .q-card').click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
- 'be.visible'
+ 'be.visible',
);
cy.get('.q-carousel__control > button').click();
cy.get(
- '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon'
+ '.q-dialog__inner > .q-toolbar > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get('.q-carousel__slide > .q-img > .q-img__container > .q-img__image').should(
- 'not.be.visible'
+ 'not.be.visible',
);
});
it('should remove third and fourth file', () => {
cy.get(
- '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon'
+ '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get(
- '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
+ '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click();
cy.get('.q-notification__message').should('have.text', 'Data deleted');
cy.get(
- '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon'
+ '.multimediaParent > :nth-last-child(1) > .q-btn > .q-btn__content > .q-icon',
).click();
cy.get(
- '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
+ '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click();
cy.get('.q-notification__message').should('have.text', 'Data deleted');
});
diff --git a/test/cypress/integration/client/clientAddress.spec.js b/test/cypress/integration/client/clientAddress.spec.js
index 434180047eb..8673c908390 100644
--- a/test/cypress/integration/client/clientAddress.spec.js
+++ b/test/cypress/integration/client/clientAddress.spec.js
@@ -4,7 +4,6 @@ describe('Client consignee', () => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/customer/1107/address');
- cy.domContentLoad();
});
it('Should load layout', () => {
cy.get('.q-card').should('be.visible');
diff --git a/test/cypress/integration/client/clientFiscalData.spec.js b/test/cypress/integration/client/clientFiscalData.spec.js
index d189f896aec..58d2d956f03 100644
--- a/test/cypress/integration/client/clientFiscalData.spec.js
+++ b/test/cypress/integration/client/clientFiscalData.spec.js
@@ -4,7 +4,6 @@ describe('Client fiscal data', () => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('#/customer/1107/fiscal-data');
- cy.domContentLoad();
});
it('Should change required value when change customer', () => {
cy.get('.q-card').should('be.visible');
diff --git a/test/cypress/integration/client/clientList.spec.js b/test/cypress/integration/client/clientList.spec.js
index f2e3671baae..f83d2927892 100644
--- a/test/cypress/integration/client/clientList.spec.js
+++ b/test/cypress/integration/client/clientList.spec.js
@@ -1,7 +1,6 @@
///
describe('Client list', () => {
beforeEach(() => {
- cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/customer/list', {
timeout: 5000,
@@ -28,7 +27,7 @@ describe('Client list', () => {
Email: { val: `user.test${randomInt}@cypress.com` },
'Sales person': { val: 'salesPerson', type: 'select' },
Location: { val: '46000', type: 'select' },
- 'Business type': { val: 'Otros', type: 'select' },
+ 'Business type': { val: 'others', type: 'select' },
};
cy.fillInForm(data);
@@ -37,6 +36,7 @@ describe('Client list', () => {
cy.checkNotification('Data created');
cy.url().should('include', '/summary');
});
+
it('Client list search client', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
@@ -59,6 +59,7 @@ describe('Client list', () => {
cy.checkValueForm(1, search);
cy.checkValueForm(2, search);
});
+
it('Client founded create order', () => {
const search = 'Jessica Jones';
cy.searchByLabel('Name', search);
diff --git a/test/cypress/integration/invoiceIn/invoiceInList.spec.js b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
index 4e2b8f9cca5..d9ab3f7e790 100644
--- a/test/cypress/integration/invoiceIn/invoiceInList.spec.js
+++ b/test/cypress/integration/invoiceIn/invoiceInList.spec.js
@@ -9,7 +9,7 @@ describe('InvoiceInList', () => {
cy.viewport(1920, 1080);
cy.login('developer');
cy.visit(`/#/invoice-in/list`);
- cy.get('#searchbar input').should('be.visible').type('{enter}');
+ cy.get('#searchbar input').type('{enter}');
});
it('should redirect on clicking a invoice', () => {
@@ -21,7 +21,7 @@ describe('InvoiceInList', () => {
cy.url().should('include', `/invoice-in/${id}/summary`);
});
});
- // https://redmine.verdnatura.es/issues/8420
+
it('should open the details', () => {
cy.get(firstDetailBtn).click();
cy.get(summaryHeaders).eq(1).contains('Basic data');
diff --git a/test/cypress/integration/item/ItemFixedPrice.spec.js b/test/cypress/integration/item/ItemFixedPrice.spec.js
index edb6a63fee9..2cf9c2cafad 100644
--- a/test/cypress/integration/item/ItemFixedPrice.spec.js
+++ b/test/cypress/integration/item/ItemFixedPrice.spec.js
@@ -11,7 +11,7 @@ describe('Handle Items FixedPrice', () => {
cy.visit('/#/item/fixed-price', { timeout: 5000 });
cy.waitForElement('.q-table');
cy.get(
- '.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon'
+ '.q-header > .q-toolbar > :nth-child(1) > .q-btn__content > .q-icon',
).click();
});
it.skip('filter', function () {
@@ -38,7 +38,7 @@ describe('Handle Items FixedPrice', () => {
cy.get('.q-gutter-x-sm > .q-btn > .q-btn__content > .q-icon').click();
cy.get(`${firstRow} > .text-right > .q-btn > .q-btn__content > .q-icon`).click();
cy.get(
- '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
+ '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click();
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
@@ -56,7 +56,7 @@ describe('Handle Items FixedPrice', () => {
cy.get(' .bg-header > :nth-child(1) > .q-checkbox > .q-checkbox__inner ').click();
cy.get('#subToolbar > .q-btn--flat').click();
cy.get(
- '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
+ '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block',
).click();
cy.get('.q-notification__message').should('have.text', 'Data saved');
});
diff --git a/test/cypress/integration/item/itemList.spec.js b/test/cypress/integration/item/itemList.spec.js
index 97e85a2120c..f0c744f2148 100644
--- a/test/cypress/integration/item/itemList.spec.js
+++ b/test/cypress/integration/item/itemList.spec.js
@@ -15,6 +15,7 @@ describe('Item list', () => {
cy.get('.q-menu .q-item').contains('Anthurium').click();
cy.get('.q-virtual-scroll__content > :nth-child(4) > :nth-child(4)').click();
});
+
// https://redmine.verdnatura.es/issues/8421
it.skip('should create an item', () => {
const data = {
@@ -28,7 +29,7 @@ describe('Item list', () => {
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created');
cy.get(
- ':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content'
+ ':nth-child(2) > .q-drawer > .q-drawer__content > .q-scrollarea > .q-scrollarea__container > .q-scrollarea__content',
).should('be.visible');
});
});
diff --git a/test/cypress/integration/parking/parkingBasicData.spec.js b/test/cypress/integration/parking/parkingBasicData.spec.js
deleted file mode 100644
index f64f23ec83e..00000000000
--- a/test/cypress/integration/parking/parkingBasicData.spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-///
-describe('ParkingBasicData', () => {
- const codeInput = 'form .q-card .q-input input';
- const sectorSelect = 'form .q-card .q-select input';
- const sectorOpt = '.q-menu .q-item';
- beforeEach(() => {
- cy.login('developer');
- cy.visit(`/#/shelving/parking/1/basic-data`);
- });
-
- it('should edit the code and sector', () => {
- cy.get(sectorSelect).type('Second');
- cy.get(sectorOpt).click();
-
- cy.get(codeInput).eq(0).clear();
- cy.get(codeInput).eq(0).type('900-001');
-
- cy.saveCard();
-
- cy.get(sectorSelect).should('have.value', 'Second sector');
- cy.get(codeInput).should('have.value', '900-001');
- });
-});
diff --git a/test/cypress/integration/parking/parkingList.spec.js b/test/cypress/integration/parking/parkingList.spec.js
deleted file mode 100644
index 8b7152ca43a..00000000000
--- a/test/cypress/integration/parking/parkingList.spec.js
+++ /dev/null
@@ -1,33 +0,0 @@
-///
-describe('ParkingList', () => {
- const searchbar = '#searchbar input';
- 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 =
- ':nth-child(1) > :nth-child(1) > .card-list-body > .actions > .q-btn';
- const summaryHeader = '.summaryBody .header';
-
- beforeEach(() => {
- cy.viewport(1920, 1080);
- cy.login('developer');
- cy.visit(`/#/shelving/parking/list`);
- });
-
- it('should redirect on clicking a parking', () => {
- cy.get(searchbar).type('{enter}');
- cy.get(firstChipId)
- .invoke('text')
- .then((content) => {
- const id = content.substring(4);
- cy.get(firstCard).click();
- cy.url().should('include', `/parking/${id}/summary`);
- });
- });
-
- it('should open the details', () => {
- cy.get(searchbar).type('{enter}');
- cy.get(firstDetailBtn).click();
- cy.get(summaryHeader).contains('Basic data');
- });
-});
diff --git a/test/cypress/integration/shelving/parking/parkingBasicData.spec.js b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js
new file mode 100644
index 00000000000..e28d7eecab8
--- /dev/null
+++ b/test/cypress/integration/shelving/parking/parkingBasicData.spec.js
@@ -0,0 +1,32 @@
+///
+describe('ParkingBasicData', () => {
+ const codeInput = 'form .q-card .q-input input';
+ const sectorSelect = 'form .q-card .q-select input';
+ const sectorOpt = '.q-menu .q-item';
+ beforeEach(() => {
+ cy.login('developer');
+ cy.visit(`/#/shelving/parking/1/basic-data`);
+ });
+
+ it('should give an error if the code aldready exists', () => {
+ cy.get(codeInput).eq(0).should('have.value', '700-01').clear();
+ cy.get(codeInput).eq(0).type('700-02');
+ cy.saveCard();
+ cy.get('.q-notification__message').should('have.text', 'The code already exists');
+ });
+
+ it('should edit the code and sector', () => {
+ cy.get(sectorSelect).type('First');
+ cy.get(sectorOpt).click();
+
+ cy.get(codeInput).eq(0).clear();
+ cy.get(codeInput).eq(0).type('700-01');
+ cy.dataCy('Picking order_input').clear().type(80230);
+
+ cy.saveCard();
+ cy.get('.q-notification__message').should('have.text', 'Data saved');
+ cy.get(sectorSelect).should('have.value', 'First sector');
+ cy.get(codeInput).should('have.value', '700-01');
+ cy.dataCy('Picking order_input').should('have.value', 80230);
+ });
+});
diff --git a/test/cypress/integration/shelving/parking/parkingList.spec.js b/test/cypress/integration/shelving/parking/parkingList.spec.js
new file mode 100644
index 00000000000..ecee8aab749
--- /dev/null
+++ b/test/cypress/integration/shelving/parking/parkingList.spec.js
@@ -0,0 +1,30 @@
+///
+describe('ParkingList', () => {
+ const searchbar = '#searchbar input';
+ const firstCard = ':nth-child(1) > .q-card > .no-margin > .q-py-none';
+ const summaryHeader = '.summaryBody .header';
+
+ beforeEach(() => {
+ cy.viewport(1920, 1080);
+ cy.login('developer');
+ cy.visit(`/#/shelving/parking/list`);
+ });
+
+ it('should redirect on clicking a parking', () => {
+ cy.get(searchbar).type('{enter}');
+ cy.get(firstCard).click();
+ cy.get(summaryHeader).contains('Basic data');
+ });
+
+ it('should filter and redirect if there is only one result', () => {
+ cy.dataCy('Code_input').type('1{enter}');
+ cy.dataCy('Sector_select').type('Normal{enter}');
+ cy.get(summaryHeader).contains('Basic data');
+ });
+
+ it('should filter and redirect to summary if only one result', () => {
+ cy.dataCy('Code_input').type('A{enter}');
+ cy.dataCy('Sector_select').type('First Sector{enter}');
+ cy.url().should('match', /\/shelving\/parking\/\d+\/summary/);
+ });
+});
diff --git a/test/cypress/integration/ticket/ticketDescriptor.spec.js b/test/cypress/integration/ticket/ticketDescriptor.spec.js
index cd9f288f5de..3fc2842d358 100644
--- a/test/cypress/integration/ticket/ticketDescriptor.spec.js
+++ b/test/cypress/integration/ticket/ticketDescriptor.spec.js
@@ -30,8 +30,6 @@ describe('Ticket descriptor', () => {
it('should set the weight of the ticket', () => {
cy.visit('/#/ticket/10/summary');
- cy.intercept('GET', /\/api\/Tickets\/\d/).as('ticket');
- cy.wait('@ticket');
cy.openActionsDescriptor();
cy.contains(listItem, setWeightOpt).click();
cy.intercept('POST', /\/api\/Tickets\/\d+\/setWeight/).as('weight');
diff --git a/test/cypress/integration/ticket/ticketExpedition.spec.js b/test/cypress/integration/ticket/ticketExpedition.spec.js
index d957f2136ec..6d7dc672124 100644
--- a/test/cypress/integration/ticket/ticketExpedition.spec.js
+++ b/test/cypress/integration/ticket/ticketExpedition.spec.js
@@ -1,6 +1,5 @@
///
-// https://redmine.verdnatura.es/issues/8423
-describe.skip('Ticket expedtion', () => {
+describe('Ticket expedtion', () => {
const tableContent = '.q-table .q-virtual-scroll__content';
const stateTd = 'td:nth-child(9)';
diff --git a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js
index 000c2151d32..63ab646fe4d 100644
--- a/test/cypress/integration/vnComponent/VnAccountNumber.spec.js
+++ b/test/cypress/integration/vnComponent/VnAccountNumber.spec.js
@@ -3,7 +3,6 @@ describe('VnInput Component', () => {
cy.login('developer');
cy.viewport(1920, 1080);
cy.visit('/#/supplier/1/fiscal-data');
- cy.domContentLoad();
});
it('should replace character at cursor position in insert mode', () => {
@@ -14,8 +13,7 @@ describe('VnInput Component', () => {
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
// Escribe un número y verifica que se reemplace correctamente
cy.dataCy('supplierFiscalDataAccount').type('999');
- cy.dataCy('supplierFiscalDataAccount')
- .should('have.value', '9990000001');
+ cy.dataCy('supplierFiscalDataAccount').should('have.value', '9990000001');
});
it('should replace character at cursor position in insert mode', () => {
@@ -26,14 +24,12 @@ describe('VnInput Component', () => {
cy.dataCy('supplierFiscalDataAccount').type('{movetostart}');
// Escribe un número y verifica que se reemplace correctamente en la posicion incial
cy.dataCy('supplierFiscalDataAccount').type('999');
- cy.dataCy('supplierFiscalDataAccount')
- .should('have.value', '9990000001');
+ cy.dataCy('supplierFiscalDataAccount').should('have.value', '9990000001');
});
it('should respect maxlength prop', () => {
cy.dataCy('supplierFiscalDataAccount').clear();
cy.dataCy('supplierFiscalDataAccount').type('123456789012345');
- cy.dataCy('supplierFiscalDataAccount')
- .should('have.value', '1234567890'); // asumiendo que maxlength es 10
+ cy.dataCy('supplierFiscalDataAccount').should('have.value', '1234567890'); // asumiendo que maxlength es 10
});
});
diff --git a/test/cypress/integration/vnComponent/VnLocation.spec.js b/test/cypress/integration/vnComponent/VnLocation.spec.js
index 292b2a39588..986cbcaaf60 100644
--- a/test/cypress/integration/vnComponent/VnLocation.spec.js
+++ b/test/cypress/integration/vnComponent/VnLocation.spec.js
@@ -17,7 +17,6 @@ describe('VnLocation', () => {
cy.viewport(1280, 720);
cy.login('developer');
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
- cy.domContentLoad();
cy.get(createLocationButton).click();
});
it('should filter provinces based on selected country', () => {
diff --git a/test/cypress/integration/wagon/wagonCreate.spec.js b/test/cypress/integration/wagon/wagonCreate.spec.js
index ce3723e5400..4e78e57de9e 100644
--- a/test/cypress/integration/wagon/wagonCreate.spec.js
+++ b/test/cypress/integration/wagon/wagonCreate.spec.js
@@ -18,6 +18,6 @@ describe('WagonCreate', () => {
).type('100');
cy.dataCy('Type_select').type('{downarrow}{enter}');
- cy.get('[title="Remove"] > .q-btn__content > .q-icon').click();
+ cy.get('[title="Remove"] > .q-btn__content > .q-icon').first().click();
});
});
diff --git a/test/cypress/integration/worker/workerCreate.spec.js b/test/cypress/integration/worker/workerCreate.spec.js
index 71fd6b347e7..6349f04a0e7 100644
--- a/test/cypress/integration/worker/workerCreate.spec.js
+++ b/test/cypress/integration/worker/workerCreate.spec.js
@@ -1,4 +1,4 @@
-describe('WorkerCreate', () => {
+describe.skip('WorkerCreate', () => {
const externalRadio = '.q-radio:nth-child(2)';
const developerBossId = 120;
const payMethodCross =
diff --git a/test/cypress/integration/zone/zoneBasicData.spec.js b/test/cypress/integration/zone/zoneBasicData.spec.js
index 70ded3f7969..6db39b07228 100644
--- a/test/cypress/integration/zone/zoneBasicData.spec.js
+++ b/test/cypress/integration/zone/zoneBasicData.spec.js
@@ -9,13 +9,7 @@ describe('ZoneBasicData', () => {
});
it('should throw an error if the name is empty', () => {
- cy.intercept('GET', /\/api\/Zones\/4./).as('zone');
-
- cy.wait('@zone').then(() => {
- cy.get('[data-cy="zone-basic-data-name"] input').type(
- '{selectall}{backspace}',
- );
- });
+ cy.get('[data-cy="zone-basic-data-name"] input').type('{selectall}{backspace}');
cy.get(saveBtn).click();
cy.checkNotification("can't be blank");
diff --git a/test/cypress/support/commands.js b/test/cypress/support/commands.js
index bc8158b626b..096a29dc157 100755
--- a/test/cypress/support/commands.js
+++ b/test/cypress/support/commands.js
@@ -33,7 +33,8 @@ Cypress.Commands.add('waitUntil', { prevSubject: 'optional' }, waitUntil);
Cypress.Commands.add('resetDB', () => {
cy.exec('pnpm run resetDatabase');
});
-Cypress.Commands.add('login', (user) => {
+
+Cypress.Commands.add('login', (user = 'developer') => {
//cy.visit('/#/login');
cy.request({
method: 'POST',
@@ -56,9 +57,12 @@ Cypress.Commands.add('login', (user) => {
});
});
-Cypress.Commands.add('domContentLoad', (element, timeout = 5000) => {
+Cypress.Commands.overwrite('visit', (originalFn, url, options) => {
+ originalFn(url, options);
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
+ cy.waitUntil(() => cy.get('main').should('exist'));
});
+
Cypress.Commands.add('waitForElement', (element, timeout = 10000) => {
cy.get(element, { timeout }).should('be.visible').and('not.be.disabled');
});
@@ -112,7 +116,7 @@ function selectItem(selector, option, ariaControl, hasWrite = true) {
.find((item) => item.innerText.includes(option));
if (matchingItem) return cy.wrap(matchingItem).click();
- if (hasWrite) cy.get(selector).clear().type(option, { delay: 0 });
+ if (hasWrite) cy.get(selector).clear().type(option);
return selectItem(selector, option, ariaControl, false);
});
}
@@ -329,8 +333,13 @@ Cypress.Commands.add('openUserPanel', () => {
Cypress.Commands.add('checkNotification', (text) => {
cy.get('.q-notification', { timeout: 10000 })
.should('be.visible')
- .filter((_, el) => Cypress.$(el).text().includes(text))
- .should('have.length.greaterThan', 0);
+ .should('have.length.greaterThan', 0)
+ .should(($elements) => {
+ const found = $elements
+ .toArray()
+ .some((el) => Cypress.$(el).text().includes(text));
+ expect(found).to.be.true;
+ });
});
Cypress.Commands.add('openActions', (row) => {
@@ -376,7 +385,13 @@ Cypress.Commands.add('clickButtonWith', (type, value) => {
}
});
Cypress.Commands.add('clickButtonWithIcon', (iconClass) => {
- cy.get(`.q-icon.${iconClass}`).parent().click();
+ cy.waitForElement('[data-cy="descriptor_actions"]');
+ cy.get('[data-cy="loading-spinner"]', { timeout: 10000 }).should('not.be.visible');
+ cy.get('.q-btn')
+ .filter((index, el) => Cypress.$(el).find('.q-icon.' + iconClass).length > 0)
+ .then(($btn) => {
+ cy.wrap($btn).click();
+ });
});
Cypress.Commands.add('clickButtonWithText', (buttonText) => {
cy.get('.q-btn').contains(buttonText).click();