Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(EMS-3972): broker details - based in the uk form fields #3295

Merged
merged 14 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# EXIP Git Hub Actions
#####################################
# Automatic daily dependencies updates
# Automatic dependencies updates
# for the following services:
# 1. NPM
# 2. Docker
Expand All @@ -12,47 +12,53 @@ updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

# `API` package-*.json files
- package-ecosystem: 'npm'
directory: '/src/api'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

# `UI` package-*.json files
- package-ecosystem: 'npm'
directory: '/src/ui'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

# `generate-exip-pricing-grid` package-*.json files
- package-ecosystem: 'npm'
directory: '/generate-exip-pricing-grid'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

# `API` Dockerfile
- package-ecosystem: 'docker'
directory: '/src/api'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

# `UI` Dockerfile
- package-ecosystem: 'docker'
directory: '/src/ui'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'

Expand All @@ -62,6 +68,7 @@ updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
interval: 'monthly'
time: '03:00'
labels:
- 'chore'
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.36.0"
".": "2.36.2"
}
68 changes: 38 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
# Changelog

## [2.36.0](https://github.com/UK-Export-Finance/exip/compare/v2.35.5...v2.36.0) (2024-11-01)
## [2.36.2](https://github.com/UK-Export-Finance/exip/compare/v2.36.1...v2.36.2) (2024-11-13)

### Bug Fixes

