Skip to content

Commit

Permalink
fix(EMS-3518): no pdf - application submission - XLSX - final destina…
Browse files Browse the repository at this point in the history
…tion (#2649)

* fix(EMS-3518): no pdf - application submission - xlsx - final destination

* fix(EMS-3518): no pdf - application submission - xlsx - final destination
  • Loading branch information
ttbarnes authored Jul 2, 2024
1 parent 18cfcd9 commit 542aa6b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ context(
hasConnectionToBuyer: true,
buyerOutstandingPayments: true,
buyerFailedToPayOnTime: true,
finalDestinationKnown: true,
fullyPopulatedBuyerTradingHistory: true,
hasHadCreditInsuranceCoverWithBuyer: true,
exporterHasBuyerFinancialAccounts: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ context(
hasConnectionToBuyer: true,
buyerOutstandingPayments: true,
buyerFailedToPayOnTime: true,
finalDestinationKnown: true,
fullyPopulatedBuyerTradingHistory: true,
hasHadCreditInsuranceCoverWithBuyer: true,
exporterHasBuyerFinancialAccounts: true,
Expand Down
2 changes: 1 addition & 1 deletion src/api/.keystone/config.js

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

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('api/generate-xlsx/map-application-to-xlsx/map-export-contract/map-fina

const expected = [
xlsxRow(String(FIELDS.EXPORT_CONTRACT[FINAL_DESTINATION_KNOWN]), mapYesNoField({ answer: finalDestinationKnownAnswer })),
xlsxRow(String(CONTENT_STRINGS[FINAL_DESTINATION]), String(country)),
xlsxRow(String(CONTENT_STRINGS[FINAL_DESTINATION].SUMMARY?.TITLE), String(country.name)),
];

expect(result).toEqual(expected);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const mapFinalDestination = (exportContract: ApplicationExportContract, countrie
if (finalDestinationKnownAnswer) {
const country = getCountryByIsoCode(countries, exportContract[FINAL_DESTINATION]);

mapped.push(xlsxRow(String(CONTENT_STRINGS[FINAL_DESTINATION]), String(country)));
mapped.push(xlsxRow(String(CONTENT_STRINGS[FINAL_DESTINATION].SUMMARY?.TITLE), country.name));
}

return mapped;
Expand Down
2 changes: 1 addition & 1 deletion src/api/test-mocks/mock-application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const mockExportContractAgent = {
};

export const mockExportContractAgentFullyPopulated = {
countryCode: mockCountries[0].isoCode,
finalDestinationCountryCode: mockCountries[0].isoCode,
fullAddress: 'Mock export contract agent address',
isUsingAgent: false,
name: 'Mock export contract agent name',
Expand Down

0 comments on commit 542aa6b

Please sign in to comment.