From 499bd082fc600247cd15568fe4428edca7a3394f Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Wed, 29 Jan 2020 14:13:25 +0100 Subject: [PATCH] changed messages --- e2e/paths/02-client-module/01_create_client.spec.js | 2 +- loopback/locale/en.json | 2 +- loopback/locale/es.json | 2 +- modules/client/back/methods/client/specs/updateAddress.spec.js | 2 +- modules/client/back/models/address.js | 2 +- modules/client/back/models/client.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/e2e/paths/02-client-module/01_create_client.spec.js b/e2e/paths/02-client-module/01_create_client.spec.js index 01a30da133..ea5ffb17d4 100644 --- a/e2e/paths/02-client-module/01_create_client.spec.js +++ b/e2e/paths/02-client-module/01_create_client.spec.js @@ -74,7 +74,7 @@ describe('Client create path', async() => { await page.waitToClick(selectors.createClientView.createButton); const result = await page.waitForLastSnackbar(); - expect(result).toEqual(`The postcode doesn't exists. Ensure you put the correct format`); + expect(result).toEqual(`The postcode doesn't exist. Please enter a correct one`); }); it(`should check for autocompleted city, province and country`, async() => { diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 584ecbeddc..2ea2b1a3ad 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -54,7 +54,7 @@ "This ticket can not be modified": "This ticket can not be modified", "You can't delete a confirmed order": "You can't delete a confirmed order", "Value has an invalid format": "Value has an invalid format", - "The postcode doesn't exists. Ensure you put the correct format": "The postcode doesn't exists. Ensure you put the correct format", + "The postcode doesn't exist. Please enter a correct one": "The postcode doesn't exist. Please enter a correct one", "Can't create stowaway for this ticket": "Can't create stowaway for this ticket", "Has deleted the ticket id": "Has deleted the ticket id [#{{id}}]({{{url}}})", "Swift / BIC can't be empty": "Swift / BIC can't be empty", diff --git a/loopback/locale/es.json b/loopback/locale/es.json index e4b3334de4..a3490b372a 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -106,7 +106,7 @@ "Invalid quantity": "Cantidad invalida", "This postal code is not valid": "This postal code is not valid", "is invalid": "is invalid", - "The postcode doesn't exists. Ensure you put the correct format": "El código postal no existe. Asegúrate de ponerlo con el formato correcto", + "The postcode doesn't exist. Please enter a correct one": "El código postal no existe. Por favor, introduce uno correcto", "The department name can't be repeated": "El nombre del departamento no puede repetirse", "This phone already exists": "Este teléfono ya existe", "You cannot move a parent to its own sons": "No puedes mover un elemento padre a uno de sus hijos", diff --git a/modules/client/back/methods/client/specs/updateAddress.spec.js b/modules/client/back/methods/client/specs/updateAddress.spec.js index a4cf07891d..7dca0883ec 100644 --- a/modules/client/back/methods/client/specs/updateAddress.spec.js +++ b/modules/client/back/methods/client/specs/updateAddress.spec.js @@ -61,7 +61,7 @@ describe('Address updateAddress', () => { expect(err.message).toEqual('Customs agent is required for a non UEE member'); }); - it('should update the adress from a non uee member and not throw an error', async() => { + it('should update the adress from a non uee member with no error thrown', async() => { const expectedResult = 'My edited address'; const ctx = { args: { diff --git a/modules/client/back/models/address.js b/modules/client/back/models/address.js index ffcaf39da0..384a2e686d 100644 --- a/modules/client/back/models/address.js +++ b/modules/client/back/models/address.js @@ -23,7 +23,7 @@ module.exports = Self => { } Self.validateAsync('postalCode', hasValidPostcode, { - message: `The postcode doesn't exists. Ensure you put the correct format` + message: `The postcode doesn't exist. Please enter a correct one` }); async function hasValidPostcode(err, done) { diff --git a/modules/client/back/models/client.js b/modules/client/back/models/client.js index 198aae2cd5..367e0f0ebd 100644 --- a/modules/client/back/models/client.js +++ b/modules/client/back/models/client.js @@ -158,7 +158,7 @@ module.exports = Self => { } Self.validateAsync('postCode', hasValidPostcode, { - message: `The postcode doesn't exists. Ensure you put the correct format` + message: `The postcode doesn't exist. Please enter a correct one` }); async function hasValidPostcode(err, done) {