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

chore(EMS-4132): broker - confirm address - data checks #3487

Open
wants to merge 2 commits into
base: main-broker-address-lookup
Choose a base branch
from

Conversation

ttbarnes
Copy link
Contributor

Introduction ✏️

This PR updates the "confirm broker address" GET controller so that if a user manually navigates to this route when no address data is available, they will be redirected to the "Broker details" form, where such data can be provided.

Resolution ✔️

  • Add E2E test.
  • Update the GET controller to check for relevant fields and redirect appropriately.

@ttbarnes ttbarnes added enhancement New feature or request chore Chore labels Jan 17, 2025
@ttbarnes ttbarnes self-assigned this Jan 17, 2025
Copy link
Collaborator

@abhi-markan abhi-markan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments to address please.

@@ -32,8 +32,6 @@ context('Insurance - Policy - Broker addresses page - Visit directly without com
});

it(`should redirect to ${BROKER_DETAILS_ROOT}`, () => {
cy.navigateToUrl(url);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the test is not navigating, is it safe for me to assume that the test is already on the brokerDetailsUrl?

beforeEach(() => {
cy.saveSession();

cy.navigateToUrl(url);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are navigating to url then why are we asserting a different url brokerDetailsUrl?

});

describe(`when application.broker has ${FIELD_ID}, no ${POSTCODE} or ${BUILDING_NUMBER_OR_NAME}`, () => {
beforeEach(() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an assertion when there is no BUILDING_NUMBER_OR_NAME but has FIELD_ID and POSTCODE please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants