-
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.
feat(EMS-3979): broker details - task list logic (#3325)
* feat(EMS-3979): broker details - task list logic * feat(EMS-3979): update required policy fields * chore(e2e): remove irrelevant flag from e2e tests * feat(EMS-3979): fix typo * feat(EMS-3979): fix typo * feat(EMS-3979): fix completePolicySection command * feat(EMS-3979): task list updates * chore(EMS-3979): tidy up * chore(EMS-3979): temporarily disable e2e test * chore(EMS-3979): add missing fields to prepare application required fields * chore(EMS-3979): fix typo
- Loading branch information
Showing
50 changed files
with
431 additions
and
105 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
e2e-tests/commands/insurance/complete-and-submit-broker-addresses-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* completeAndSubmitBrokerAddressesForm | ||
* Complete and submit "broker addresses" form | ||
* @param {String} optionValue: Address option value | ||
*/ | ||
const completeAndSubmitBrokerAddressesForm = ({ optionValue }) => { | ||
cy.completeBrokerAddressesForm({ optionValue }); | ||
|
||
cy.clickSubmitButton(); | ||
}; | ||
|
||
export default completeAndSubmitBrokerAddressesForm; |
2 changes: 1 addition & 1 deletion
2
e2e-tests/commands/insurance/complete-and-submit-broker-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
2 changes: 1 addition & 1 deletion
2
e2e-tests/commands/insurance/complete-and-submit-loss-payee-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
19 changes: 19 additions & 0 deletions
19
e2e-tests/commands/insurance/complete-broker-addresses-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { radios } from '../../pages/shared'; | ||
import { POLICY as POLICY_FIELD_IDS } from '../../constants/field-ids/insurance/policy'; | ||
|
||
const { | ||
BROKER_ADDRESSES: { SELECT_THE_ADDRESS: FIELD_ID }, | ||
} = POLICY_FIELD_IDS; | ||
|
||
/** | ||
* completeBrokerAddressesForm | ||
* Complete "broker addresses" form | ||
* @param {String} optionValue: Address option value | ||
*/ | ||
const completeBrokerAddressesForm = ({ optionValue = 'BRITISH BROADCASTING CORPORATION WOGAN HOUSE PORTLAND PLACE' }) => { | ||
const optionId = `${FIELD_ID}-${optionValue}`; | ||
|
||
radios(optionId).option.label().click(); | ||
}; | ||
|
||
export default completeBrokerAddressesForm; |
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
2 changes: 1 addition & 1 deletion
2
...tests/commands/insurance/your-buyer/complete-and-submit-connection-with-the-buyer-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
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
3 changes: 2 additions & 1 deletion
3
...-multiple-policy-type-with-broker.spec.js → ...licy-type-with-broker-based-in-uk.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
34 changes: 34 additions & 0 deletions
34
...conditions/submit-an-application-multiple-policy-type-with-broker-not-based-in-uk.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,34 @@ | ||
import { APPLICATION } from '../../../../../../../constants'; | ||
|
||
context( | ||
'Insurance - submit an application - Multiple policy type with a broker - not based in UK - As an Exporter, I want to submit my completed credit insurance application, So that UKEF can process and make a decision on my application', | ||
() => { | ||
let referenceNumber; | ||
|
||
before(() => { | ||
cy.completeSignInAndSubmitAnApplication({ | ||
policyType: APPLICATION.POLICY_TYPE.MULTIPLE, | ||
usingBroker: true, | ||
brokerIsBasedInUk: false, | ||
}).then((refNumber) => { | ||
referenceNumber = refNumber; | ||
}); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.saveSession(); | ||
}); | ||
|
||
after(() => { | ||
cy.deleteApplication(referenceNumber); | ||
}); | ||
|
||
it('should successfully submit the application and redirect to `application submitted`', () => { | ||
cy.assertApplicationSubmittedUrl(referenceNumber); | ||
}); | ||
|
||
it('should render in a `submitted` state in the dashboard', () => { | ||
cy.assertDashboardApplicationSubmitted(referenceNumber); | ||
}); | ||
}, | ||
); |
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
7 changes: 5 additions & 2 deletions
7
...on-single-policy-type-with-broker.spec.js → ...licy-type-with-broker-based-in-uk.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
Oops, something went wrong.