diff --git a/e2e-tests/fixtures/countries.js b/e2e-tests/fixtures/countries.js index 19b1c21472..e145f5e449 100644 --- a/e2e-tests/fixtures/countries.js +++ b/e2e-tests/fixtures/countries.js @@ -71,13 +71,13 @@ const NO_ONLINE_SUPPORT_1 = AGO; const NO_ONLINE_SUPPORT_2 = ARG; const NO_ONLINE_SUPPORT_3 = BLZ; const NO_ONLINE_SUPPORT_4 = TN; +const NO_ONLINE_SUPPORT_5 = IRL; +const NO_ONLINE_SUPPORT_6 = FRA; const NOT_SUPPORTED_1 = GBR; const NOT_SUPPORTED_2 = ERI; const NOT_SUPPORTED_3 = IOT; const NOT_SUPPORTED_4 = NCL; -const NOT_SUPPORTED_5 = IRL; -const NOT_SUPPORTED_6 = FRA; /** * COUNTRY_QUOTE_SUPPORT @@ -99,12 +99,12 @@ export const COUNTRY_APPLICATION_SUPPORT = { NO_ONLINE_SUPPORT_2, NO_ONLINE_SUPPORT_3, NO_ONLINE_SUPPORT_4, + NO_ONLINE_SUPPORT_5, + NO_ONLINE_SUPPORT_6, NOT_SUPPORTED_1, NOT_SUPPORTED_2, NOT_SUPPORTED_3, NOT_SUPPORTED_4, - NOT_SUPPORTED_5, - NOT_SUPPORTED_6, }; export default mockCountries; diff --git a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-no-online-support.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-no-online-support.spec.js index a4c024ed52..81baf84254 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-no-online-support.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-no-online-support.spec.js @@ -9,6 +9,8 @@ const COUNTRY_NAME_1 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_1.NAME; const COUNTRY_NAME_2 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_2.NAME; const COUNTRY_NAME_3 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_3.NAME; const COUNTRY_NAME_4 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_4.NAME; +const COUNTRY_NAME_5 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_5.NAME; +const COUNTRY_NAME_6 = COUNTRY_APPLICATION_SUPPORT.NO_ONLINE_SUPPORT_6.NAME; context( 'Insurance - Buyer country page - As an exporter, I want to check if UKEF offer credit insurance policy for where my buyer is based - submit countries that have no online insurance support', @@ -42,5 +44,17 @@ context( cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_4, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); }); }); + + describe(COUNTRY_NAME_5, () => { + it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { + cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_5, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); + }); + }); + + describe(COUNTRY_NAME_6, () => { + it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { + cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_6, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); + }); + }); }, ); diff --git a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-unsupported-countries.spec.js b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-unsupported-countries.spec.js index 43a1d0b9cb..964c12f200 100644 --- a/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-unsupported-countries.spec.js +++ b/e2e-tests/insurance/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-unsupported-countries.spec.js @@ -9,8 +9,6 @@ const COUNTRY_NAME_1 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_1.NAME; const COUNTRY_NAME_2 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_2.NAME; const COUNTRY_NAME_3 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_3.NAME; const COUNTRY_NAME_4 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_4.NAME; -const COUNTRY_NAME_5 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_5.NAME; -const COUNTRY_NAME_6 = COUNTRY_APPLICATION_SUPPORT.NOT_SUPPORTED_6.NAME; const contextString = 'As an exporter I want to enter the country where my buyer is based So that I can ascertain if I can obtain UKEF Credit Insurance for the country where my buyer is based - submit countries that cannot apply'; @@ -45,16 +43,4 @@ context(`Insurance - Buyer country page - ${contextString} - Unsupported countri cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_4, CANNOT_APPLY_EXIT); }); }); - - describe(COUNTRY_NAME_5, () => { - it(`should redirect to ${CANNOT_APPLY_EXIT} exit page`, () => { - cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_5, CANNOT_APPLY_EXIT); - }); - }); - - describe(COUNTRY_NAME_6, () => { - it(`should redirect to ${CANNOT_APPLY_EXIT} exit page`, () => { - cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_6, CANNOT_APPLY_EXIT); - }); - }); }); diff --git a/src/api/.keystone/config.js b/src/api/.keystone/config.js index ae2a94ba18..83a6bbed38 100644 --- a/src/api/.keystone/config.js +++ b/src/api/.keystone/config.js @@ -9229,7 +9229,7 @@ var { CIS: { COUNTRY_RATINGS: { NOT_APPLICABLE }, ESRA_CLASSIFICATION: { NONE }, - SHORT_TERM_COVER: { UNLISTED, CILC, NO: NO2 }, + SHORT_TERM_COVER: { UNLISTED, CILC }, }, } = EXTERNAL_API_DEFINITIONS; var hasNoSupport = ({ countryRating, esraClassification, shortTermCover }) => { @@ -9245,9 +9245,6 @@ var hasNoSupport = ({ countryRating, esraClassification, shortTermCover }) => { if (shortTermCover === CILC && countryRatingIsNotApplicable && esraClassificationConditions) { return true; } - if (shortTermCover === NO2) { - return true; - } return false; }; var has_no_support_default = hasNoSupport; @@ -9256,7 +9253,7 @@ var has_no_support_default = hasNoSupport; var { CIS: { ESRA_CLASSIFICATION: { STANDARD: STANDARD2, HIGH: HIGH2, VERY_HIGH: VERY_HIGH2, NONE: NONE2 }, - SHORT_TERM_COVER: { NO: NO3, ILC, CILC: CILC2 }, + SHORT_TERM_COVER: { NO: NO2, ILC, CILC: CILC2 }, }, } = EXTERNAL_API_DEFINITIONS; var aAndBRatingConditions = ({ countryRating, esraClassification, shortTermCover }) => { @@ -9270,8 +9267,11 @@ var aAndBRatingConditions = ({ countryRating, esraClassification, shortTermCover if (shortTermCover === CILC2) { return true; } + if (shortTermCover === NO2) { + return true; + } } - if (esraClassification === NONE2 && shortTermCover === NO3) { + if (esraClassification === NONE2 && shortTermCover === NO2) { return true; } return false; @@ -9282,7 +9282,7 @@ var a_and_b_rating_conditions_default = aAndBRatingConditions; var { CIS: { ESRA_CLASSIFICATION: { STANDARD: STANDARD3, HIGH: HIGH3, VERY_HIGH: VERY_HIGH3, NONE: NONE3 }, - SHORT_TERM_COVER: { YES: YES2, NO: NO4, ILC: ILC2, CILC: CILC3, REFER, UNLISTED: UNLISTED2 }, + SHORT_TERM_COVER: { YES: YES2, NO: NO3, ILC: ILC2, CILC: CILC3, REFER, UNLISTED: UNLISTED2 }, }, } = EXTERNAL_API_DEFINITIONS; var cAndDRatingConditions = ({ countryRating, esraClassification, shortTermCover }) => { @@ -9305,8 +9305,11 @@ var cAndDRatingConditions = ({ countryRating, esraClassification, shortTermCover if (shortTermCover === UNLISTED2) { return true; } + if (shortTermCover === NO3) { + return true; + } } - if (esraClassification === NONE3 && shortTermCover === NO4) { + if (esraClassification === NONE3 && shortTermCover === NO3) { return true; } return false; diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-a.test.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-a.test.ts index 9752cef85f..568473c00c 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-a.test.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-a.test.ts @@ -5,7 +5,7 @@ const { CIS: { COUNTRY_RATINGS, ESRA_CLASSIFICATION: { STANDARD, HIGH, VERY_HIGH }, - SHORT_TERM_COVER: { ILC, CILC }, + SHORT_TERM_COVER: { ILC, CILC, NO }, }, } = EXTERNAL_API_DEFINITIONS; @@ -20,14 +20,17 @@ const params = { STANDARD: { [ILC]: createMockParams(STANDARD, ILC), [CILC]: createMockParams(STANDARD, CILC), + [NO]: createMockParams(STANDARD, NO), }, HIGH: { [ILC]: createMockParams(HIGH, ILC), [CILC]: createMockParams(HIGH, CILC), + [NO]: createMockParams(HIGH, NO), }, VERY_HIGH: { [ILC]: createMockParams(VERY_HIGH, ILC), [CILC]: createMockParams(VERY_HIGH, CILC), + [NO]: createMockParams(VERY_HIGH, NO), }, }; @@ -48,6 +51,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.STANDARD[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${HIGH}`, () => { @@ -66,6 +77,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${VERY_HIGH}`, () => { @@ -84,5 +103,13 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.VERY_HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); }); diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-b.test.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-b.test.ts index fdd1dfdc5a..01208f07f0 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-b.test.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index-rating-b.test.ts @@ -5,7 +5,7 @@ const { CIS: { COUNTRY_RATINGS, ESRA_CLASSIFICATION: { STANDARD, HIGH, VERY_HIGH }, - SHORT_TERM_COVER: { ILC, CILC }, + SHORT_TERM_COVER: { ILC, CILC, NO }, }, } = EXTERNAL_API_DEFINITIONS; @@ -20,14 +20,17 @@ const params = { STANDARD: { [ILC]: createMockParams(STANDARD, ILC), [CILC]: createMockParams(STANDARD, CILC), + [NO]: createMockParams(STANDARD, NO), }, HIGH: { [ILC]: createMockParams(HIGH, ILC), [CILC]: createMockParams(HIGH, CILC), + [NO]: createMockParams(HIGH, NO), }, VERY_HIGH: { [ILC]: createMockParams(VERY_HIGH, ILC), [CILC]: createMockParams(VERY_HIGH, CILC), + [NO]: createMockParams(VERY_HIGH, NO), }, }; @@ -48,6 +51,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.STANDARD[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${HIGH}`, () => { @@ -66,6 +77,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${VERY_HIGH}`, () => { @@ -84,5 +103,13 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/a-and-b-ra expect(result).toEqual(true); }); }); + + describe.each(params.VERY_HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = aAndBRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); }); diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index.ts index b49ad97f8b..cc661b67d4 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/a-and-b-rating-conditions/index.ts @@ -31,6 +31,10 @@ const aAndBRatingConditions = ({ countryRating, esraClassification, shortTermCov if (shortTermCover === CILC) { return true; } + + if (shortTermCover === NO) { + return true; + } } if (esraClassification === NONE && shortTermCover === NO) { diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-c.test.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-c.test.ts index c3ac6f9f1d..91176214bd 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-c.test.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-c.test.ts @@ -5,7 +5,7 @@ const { CIS: { COUNTRY_RATINGS, ESRA_CLASSIFICATION: { STANDARD, HIGH, VERY_HIGH }, - SHORT_TERM_COVER: { YES, ILC, CILC, REFER, UNLISTED }, + SHORT_TERM_COVER: { YES, ILC, CILC, NO, REFER, UNLISTED }, }, } = EXTERNAL_API_DEFINITIONS; @@ -23,6 +23,7 @@ const params = { [CILC]: createMockParams(STANDARD, CILC), [REFER]: createMockParams(STANDARD, REFER), [UNLISTED]: createMockParams(STANDARD, UNLISTED), + [NO]: createMockParams(STANDARD, NO), }, HIGH: { [YES]: createMockParams(HIGH, YES), @@ -30,6 +31,7 @@ const params = { [CILC]: createMockParams(HIGH, CILC), [REFER]: createMockParams(HIGH, REFER), [UNLISTED]: createMockParams(HIGH, UNLISTED), + [NO]: createMockParams(HIGH, NO), }, VERY_HIGH: { [YES]: createMockParams(VERY_HIGH, YES), @@ -37,6 +39,7 @@ const params = { [CILC]: createMockParams(VERY_HIGH, CILC), [REFER]: createMockParams(VERY_HIGH, REFER), [UNLISTED]: createMockParams(VERY_HIGH, UNLISTED), + [NO]: createMockParams(VERY_HIGH, NO), }, }; @@ -81,6 +84,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.STANDARD[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${HIGH}`, () => { @@ -123,6 +134,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${VERY_HIGH}`, () => { @@ -165,5 +184,13 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.VERY_HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); }); diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-d.test.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-d.test.ts index 6ab893b4c7..699c3cc4f8 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-d.test.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index-rating-d.test.ts @@ -5,7 +5,7 @@ const { CIS: { COUNTRY_RATINGS, ESRA_CLASSIFICATION: { STANDARD, HIGH, VERY_HIGH }, - SHORT_TERM_COVER: { YES, ILC, CILC, REFER, UNLISTED }, + SHORT_TERM_COVER: { YES, ILC, CILC, NO, REFER, UNLISTED }, }, } = EXTERNAL_API_DEFINITIONS; @@ -23,6 +23,7 @@ const params = { [CILC]: createMockParams(STANDARD, CILC), [REFER]: createMockParams(STANDARD, REFER), [UNLISTED]: createMockParams(STANDARD, UNLISTED), + [NO]: createMockParams(STANDARD, NO), }, HIGH: { [YES]: createMockParams(HIGH, YES), @@ -30,6 +31,7 @@ const params = { [CILC]: createMockParams(HIGH, CILC), [REFER]: createMockParams(HIGH, REFER), [UNLISTED]: createMockParams(HIGH, UNLISTED), + [NO]: createMockParams(HIGH, NO), }, VERY_HIGH: { [YES]: createMockParams(VERY_HIGH, YES), @@ -37,6 +39,7 @@ const params = { [CILC]: createMockParams(VERY_HIGH, CILC), [REFER]: createMockParams(VERY_HIGH, REFER), [UNLISTED]: createMockParams(VERY_HIGH, UNLISTED), + [NO]: createMockParams(VERY_HIGH, NO), }, }; @@ -81,6 +84,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.STANDARD[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${HIGH}`, () => { @@ -123,6 +134,14 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); describe(`when the ESRA classification is ${VERY_HIGH}`, () => { @@ -165,5 +184,13 @@ describe('helpers/map-CIS-countries/map-CIS-country/no-online-support/c-and-d-ra expect(result).toEqual(true); }); }); + + describe.each(params.VERY_HIGH[NO])(`when the short term cover is ${NO}`, (countryObj) => { + it(`should return true for ${countryObj.countryRating}`, () => { + const result = cAndDRatingConditions(countryObj); + + expect(result).toEqual(true); + }); + }); }); }); diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index.ts index 0579bd55b8..43d315ef9c 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-online-support/c-and-d-rating-conditions/index.ts @@ -43,6 +43,10 @@ const cAndDRatingConditions = ({ countryRating, esraClassification, shortTermCov if (shortTermCover === UNLISTED) { return true; } + + if (shortTermCover === NO) { + return true; + } } if (esraClassification === NONE && shortTermCover === NO) { diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.test.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.test.ts index 8097ed7eeb..d0d05442b2 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.test.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.test.ts @@ -5,7 +5,7 @@ const { CIS: { COUNTRY_RATINGS, ESRA_CLASSIFICATION: { VERY_HIGH, HIGH, STANDARD, NONE }, - SHORT_TERM_COVER: { UNLISTED, CILC, NO }, + SHORT_TERM_COVER: { UNLISTED, CILC }, }, } = EXTERNAL_API_DEFINITIONS; @@ -113,18 +113,4 @@ describe('helpers/map-CIS-countries/map-CIS-country/has-no-support', () => { }); }); }); - - describe(`when a country does not meet any other conditions and has shortTermCover as ${NO}`, () => { - it('should return true', () => { - const mockCountry = { - countryRating: COUNTRY_RATINGS.NOT_APPLICABLE, - esraClassification: NONE, - shortTermCover: NO, - }; - - const result = hasNoSupport(mockCountry); - - expect(result).toEqual(true); - }); - }); }); diff --git a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.ts b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.ts index 301f9a6f00..0e8b266cc9 100644 --- a/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.ts +++ b/src/api/helpers/map-CIS-countries/map-CIS-country/has-no-support/index.ts @@ -8,7 +8,7 @@ const { CIS: { COUNTRY_RATINGS: { NOT_APPLICABLE }, ESRA_CLASSIFICATION: { NONE }, - SHORT_TERM_COVER: { UNLISTED, CILC, NO }, + SHORT_TERM_COVER: { UNLISTED, CILC }, }, } = EXTERNAL_API_DEFINITIONS; @@ -37,10 +37,6 @@ const hasNoSupport = ({ countryRating, esraClassification, shortTermCover }: NoI return true; } - if (shortTermCover === NO) { - return true; - } - return false; };