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-4054): broker addresses - single address redirection #3475

Merged
merged 13 commits into from
Jan 20, 2025

Conversation

ttbarnes
Copy link
Contributor

@ttbarnes ttbarnes commented Jan 13, 2025

Introduction ✏️

This PR updates the broker address lookup functionality so that if a broker is based in the UK and only one address is returned from Ordnance Survey, the user is redirected (from BROKER_DETAILS) to BROKER_CONFIRM_ADDRESS, instead of BROKER_ADDRESSES.

Otherwise, the user would be selected only one available option from the BROKER_ADDRESSES form.

This PR also updates the "confirm broker address" page to render an address appropriately via a helper function, depending on if the address was entered manually, or obtained via Ordnance Survey.

Resolution ✔️

  • Update the BROKER_ADDRESSES GET controller to map/save data and redirect to BROKER_CONFIRM_ADDRESS if only one address is returned from the API.
  • Rename getChosenOrdnanceSurveyAddress to getOrdnanceSurveyAddressById.
  • Create new getChosenOrdnanceSurveyAddressByIndex helper function.
  • Create new generateBrokerAddressInsetTextHtml helper function.
  • Update E2E tests.
  • Create new cypress command, cy.clickZeroAddressesEnterManuallyLink();.

Miscellaneous ➕

  • Create new E2E constants, ADDRESS_LOOKUP_INPUT_EXAMPLES.
  • E2E improvements, address a TODO comment.

@ttbarnes ttbarnes added enhancement New feature or request feature New functionality labels Jan 13, 2025
@ttbarnes ttbarnes self-assigned this Jan 13, 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.

@ttbarnes ttbarnes merged commit f32ebd8 into main-broker-address-lookup Jan 20, 2025
187 of 188 checks passed
@ttbarnes ttbarnes deleted the feat/EMS-4054 branch January 20, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore documentation Improvements or additions to documentation enhancement New feature or request feature New functionality tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants