From cf86b8e0d6b5876fd8806726e5fb5c769f2a0ca2 Mon Sep 17 00:00:00 2001 From: Tony Barnes Date: Tue, 29 Oct 2024 17:01:50 +0000 Subject: [PATCH] fix(EMS-3901): data migration - requestedCreditLimit column (#3255) * chore(typescript): update config * chore(e2e): fix typo * fix(EMS-3901): data migration - requestedCreditLimit * chore(typescript): update config --- .../companies-house-search/companies-house-search.spec.js | 4 ++-- src/api/.keystone/config.js | 5 ++++- .../add-policy-requested-credit-limit-field.ts | 2 +- src/api/tsconfig.json | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/companies-house/companies-house-search/companies-house-search.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/companies-house/companies-house-search/companies-house-search.spec.js index 63be66090c..aea87d6ed5 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/companies-house/companies-house-search/companies-house-search.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/companies-house/companies-house-search/companies-house-search.spec.js @@ -12,7 +12,7 @@ import { } from '../../../../../../../constants'; import { INSURANCE_ROUTES } from '../../../../../../../constants/routes/insurance'; import { INSURANCE_FIELD_IDS } from '../../../../../../../constants/field-ids/insurance'; -import { FIELDS_ELIGIBILITY } from '../../../../../../../content-strings/fields/insurance/eligibility'; +import { ELIGIBILITY_FIELDS } from '../../../../../../../content-strings/fields/insurance/eligibility'; const CONTENT_STRINGS = PAGES.INSURANCE.ELIGIBILITY.COMPANIES_HOUSE_NUMBER; @@ -26,7 +26,7 @@ const { ELIGIBILITY: { COMPANIES_HOUSE_NUMBER: FIELD_ID }, } = INSURANCE_FIELD_IDS; -const FIELD_STRINGS = FIELDS_ELIGIBILITY[FIELD_ID]; +const FIELD_STRINGS = ELIGIBILITY_FIELDS[FIELD_ID]; const field = fieldSelector(FIELD_ID); diff --git a/src/api/.keystone/config.js b/src/api/.keystone/config.js index 0444d7a344..e318fbdc5a 100644 --- a/src/api/.keystone/config.js +++ b/src/api/.keystone/config.js @@ -6552,7 +6552,10 @@ var POLICY_FIELDS = { }, [CONTRACT_POLICY.SINGLE.REQUESTED_CREDIT_LIMIT]: { LABEL: 'What credit limit do you require?', - HINT: 'For example, your total contract maybe \xA3250,000 but the amount you want to insure is \xA3100,000.', + HINT: { + INTRO: 'For example, your total contract maybe \xA3250,000 but the amount you want to insure is \xA3100,000.', + OUTRO: 'Enter a whole number. Do not enter decimals.', + }, SUMMARY: { TITLE: 'Credit limit', FORM_TITLE: POLICY_FORM_TITLES.CONTRACT_POLICY, diff --git a/src/api/data-migration/version-2-to-version-3/update-applications/add-policy-requested-credit-limit-field.ts b/src/api/data-migration/version-2-to-version-3/update-applications/add-policy-requested-credit-limit-field.ts index 4718ff6de2..3f46f6a38c 100644 --- a/src/api/data-migration/version-2-to-version-3/update-applications/add-policy-requested-credit-limit-field.ts +++ b/src/api/data-migration/version-2-to-version-3/update-applications/add-policy-requested-credit-limit-field.ts @@ -10,7 +10,7 @@ import executeSqlQuery from '../../execute-sql-query'; const addPolicyRequestedCreditLimitField = (connection: Connection) => executeSqlQuery({ connection, - query: `ALTER TABLE Policy ADD requestedCreditLimit tinyint(1) DEFAULT NULL`, + query: `ALTER TABLE Policy ADD requestedCreditLimit int DEFAULT NULL`, loggingMessage: 'Adding FIELD requestedCreditLimit to policy table', }); diff --git a/src/api/tsconfig.json b/src/api/tsconfig.json index f9f4db20c3..459d89f977 100644 --- a/src/api/tsconfig.json +++ b/src/api/tsconfig.json @@ -21,7 +21,6 @@ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, "noPropertyAccessFromIndexSignature": false, - "suppressImplicitAnyIndexErrors": true, "ignoreDeprecations": "5.0", "resolveJsonModule": true,