-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3458 from UK-Export-Finance/chore/EMS-4097
chore(EMS-4097): merge main-country-risk-logic into main
- Loading branch information
Showing
97 changed files
with
2,529 additions
and
1,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
e2e-tests/commands/shared-commands/eligibility/complete-and-submit-buyer-country-form.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,96 @@ | ||
export const XAD = { | ||
NAME: 'Abu Dhabi', | ||
ISO_CODE: 'XAD', | ||
export const AGO = { | ||
NAME: 'Angola', | ||
ISO_CODE: 'AGO', | ||
}; | ||
|
||
export const ARG = { | ||
NAME: 'Argentina', | ||
ISO_CODE: 'AGO', | ||
}; | ||
|
||
export const BRA = { | ||
NAME: 'Brazil', | ||
ISO_CODE: 'BRA', | ||
}; | ||
|
||
export const DZA = { | ||
NAME: 'Algeria', | ||
ISO_CODE: 'DZA', | ||
}; | ||
|
||
export const AGO = { | ||
NAME: 'Angola', | ||
ISO_CODE: 'AGO', | ||
export const ERI = { | ||
NAME: 'Eritrea', | ||
ISO_CODE: 'ERI', | ||
}; | ||
|
||
export const FRA = { | ||
NAME: 'France', | ||
ISO_CODE: 'FRA', | ||
}; | ||
|
||
export const BRA = { | ||
NAME: 'Brazil', | ||
ISO_CODE: 'BRA', | ||
export const GBR = { | ||
NAME: 'United Kingdom', | ||
ISO_CODE: 'GBR', | ||
}; | ||
|
||
export const AFG = { | ||
NAME: 'Afghanistan', | ||
ISO_CODE: 'AFG', | ||
export const IOT = { | ||
NAME: 'British Indian Ocean Territory', | ||
ISO_CODE: 'IOT', | ||
}; | ||
|
||
export const AUS = { | ||
NAME: 'Australia', | ||
ISO_CODE: 'AUS', | ||
export const NCL = { | ||
NAME: 'New Caledonia', | ||
ISO_CODE: 'NCL', | ||
}; | ||
|
||
export const BLR = { | ||
NAME: 'Belarus', | ||
ISO_CODE: 'BLR', | ||
export const TN = { | ||
NAME: 'Tunisia', | ||
ISO_CODE: 'TN', | ||
}; | ||
|
||
export const RUS = { | ||
NAME: 'Russia', | ||
ISO_CODE: 'RUS', | ||
export const XAD = { | ||
NAME: 'Abu Dhabi', | ||
ISO_CODE: 'XAD', | ||
}; | ||
|
||
export const MMR = { | ||
NAME: 'Burma', | ||
ISO_CODE: 'MMR', | ||
}; | ||
const mockCountries = [DZA, FRA, AGO, GBR, XAD, BRA]; | ||
|
||
export const GBR = { | ||
NAME: 'United Kingdom', | ||
ISO_CODE: 'GBR', | ||
}; | ||
const ONLINE_SUPPORT_1 = DZA; | ||
|
||
const NO_ONLINE_SUPPORT_1 = FRA; | ||
const NO_ONLINE_SUPPORT_2 = AGO; | ||
const NO_ONLINE_SUPPORT_3 = ARG; | ||
const NO_ONLINE_SUPPORT_4 = TN; | ||
|
||
const mockCountries = [XAD, AFG, DZA, AGO, AUS, BLR, BRA, MMR, FRA, RUS, GBR]; | ||
const NOT_SUPPORTED_1 = GBR; | ||
const NOT_SUPPORTED_2 = ERI; | ||
const NOT_SUPPORTED_3 = IOT; | ||
const NOT_SUPPORTED_4 = NCL; | ||
|
||
/** | ||
* COUNTRY_QUOTE_SUPPORT | ||
* Different types of country support for a quote. | ||
*/ | ||
const { 2: QUOTE_ONLINE, 3: QUOTE_BY_EMAIL, 8: QUOTE_UNSUPPORTED } = mockCountries; | ||
|
||
export const COUNTRY_QUOTE_SUPPORT = { | ||
ONLINE: QUOTE_ONLINE, | ||
BY_EMAIL: QUOTE_BY_EMAIL, | ||
UNSUPPORTED: QUOTE_UNSUPPORTED, | ||
ONLINE_SUPPORT_1, | ||
NO_ONLINE_SUPPORT_1, | ||
NOT_SUPPORTED_1, | ||
}; | ||
|
||
/** | ||
* COUNTRY_APPLICATION_SUPPORT | ||
* Different types of country support for an application | ||
*/ | ||
const { | ||
2: APPLICATION_ONLINE, | ||
3: APPLICATION_BY_EMAIL, | ||
8: APPLICATION_NO_SHORT_TERM_COVER_1, | ||
4: APPLICATION_NO_SHORT_TERM_COVER_2, | ||
1: APPLICATION_UNSUPPORTED_1, | ||
5: APPLICATION_UNSUPPORTED_2, | ||
7: APPLICATION_UNSUPPORTED_3, | ||
9: APPLICATION_UNSUPPORTED_4, | ||
} = mockCountries; | ||
|
||
export const COUNTRY_APPLICATION_SUPPORT = { | ||
ONLINE: APPLICATION_ONLINE, | ||
BY_EMAIL: APPLICATION_BY_EMAIL, | ||
UNSUPPORTED_1: APPLICATION_UNSUPPORTED_1, | ||
UNSUPPORTED_2: APPLICATION_UNSUPPORTED_2, | ||
UNSUPPORTED_3: APPLICATION_UNSUPPORTED_3, | ||
UNSUPPORTED_4: APPLICATION_UNSUPPORTED_4, | ||
NO_SHORT_TERM_COVER_1: APPLICATION_NO_SHORT_TERM_COVER_1, | ||
NO_SHORT_TERM_COVER_2: APPLICATION_NO_SHORT_TERM_COVER_2, | ||
ONLINE_SUPPORT_1, | ||
NO_ONLINE_SUPPORT_1, | ||
NO_ONLINE_SUPPORT_2, | ||
NO_ONLINE_SUPPORT_3, | ||
NO_ONLINE_SUPPORT_4, | ||
NOT_SUPPORTED_1, | ||
NOT_SUPPORTED_2, | ||
NOT_SUPPORTED_3, | ||
NOT_SUPPORTED_4, | ||
}; | ||
|
||
export default mockCountries; |
46 changes: 46 additions & 0 deletions
46
...ce/cypress/e2e/journeys/eligibility/buyer-country/buyer-country-no-online-support.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { INSURANCE_ROUTES } from '../../../../../../constants/routes/insurance'; | ||
import { COUNTRY_APPLICATION_SUPPORT } from '../../../../../../fixtures/countries'; | ||
|
||
const { | ||
ELIGIBILITY: { TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT }, | ||
} = INSURANCE_ROUTES; | ||
|
||
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; | ||
|
||
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', | ||
() => { | ||
beforeEach(() => { | ||
cy.saveSession(); | ||
|
||
cy.completeAndSubmitEligibilityForms({ stopSubmittingAfter: 'companyDetails' }); | ||
}); | ||
|
||
describe(COUNTRY_NAME_1, () => { | ||
it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { | ||
cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_1, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); | ||
}); | ||
}); | ||
|
||
describe(COUNTRY_NAME_2, () => { | ||
it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { | ||
cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_2, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); | ||
}); | ||
}); | ||
|
||
describe(COUNTRY_NAME_3, () => { | ||
it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { | ||
cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_3, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); | ||
}); | ||
}); | ||
|
||
describe(COUNTRY_NAME_4, () => { | ||
it(`should redirect to ${TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT} exit page`, () => { | ||
cy.enterCountryAndAssertExitPageUrlBuyerCountry(COUNTRY_NAME_4, TALK_TO_AN_EXPORT_FINANCE_MANAGER_EXIT); | ||
}); | ||
}); | ||
}, | ||
); |
Oops, something went wrong.