diff --git a/e2e/paths/06-claim/05_summary.spec.js b/e2e/paths/06-claim/05_summary.spec.js index c63e686cb..cea5edb55 100644 --- a/e2e/paths/06-claim/05_summary.spec.js +++ b/e2e/paths/06-claim/05_summary.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import getBrowser from '../../helpers/puppeteer'; -describe('claim Summary path', () => { +describe('Claim summary path', () => { let browser; let page; const claimId = '4'; diff --git a/e2e/paths/06-claim/06_descriptor.spec.js b/e2e/paths/06-claim/06_descriptor.spec.js index c0affb3cc..0826bad63 100644 --- a/e2e/paths/06-claim/06_descriptor.spec.js +++ b/e2e/paths/06-claim/06_descriptor.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors.js'; import getBrowser from '../../helpers/puppeteer'; -describe('claim Descriptor path', () => { +describe('Claim descriptor path', () => { let browser; let page; const claimId = '1'; diff --git a/e2e/paths/13-supplier/03_fiscal_data.spec.js b/e2e/paths/13-supplier/03_fiscal_data.spec.js index d929288d4..0238c8704 100644 --- a/e2e/paths/13-supplier/03_fiscal_data.spec.js +++ b/e2e/paths/13-supplier/03_fiscal_data.spec.js @@ -23,10 +23,13 @@ describe('Supplier fiscal data path', () => { await page.clearInput(selectors.supplierFiscalData.country); await page.clearInput(selectors.supplierFiscalData.postCode); await page.write(selectors.supplierFiscalData.city, 'Valencia'); + await page.waitForTimeout(1000); // must repeat this action twice or fails. also #2699 may be a cool solution to this. + await page.clearInput(selectors.supplierFiscalData.city); + await page.write(selectors.supplierFiscalData.city, 'Valencia'); await page.clearInput(selectors.supplierFiscalData.socialName); await page.write(selectors.supplierFiscalData.socialName, 'Farmer King SL'); await page.clearInput(selectors.supplierFiscalData.taxNumber); - await page.write(selectors.supplierFiscalData.taxNumber, 'invalid tax number'); + await page.write(selectors.supplierFiscalData.taxNumber, 'Wrong tax number'); await page.clearInput(selectors.supplierFiscalData.account); await page.write(selectors.supplierFiscalData.account, 'edited account number'); await page.autocompleteSearch(selectors.supplierFiscalData.sageWihholding, 'retencion estimacion objetiva'); diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 0081af429..2e22f828b 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -84,5 +84,6 @@ "companyFk": "Company", "You need to fill sage information before you check verified data": "You need to fill sage information before you check verified data", "The social name cannot be empty": "The social name cannot be empty", - "The nif cannot be empty": "The nif cannot be empty" + "The nif cannot be empty": "The nif cannot be empty", + "A travel with this data already exists": "A travel with this data already exists" } \ No newline at end of file diff --git a/modules/client/front/address/edit/index.js b/modules/client/front/address/edit/index.js index 30201b880..b8d2e28a4 100644 --- a/modules/client/front/address/edit/index.js +++ b/modules/client/front/address/edit/index.js @@ -42,9 +42,10 @@ export default class Controller extends Section { // Town auto complete set town(selection) { + const oldValue = this._town; this._town = selection; - if (!selection) return; + if (!selection || !oldValue) return; const province = selection.province; const postcodes = selection.postcodes; @@ -62,9 +63,10 @@ export default class Controller extends Section { // Postcode auto complete set postcode(selection) { + const oldValue = this._postcode; this._postcode = selection; - if (!selection) return; + if (!selection || !oldValue) return; const town = selection.town; const province = town.province; diff --git a/modules/client/front/fiscal-data/index.js b/modules/client/front/fiscal-data/index.js index 397bb20e1..73580af43 100644 --- a/modules/client/front/fiscal-data/index.js +++ b/modules/client/front/fiscal-data/index.js @@ -106,9 +106,10 @@ export default class Controller extends Section { // Province auto complete set province(selection) { + const oldValue = this._province; this._province = selection; - if (!selection) return; + if (!selection || !oldValue) return; const country = selection.country; @@ -122,9 +123,10 @@ export default class Controller extends Section { // Town auto complete set town(selection) { + const oldValue = this._town; this._town = selection; - if (!selection) return; + if (!selection || !oldValue) return; const province = selection.province; const country = province.country; diff --git a/modules/supplier/front/fiscal-data/index.js b/modules/supplier/front/fiscal-data/index.js index f2929c91f..8a6a51249 100644 --- a/modules/supplier/front/fiscal-data/index.js +++ b/modules/supplier/front/fiscal-data/index.js @@ -8,9 +8,10 @@ export default class Controller extends Section { // Province auto complete set province(selection) { + const oldValue = this._province; this._province = selection; - if (!selection) return; + if (!selection || !oldValue) return; const country = selection.country; @@ -24,9 +25,10 @@ export default class Controller extends Section { // Town auto complete set town(selection) { + const oldValue = this._town; this._town = selection; - if (!selection) return; + if (!selection || !oldValue) return; const province = selection.province; const country = province.country;