diff --git a/e2e-tests/commands/shared-commands/assertions/check-uk-goods-and-services-description.js b/e2e-tests/commands/shared-commands/assertions/check-uk-goods-and-services-description.js index 5f3c8127ea..07e0b247a7 100644 --- a/e2e-tests/commands/shared-commands/assertions/check-uk-goods-and-services-description.js +++ b/e2e-tests/commands/shared-commands/assertions/check-uk-goods-and-services-description.js @@ -22,22 +22,23 @@ const checkDescriptionContentSections = { cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem1(), CONTENT_STRINGS.INCLUDES.PRODUCTS); - cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem2(), CONTENT_STRINGS.INCLUDES.MANUFACTURED); + cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem2(), CONTENT_STRINGS.INCLUDES.MANUFACTURED_1); + cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem3(), CONTENT_STRINGS.INCLUDES.MANUFACTURED_2); const expectedStaffingCostText = `${CONTENT_STRINGS.INCLUDES.STAFFING_COSTS.LINK.TEXT} ${CONTENT_STRINGS.INCLUDES.STAFFING_COSTS.TEXT}`; - cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem3(), expectedStaffingCostText); + cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem4(), expectedStaffingCostText); cy.checkLink( - partials.ukGoodsOrServicesDescription.includes.listItem3Link(), + partials.ukGoodsOrServicesDescription.includes.listItem4Link(), CONTENT_STRINGS.INCLUDES.STAFFING_COSTS.LINK.HREF, CONTENT_STRINGS.INCLUDES.STAFFING_COSTS.LINK.TEXT, ); const expectedPhysicalAssetsText = `${CONTENT_STRINGS.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT} ${CONTENT_STRINGS.INCLUDES.NON_PHYSICAL_ASSETS.TEXT}`; - cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem4(), expectedPhysicalAssetsText); + cy.checkText(partials.ukGoodsOrServicesDescription.includes.listItem5(), expectedPhysicalAssetsText); cy.checkLink( - partials.ukGoodsOrServicesDescription.includes.listItem4Link(), + partials.ukGoodsOrServicesDescription.includes.listItem5Link(), CONTENT_STRINGS.INCLUDES.NON_PHYSICAL_ASSETS.LINK.HREF, CONTENT_STRINGS.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT, ); @@ -81,8 +82,4 @@ const checkDescriptionContent = () => { checkDescriptionContentSections.notSure(); }; -export { - checkDescriptionSummaryText, - checkDescriptionSummaryClickRevealsContent, - checkDescriptionContent, -}; +export { checkDescriptionSummaryText, checkDescriptionSummaryClickRevealsContent, checkDescriptionContent }; diff --git a/e2e-tests/content-strings/uk-goods-and-services-description.js b/e2e-tests/content-strings/uk-goods-and-services-description.js index 0897eff455..3cb588a59b 100644 --- a/e2e-tests/content-strings/uk-goods-and-services-description.js +++ b/e2e-tests/content-strings/uk-goods-and-services-description.js @@ -5,7 +5,8 @@ export const UK_GOODS_AND_SERVICES_DESCRIPTION = { INCLUDES: { INTRO: 'UK goods and services include:', PRODUCTS: 'products made in the UK', - MANUFACTURED: 'goods manufactured outside the UK but processed or modified in the UK, which would then be eligible for a certificate of UK origin', + MANUFACTURED_1: 'goods manufactured outside the UK but processed or modified in the UK, which would then be eligible for a certificate of UK origin', + MANUFACTURED_2: 'goods manufactured outside of the UK but are eligible for a certificate of UK origin', STAFFING_COSTS: { LINK: { TEXT: 'staffing costs', diff --git a/e2e-tests/partials/ukGoodsAndServicesDescription.js b/e2e-tests/partials/ukGoodsAndServicesDescription.js index c4a9ed8c1b..0f47fed2b9 100644 --- a/e2e-tests/partials/ukGoodsAndServicesDescription.js +++ b/e2e-tests/partials/ukGoodsAndServicesDescription.js @@ -6,9 +6,10 @@ const ukGoodsOrServicesDescription = { listItem1: () => cy.get('[data-cy="goods-services-includes-item-1"]'), listItem2: () => cy.get('[data-cy="goods-services-includes-item-2"]'), listItem3: () => cy.get('[data-cy="goods-services-includes-item-3"]'), - listItem3Link: () => cy.get('[data-cy="goods-services-includes-item-3-link"]'), listItem4: () => cy.get('[data-cy="goods-services-includes-item-4"]'), listItem4Link: () => cy.get('[data-cy="goods-services-includes-item-4-link"]'), + listItem5: () => cy.get('[data-cy="goods-services-includes-item-5"]'), + listItem5Link: () => cy.get('[data-cy="goods-services-includes-item-5-link"]'), canCountAs: () => cy.get('[data-cy="goods-services-includes-can-count-as"]'), }, canAlsoCount: () => cy.get('[data-cy="goods-services-can-also-count-copy"]'), diff --git a/src/api/.keystone/config.js b/src/api/.keystone/config.js index 6ce674cbe5..d18efa8cff 100644 --- a/src/api/.keystone/config.js +++ b/src/api/.keystone/config.js @@ -5424,12 +5424,14 @@ var send4 = async (application2, xlsxPath) => { }; const sendOwnerEmailVars = { ...sharedEmailVars, - name: get_full_name_string_default(owner), + buyerName: replace_character_codes_with_characters_default(String(buyer.companyOrOrganisationName)), + name: replace_character_codes_with_characters_default(get_full_name_string_default(owner)), emailAddress: email }; const sendContactEmailVars = { ...sharedEmailVars, - name: get_full_name_string_default(policyContact), + buyerName: replace_character_codes_with_characters_default(String(buyer.companyOrOrganisationName)), + name: replace_character_codes_with_characters_default(get_full_name_string_default(policyContact)), emailAddress: policyContact.email }; console.info("Sending application submitted email to application account owner: %s", sendOwnerEmailVars.emailAddress); diff --git a/src/api/emails/send-application-submitted-emails/index.test.ts b/src/api/emails/send-application-submitted-emails/index.test.ts index 075594feae..b305753305 100644 --- a/src/api/emails/send-application-submitted-emails/index.test.ts +++ b/src/api/emails/send-application-submitted-emails/index.test.ts @@ -64,15 +64,17 @@ describe('emails/send-email-application-submitted', () => { }; expectedSendOwnerEmailVars = { - emailAddress: email, - name: getFullNameString(owner), ...sharedEmailVars, + emailAddress: email, + buyerName: replaceCharacterCodesWithCharacters(String(buyer.companyOrOrganisationName)), + name: replaceCharacterCodesWithCharacters(getFullNameString(owner)), } as ApplicationSubmissionEmailVariables; expectedContactSendEmailVars = { - emailAddress: policyContact.email, - name: getFullNameString(policyContact), ...sharedEmailVars, + emailAddress: policyContact.email, + buyerName: replaceCharacterCodesWithCharacters(String(buyer.companyOrOrganisationName)), + name: replaceCharacterCodesWithCharacters(getFullNameString(policyContact)), } as ApplicationSubmissionEmailVariables; }); diff --git a/src/api/emails/send-application-submitted-emails/index.ts b/src/api/emails/send-application-submitted-emails/index.ts index a11cedd5b3..40c13ddd85 100644 --- a/src/api/emails/send-application-submitted-emails/index.ts +++ b/src/api/emails/send-application-submitted-emails/index.ts @@ -34,7 +34,8 @@ const send = async (application: Application, xlsxPath: string): Promise
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.PRODUCTS }}
  • -
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED }}
  • -
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.TEXT }} {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.TEXT }}
  • -
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT }} {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.TEXT }}
  • +
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED_1 }}
  • +
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED_2 }}
  • +
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.TEXT }} {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.TEXT }}
  • +
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT }} {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.TEXT }}
  • {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.CAN_COUNT_AS }}