### Features
- **EMS-3988:** regenerate api schema ([#3301](https://github.com/UK-Export-Finance/exip/issues/3301)) ([81b382c](https://github.com/UK-Export-Finance/exip/commit/81b382c4039f089101623f2b1a740a1a97ce9797))

## [2.36.1](https://github.com/UK-Export-Finance/exip/compare/v2.36.0...v2.36.1) (2024-11-13)

### Bug Fixes

* **EMS-3767-3768-3781:** business - turnover currency page and check your answers ([#2987](https://github.com/UK-Export-Finance/exip/issues/2987)) ([869054b](https://github.com/UK-Export-Finance/exip/commit/869054b49ce984d928a7a90af911614f38804ca3))
* **EMS-3769-3770-3771-3772-3782:** buyer - split outstanding/overdue and failed payments ([#3012](https://github.com/UK-Export-Finance/exip/issues/3012)) ([00a704b](https://github.com/UK-Export-Finance/exip/commit/00a704b1bbada6f3b274a52305421abbb660c800))
* **EMS-3773-3792:** policy - single contract - credit limit field ([#3026](https://github.com/UK-Export-Finance/exip/issues/3026)) ([ef3edaf](https://github.com/UK-Export-Finance/exip/commit/ef3edafd00a5ed8e956578086159f54b87848c68))
* **EMS-3783-3792:** policy - check/change your answers - credit limit field ([#3029](https://github.com/UK-Export-Finance/exip/issues/3029)) ([76d8bad](https://github.com/UK-Export-Finance/exip/commit/76d8badc3537c1d6a570e918400dd8aaa870d1b5))
* **EMS-3825:** export contract - remove fixed sum amount from the ui ([#3051](https://github.com/UK-Export-Finance/exip/issues/3051)) ([a01d96b](https://github.com/UK-Export-Finance/exip/commit/a01d96b937ddcf94bdb90fb17d4bb861d0931808))
* **EMS-3826-3827:** export contract - agent charges currency - page setup ([#3067](https://github.com/UK-Export-Finance/exip/issues/3067)) ([e059ccc](https://github.com/UK-Export-Finance/exip/commit/e059ccc5310ffb704214bd02439039c6434bbe89))
* **EMS-3826-3829:** export contract - agent charges - user flow ([#3098](https://github.com/UK-Export-Finance/exip/issues/3098)) ([be6a35a](https://github.com/UK-Export-Finance/exip/commit/be6a35a7aca016b80845f53efa9afa4f2bd48abb))
* **EMS-3828-3876:** currency of agent charges - save and back, improve e2e assertions ([#3101](https://github.com/UK-Export-Finance/exip/issues/3101)) ([f9769ee](https://github.com/UK-Export-Finance/exip/commit/f9769ee48e17d7b3284f52a0886eb2b8e987c18c))
* **EMS-3829:** export contract - how much is the agent charging - page setup, validation ([#3072](https://github.com/UK-Export-Finance/exip/issues/3072)) ([42e4c11](https://github.com/UK-Export-Finance/exip/commit/42e4c11f8b52a01db279172bb05277887686d2a7))
* **EMS-3833:** export contract - how much agent is charging - data saving ([#3122](https://github.com/UK-Export-Finance/exip/issues/3122)) ([cd6398b](https://github.com/UK-Export-Finance/exip/commit/cd6398b21f6e7905c1f43ac855af2d26ad332f99))
* **EMS-3851-3852:** export contract - change answers - currency of agent charges ([#3132](https://github.com/UK-Export-Finance/exip/issues/3132)) ([e3fa1ae](https://github.com/UK-Export-Finance/exip/commit/e3fa1ae3adff3be04cff8aaf41e5da902dea4cb8))
* **EMS-3853-54-55:** export contract - agent charges - change answers ([#3142](https://github.com/UK-Export-Finance/exip/issues/3142)) ([3087bed](https://github.com/UK-Export-Finance/exip/commit/3087bed0e2e40fad8d581af7ceeacab315b407ad))
* **EMS-3877-3879:** business - turnover currency - save and back ([#3129](https://github.com/UK-Export-Finance/exip/issues/3129)) ([ff4fcf4](https://github.com/UK-Export-Finance/exip/commit/ff4fcf465c015edd689807be6ade950eca609c7b))
* **EMS-3893:** buyer - currency of late payments - save and back ([#3128](https://github.com/UK-Export-Finance/exip/issues/3128)) ([1a59d47](https://github.com/UK-Export-Finance/exip/commit/1a59d470c2e4f4d1e7c2f333f45137da5861fa10))
- **EMS-3988:** quote tool - type of policy - hint text ([3bd562c](https://github.com/UK-Export-Finance/exip/commit/3bd562ca8df1c85c787137e251f62c4b601d9a45))

## [2.36.0](https://github.com/UK-Export-Finance/exip/compare/v2.35.5...v2.36.0) (2024-11-01)

### Features

- **EMS-3767-3768-3781:** business - turnover currency page and check your answers ([#2987](https://github.com/UK-Export-Finance/exip/issues/2987)) ([869054b](https://github.com/UK-Export-Finance/exip/commit/869054b49ce984d928a7a90af911614f38804ca3))
- **EMS-3769-3770-3771-3772-3782:** buyer - split outstanding/overdue and failed payments ([#3012](https://github.com/UK-Export-Finance/exip/issues/3012)) ([00a704b](https://github.com/UK-Export-Finance/exip/commit/00a704b1bbada6f3b274a52305421abbb660c800))
- **EMS-3773-3792:** policy - single contract - credit limit field ([#3026](https://github.com/UK-Export-Finance/exip/issues/3026)) ([ef3edaf](https://github.com/UK-Export-Finance/exip/commit/ef3edafd00a5ed8e956578086159f54b87848c68))
- **EMS-3783-3792:** policy - check/change your answers - credit limit field ([#3029](https://github.com/UK-Export-Finance/exip/issues/3029)) ([76d8bad](https://github.com/UK-Export-Finance/exip/commit/76d8badc3537c1d6a570e918400dd8aaa870d1b5))
- **EMS-3825:** export contract - remove fixed sum amount from the ui ([#3051](https://github.com/UK-Export-Finance/exip/issues/3051)) ([a01d96b](https://github.com/UK-Export-Finance/exip/commit/a01d96b937ddcf94bdb90fb17d4bb861d0931808))
- **EMS-3826-3827:** export contract - agent charges currency - page setup ([#3067](https://github.com/UK-Export-Finance/exip/issues/3067)) ([e059ccc](https://github.com/UK-Export-Finance/exip/commit/e059ccc5310ffb704214bd02439039c6434bbe89))
- **EMS-3826-3829:** export contract - agent charges - user flow ([#3098](https://github.com/UK-Export-Finance/exip/issues/3098)) ([be6a35a](https://github.com/UK-Export-Finance/exip/commit/be6a35a7aca016b80845f53efa9afa4f2bd48abb))
- **EMS-3828-3876:** currency of agent charges - save and back, improve e2e assertions ([#3101](https://github.com/UK-Export-Finance/exip/issues/3101)) ([f9769ee](https://github.com/UK-Export-Finance/exip/commit/f9769ee48e17d7b3284f52a0886eb2b8e987c18c))
- **EMS-3829:** export contract - how much is the agent charging - page setup, validation ([#3072](https://github.com/UK-Export-Finance/exip/issues/3072)) ([42e4c11](https://github.com/UK-Export-Finance/exip/commit/42e4c11f8b52a01db279172bb05277887686d2a7))
- **EMS-3833:** export contract - how much agent is charging - data saving ([#3122](https://github.com/UK-Export-Finance/exip/issues/3122)) ([cd6398b](https://github.com/UK-Export-Finance/exip/commit/cd6398b21f6e7905c1f43ac855af2d26ad332f99))
- **EMS-3851-3852:** export contract - change answers - currency of agent charges ([#3132](https://github.com/UK-Export-Finance/exip/issues/3132)) ([e3fa1ae](https://github.com/UK-Export-Finance/exip/commit/e3fa1ae3adff3be04cff8aaf41e5da902dea4cb8))
- **EMS-3853-54-55:** export contract - agent charges - change answers ([#3142](https://github.com/UK-Export-Finance/exip/issues/3142)) ([3087bed](https://github.com/UK-Export-Finance/exip/commit/3087bed0e2e40fad8d581af7ceeacab315b407ad))
- **EMS-3877-3879:** business - turnover currency - save and back ([#3129](https://github.com/UK-Export-Finance/exip/issues/3129)) ([ff4fcf4](https://github.com/UK-Export-Finance/exip/commit/ff4fcf465c015edd689807be6ade950eca609c7b))
- **EMS-3893:** buyer - currency of late payments - save and back ([#3128](https://github.com/UK-Export-Finance/exip/issues/3128)) ([1a59d47](https://github.com/UK-Export-Finance/exip/commit/1a59d470c2e4f4d1e7c2f333f45137da5861fa10))

### Bug Fixes

* **EMS-3511:** task list - declarations/submit dependencies ([#2965](https://github.com/UK-Export-Finance/exip/issues/2965)) ([57b5c8f](https://github.com/UK-Export-Finance/exip/commit/57b5c8f5491d3c0671ec44b3af049305e66f23f2))
* **EMS-3659:** declarations - confirmation/acknowledgements - submit button copy ([#2960](https://github.com/UK-Export-Finance/exip/issues/2960)) ([d183d21](https://github.com/UK-Export-Finance/exip/commit/d183d210e1cee28e538f1ec938fd64fb8c5b9f1e))
* **EMS-3755:** fix failing e2e tests ([#2949](https://github.com/UK-Export-Finance/exip/issues/2949)) ([994e19a](https://github.com/UK-Export-Finance/exip/commit/994e19a3c692a4ba88c5f6b406e29af16ad509e5))
* **EMS-3787:** export contract - agent name with an apostrophe ([#2989](https://github.com/UK-Export-Finance/exip/issues/2989)) ([7f64dcf](https://github.com/UK-Export-Finance/exip/commit/7f64dcf4fd244ef8fdc4b634a31a44dccec642a4))
* **EMS-3804:** eligibility - end buyer - error message ([#3049](https://github.com/UK-Export-Finance/exip/issues/3049)) ([3a02b8c](https://github.com/UK-Export-Finance/exip/commit/3a02b8c85f5476d5faa3064f97034aa730b54549))
* **EMS-3822:** your buyer - outstanding/overdue payments - label currencies ([#3048](https://github.com/UK-Export-Finance/exip/issues/3048)) ([c905028](https://github.com/UK-Export-Finance/exip/commit/c905028e9c12138fcf514204ec550502650ba807))
* **EMS-3831:** buyer - outstanding/overdue payments - missing hint text ([#3120](https://github.com/UK-Export-Finance/exip/issues/3120)) ([adedd9a](https://github.com/UK-Export-Finance/exip/commit/adedd9a8594ebd42645de4e2ac5bf2c5a1d1b9eb))
* **EMS-3901:** data migration - requestedCreditLimit column ([#3255](https://github.com/UK-Export-Finance/exip/issues/3255)) ([cf86b8e](https://github.com/UK-Export-Finance/exip/commit/cf86b8e0d6b5876fd8806726e5fb5c769f2a0ca2))
* **EMS-3945:** policy - total contract value - credit limit hint ([#3197](https://github.com/UK-Export-Finance/exip/issues/3197)) ([f562f23](https://github.com/UK-Export-Finance/exip/commit/f562f23e71821155ff04d1132c89ea8fdca8573a))
* **EMS-3959:** multiple contract policy - error message/hint ([c266b2e](https://github.com/UK-Export-Finance/exip/commit/c266b2e7895d7a21ae2d43f413086fb437c5fe21))
- **EMS-3511:** task list - declarations/submit dependencies ([#2965](https://github.com/UK-Export-Finance/exip/issues/2965)) ([57b5c8f](https://github.com/UK-Export-Finance/exip/commit/57b5c8f5491d3c0671ec44b3af049305e66f23f2))
- **EMS-3659:** declarations - confirmation/acknowledgements - submit button copy ([#2960](https://github.com/UK-Export-Finance/exip/issues/2960)) ([d183d21](https://github.com/UK-Export-Finance/exip/commit/d183d210e1cee28e538f1ec938fd64fb8c5b9f1e))
- **EMS-3755:** fix failing e2e tests ([#2949](https://github.com/UK-Export-Finance/exip/issues/2949)) ([994e19a](https://github.com/UK-Export-Finance/exip/commit/994e19a3c692a4ba88c5f6b406e29af16ad509e5))
- **EMS-3787:** export contract - agent name with an apostrophe ([#2989](https://github.com/UK-Export-Finance/exip/issues/2989)) ([7f64dcf](https://github.com/UK-Export-Finance/exip/commit/7f64dcf4fd244ef8fdc4b634a31a44dccec642a4))
- **EMS-3804:** eligibility - end buyer - error message ([#3049](https://github.com/UK-Export-Finance/exip/issues/3049)) ([3a02b8c](https://github.com/UK-Export-Finance/exip/commit/3a02b8c85f5476d5faa3064f97034aa730b54549))
- **EMS-3822:** your buyer - outstanding/overdue payments - label currencies ([#3048](https://github.com/UK-Export-Finance/exip/issues/3048)) ([c905028](https://github.com/UK-Export-Finance/exip/commit/c905028e9c12138fcf514204ec550502650ba807))
- **EMS-3831:** buyer - outstanding/overdue payments - missing hint text ([#3120](https://github.com/UK-Export-Finance/exip/issues/3120)) ([adedd9a](https://github.com/UK-Export-Finance/exip/commit/adedd9a8594ebd42645de4e2ac5bf2c5a1d1b9eb))
- **EMS-3901:** data migration - requestedCreditLimit column ([#3255](https://github.com/UK-Export-Finance/exip/issues/3255)) ([cf86b8e](https://github.com/UK-Export-Finance/exip/commit/cf86b8e0d6b5876fd8806726e5fb5c769f2a0ca2))
- **EMS-3945:** policy - total contract value - credit limit hint ([#3197](https://github.com/UK-Export-Finance/exip/issues/3197)) ([f562f23](https://github.com/UK-Export-Finance/exip/commit/f562f23e71821155ff04d1132c89ea8fdca8573a))
- **EMS-3959:** multiple contract policy - error message/hint ([c266b2e](https://github.com/UK-Export-Finance/exip/commit/c266b2e7895d7a21ae2d43f413086fb437c5fe21))

## [2.35.5](https://github.com/UK-Export-Finance/exip/compare/v2.35.4...v2.35.5) (2024-08-12)


### Bug Fixes

* **EMS-3633:** data migration - xlsx - total contract value ([#2934](https://github.com/UK-Export-Finance/exip/issues/2934)) ([f0bfdba](https://github.com/UK-Export-Finance/exip/commit/f0bfdba5d1b1300018ab67b0224c2dfeb6993e4c))
- **EMS-3633:** data migration - xlsx - total contract value ([#2934](https://github.com/UK-Export-Finance/exip/issues/2934)) ([f0bfdba](https://github.com/UK-Export-Finance/exip/commit/f0bfdba5d1b1300018ab67b0224c2dfeb6993e4c))

## [2.35.4](https://github.com/UK-Export-Finance/exip/compare/v2.35.3...v2.35.4) (2024-08-09)


### Bug Fixes

* **EMS-3633:** data migration - xlsx - eligibility questions ([#2932](https://github.com/UK-Export-Finance/exip/issues/2932)) ([f80ac41](https://github.com/UK-Export-Finance/exip/commit/f80ac410e050353a055ed4d1ca462c7bc96c617c))
- **EMS-3633:** data migration - xlsx - eligibility questions ([#2932](https://github.com/UK-Export-Finance/exip/issues/2932)) ([f80ac41](https://github.com/UK-Export-Finance/exip/commit/f80ac410e050353a055ed4d1ca462c7bc96c617c))

## [2.35.3](https://github.com/UK-Export-Finance/exip/compare/v2.35.2...v2.35.3) (2024-08-09)

Expand Down
2 changes: 2 additions & 0 deletions database/exip.sql
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,9 @@ DROP TABLE IF EXISTS `Broker`;
CREATE TABLE `Broker` (
`id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`application` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`buildingNumberOrName` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`isUsingBroker` tinyint(1) DEFAULT NULL,
`isBasedInUk` tinyint(1) DEFAULT NULL,
`name` varchar(800) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`addressLine1` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`addressLine2` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
Expand Down
5 changes: 2 additions & 3 deletions e2e-tests/commands/insurance/complete-broker-details-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import mockApplication from '../../fixtures/application';
const { BROKER } = mockApplication;

const {
BROKER_DETAILS: { NAME, FULL_ADDRESS },
BROKER_DETAILS: { NAME },
} = POLICY_FIELD_IDS;

const { EMAIL } = ACCOUNT_FIELD_IDS;
Expand All @@ -18,10 +18,9 @@ const { EMAIL } = ACCOUNT_FIELD_IDS;
* @param {String} email: Broker email
* @param {String} fullAddress: Broker's full address
*/
const completeBrokerDetailsForm = ({ name = BROKER[NAME], email = BROKER[EMAIL], fullAddress = BROKER[FULL_ADDRESS] }) => {
const completeBrokerDetailsForm = ({ name = BROKER[NAME], email = BROKER[EMAIL] }) => {
cy.keyboardInput(field(NAME).input(), name);
cy.keyboardInput(field(EMAIL).input(), email);
cy.keyboardInput(field(FULL_ADDRESS).textarea(), fullAddress);
};

export default completeBrokerDetailsForm;
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
import { field as fieldSelector } from '../../../pages/shared';
import { EXPECTED_MULTI_LINE_STRING } from '../../../constants';
import { field } from '../../../pages/shared';
import { POLICY as POLICY_FIELD_IDS } from '../../../constants/field-ids/insurance/policy';
import mockApplication from '../../../fixtures/application';

const {
BROKER_DETAILS: { NAME, EMAIL, FULL_ADDRESS },
BROKER_DETAILS: { NAME, EMAIL },
} = POLICY_FIELD_IDS;

/**
* assertBrokerDetailsFieldValues
* Assert all field values in the "broker details" form.
* @param {String} expectedName: Name
* @param {String} expectedEmail: Email
* @param {String} expectedFullAddress: Full address
*/
const assertBrokerDetailsFieldValues = ({
expectedName = mockApplication.BROKER[NAME],
expectedEmail = mockApplication.BROKER[EMAIL],
expectedFullAddress = EXPECTED_MULTI_LINE_STRING,
}) => {
cy.checkValue(fieldSelector(NAME), expectedName);
cy.checkValue(fieldSelector(EMAIL), expectedEmail);

cy.checkTextareaValue({
fieldId: FULL_ADDRESS,
expectedValue: expectedFullAddress,
});
const assertBrokerDetailsFieldValues = ({ expectedName = mockApplication.BROKER[NAME], expectedEmail = mockApplication.BROKER[EMAIL] }) => {
cy.checkValue(field(NAME), expectedName);
cy.checkValue(field(EMAIL), expectedEmail);
};

export default assertBrokerDetailsFieldValues;
4 changes: 4 additions & 0 deletions e2e-tests/constants/field-ids/insurance/policy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ export const POLICY = {
NAME: 'name',
EMAIL: SHARED.EMAIL,
BROKER_EMAIL: 'broker.email',
// TODO: EMS-3975
FULL_ADDRESS: 'fullAddress',
IS_BASED_IN_UK: 'isBasedInUk',
POSTCODE: 'postcode',
BUILDING_NUMBER_OR_NAME: 'buildingNumberOrName',
},
LOSS_PAYEE: {
IS_APPOINTED: 'isAppointed',
Expand Down
17 changes: 2 additions & 15 deletions e2e-tests/content-strings/fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { FIELD_VALUES } from '../../constants/field-values';
import { LINKS } from '../links';

const { MAX_COVER_PERIOD_MONTHS } = ELIGIBILITY;

const {
POLICY: { TOTAL_MONTHS_OF_COVER },
} = APPLICATION;
Expand Down Expand Up @@ -127,24 +128,10 @@ export const FIELDS = {
VALUE: FIELD_VALUES.POLICY_TYPE.MULTIPLE,
TEXT: 'Multiple contract policy (Revolving credit)',
HINT: [
`Covers multiple contracts with the same buyer, usually for ${TOTAL_MONTHS_OF_COVER} months`,
`Covers multiple contracts with the same buyer, usually for ${TOTAL_MONTHS_OF_COVER.MAXIMUM} months`,
"Best if you'll have an ongoing relationship with the buyer but you're not sure yet how many contracts or sales you'll have",
'You only pay for your insurance each time you declare a new contract or sale - no need to pay before the policy starts',
],
INSET: [
[
{
text: `If you need a policy of over ${TOTAL_MONTHS_OF_COVER} months`,
},
{
text: 'fill in this form',
href: LINKS.EXTERNAL.NBI_FORM,
},
{
text: ' and email it to UKEF.',
},
],
],
},
},
SUMMARY: {
Expand Down
Loading
Loading