Skip to content

Commit

Permalink
fix(EMS-3439-3504): uk goods or services, application submission emai…
Browse files Browse the repository at this point in the history
…l copy fixes
  • Loading branch information
ttbarnes committed Jul 15, 2024
1 parent b453e18 commit 8ea9343
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down Expand Up @@ -81,8 +82,4 @@ const checkDescriptionContent = () => {
checkDescriptionContentSections.notSure();
};

export {
checkDescriptionSummaryText,
checkDescriptionSummaryClickRevealsContent,
checkDescriptionContent,
};
export { checkDescriptionSummaryText, checkDescriptionSummaryClickRevealsContent, checkDescriptionContent };
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion e2e-tests/partials/ukGoodsAndServicesDescription.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]'),
Expand Down
6 changes: 4 additions & 2 deletions src/api/.keystone/config.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions src/api/emails/send-application-submitted-emails/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});

Expand Down
6 changes: 4 additions & 2 deletions src/api/emails/send-application-submitted-emails/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ const send = async (application: Application, xlsxPath: string): Promise<Success
*/
const sendOwnerEmailVars = {
...sharedEmailVars,
name: getFullNameString(owner),
buyerName: replaceCharacterCodesWithCharacters(String(buyer.companyOrOrganisationName)),
name: replaceCharacterCodesWithCharacters(getFullNameString(owner)),
emailAddress: email,
} as ApplicationSubmissionEmailVariables;

Expand All @@ -44,7 +45,8 @@ const send = async (application: Application, xlsxPath: string): Promise<Success
*/
const sendContactEmailVars = {
...sharedEmailVars,
name: getFullNameString(policyContact),
buyerName: replaceCharacterCodesWithCharacters(String(buyer.companyOrOrganisationName)),
name: replaceCharacterCodesWithCharacters(getFullNameString(policyContact)),
emailAddress: policyContact.email,
} as ApplicationSubmissionEmailVariables;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

<ul class="govuk-!-margin-bottom-7">
<li data-cy="goods-services-includes-item-1">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.PRODUCTS }}</li>
<li data-cy="goods-services-includes-item-2">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED }}</li>
<li data-cy="goods-services-includes-item-3"><a class="govuk-link" data-cy="goods-services-includes-item-3-link" href="{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.HREF }}">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.TEXT }}</a> {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.TEXT }}</li>
<li data-cy="goods-services-includes-item-4"><a class="govuk-link" data-cy="goods-services-includes-item-4-link" href="{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.HREF }}">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT }}</a> {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.TEXT }}</li>
<li data-cy="goods-services-includes-item-2">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED_1 }}</li>
<li data-cy="goods-services-includes-item-3">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.MANUFACTURED_2 }}</li>
<li data-cy="goods-services-includes-item-4"><a class="govuk-link" data-cy="goods-services-includes-item-4-link" href="{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.HREF }}">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.LINK.TEXT }}</a> {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.STAFFING_COSTS.TEXT }}</li>
<li data-cy="goods-services-includes-item-5"><a class="govuk-link" data-cy="goods-services-includes-item-5-link" href="{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.HREF }}">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.LINK.TEXT }}</a> {{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.NON_PHYSICAL_ASSETS.TEXT }}</li>
</ul>

<p data-cy="goods-services-includes-can-count-as">{{ CONTENT_STRINGS.UK_GOODS_AND_SERVICES_DESCRIPTION.INCLUDES.CAN_COUNT_AS }}</p>
Expand Down

0 comments on commit 8ea9343

Please sign in to comment.