diff --git a/src/components/common/VnLocation.vue b/src/components/common/VnLocation.vue index c3b07c72c1..633d32b85d 100644 --- a/src/components/common/VnLocation.vue +++ b/src/components/common/VnLocation.vue @@ -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(', '); }; diff --git a/test/cypress/integration/vnComponent/vnLocation.spec.js b/test/cypress/integration/vnComponent/vnLocation.spec.js index 15ab53d178..1872d3591c 100644 --- a/test/cypress/integration/vnComponent/vnLocation.spec.js +++ b/test/cypress/integration/vnComponent/vnLocation.spec.js @@ -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)';