test: VnLocation
gitea/salix-front/pipeline/pr-dev Build queued... Details

This commit is contained in:
Javier Segarra 2024-09-23 11:48:00 +02:00
parent f06723a919
commit 013a76cbce
2 changed files with 1 additions and 4 deletions

View File

@ -13,7 +13,6 @@ const props = defineProps({
},
});
const formatLocation = (obj, properties) => {
// Crear un array con las propiedades del objeto
const parts = properties.map((prop) => {
if (typeof prop === 'string') {
return obj[prop];
@ -23,12 +22,10 @@ const formatLocation = (obj, properties) => {
return null;
});
// Filtrar los valores que no son null o undefined
const filteredParts = parts.filter(
(part) => part !== null && part !== undefined && part !== ''
);
// Unir los valores filtrados con el formato deseado
return filteredParts.join(', ');
};

View File

@ -34,7 +34,7 @@ describe('VnLocation', () => {
cy.visit('/#/supplier/567/fiscal-data', { timeout: 7000 });
cy.waitForElement('.q-form');
});
it('Fin by postalCode', () => {
it('Find by postalCode', () => {
const postCode = '46600';
const postCodeLabel = '46600, Valencia(Province one), España';
const firstOption = '[role="listbox"] .q-item:nth-child(1)';