#8018 - Show fields instead null/undefined #737

Merged
jsegarra merged 9 commits from 8018_location_label into dev 2024-09-30 10:55:05 +00:00
2 changed files with 1 additions and 4 deletions
Showing only changes of commit 013a76cbce - Show all commits

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)';