Skip to content

Commit

Permalink
chore(EMS-4011-4115): fix/update e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ttbarnes committed Jan 13, 2025
1 parent 9a2ae96 commit 5f427fc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions e2e-tests/commands/insurance/check-policy-summary-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const {
USING_BROKER,
BROKER_DETAILS,
BROKER_ADDRESSES,
BROKER_MANUAL_ADDRESS,
REQUESTED_JOINTLY_INSURED_PARTY: { REQUESTED, COMPANY_NAME, COMPANY_NUMBER, COUNTRY_CODE },
LOSS_PAYEE: { IS_APPOINTED: LOSS_PAYEE_IS_APPOINTED },
LOSS_PAYEE_DETAILS: { NAME: LOSS_PAYEE_NAME },
Expand Down Expand Up @@ -247,6 +248,15 @@ const checkPolicySummaryList = {

cy.assertLength(row.valueHtmlLineBreak(), expectedLineBreaks);
},
[BROKER_MANUAL_ADDRESS.FULL_ADDRESS]: () => {
const fieldId = BROKER_MANUAL_ADDRESS.FULL_ADDRESS;

const { expectedKey, expectedChangeLinkText } = getSummaryListField(fieldId, FIELDS.BROKER_MANUAL_ADDRESS);

const expectedValue = application.BROKER[fieldId];

cy.assertSummaryListRow(summaryList, fieldId, expectedKey, expectedValue, expectedChangeLinkText);
},
[BROKER_DETAILS.EMAIL]: () => {
const fieldId = BROKER_DETAILS.NAME;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {
const {
USING_BROKER,
BROKER_DETAILS: { NAME, EMAIL },
BROKER_ADDRESSES: { SELECT_THE_ADDRESS },
BROKER_MANUAL_ADDRESS: { FULL_ADDRESS },
} = POLICY_FIELD_IDS;

const baseUrl = Cypress.config('baseUrl');
Expand Down Expand Up @@ -57,8 +57,8 @@ context('Insurance - Check your answers - Policy - Multiple contract policy - Wi
checkSummaryList.BROKER[NAME]({});
});

it(`should render a ${SELECT_THE_ADDRESS} summary list row`, () => {
checkSummaryList.BROKER[SELECT_THE_ADDRESS]();
it(`should render a ${FULL_ADDRESS} summary list row`, () => {
checkSummaryList.BROKER[FULL_ADDRESS]();
});

it(`should render a ${EMAIL} summary list row`, () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const {

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

const baseUrl = Cypress.config('baseUrl');
Expand Down Expand Up @@ -56,8 +57,7 @@ context('Insurance - Check your answers - Policy - Single contract policy - With
checkSummaryList.BROKER[NAME]({});
});

// TODO: EMS-3976
it.skip(`should render a ${FULL_ADDRESS} summary list row`, () => {
it(`should render a ${FULL_ADDRESS} summary list row`, () => {
checkSummaryList.BROKER[FULL_ADDRESS]();
});

Expand Down

0 comments on commit 5f427fc

Please sign in to comment.