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

fix(EMS-1693): Application submission - XLSX - dynamic section title row indexes #515

Merged
merged 16 commits into from
Jun 5, 2023

Conversation

ttbarnes
Copy link
Contributor

@ttbarnes ttbarnes commented Jun 2, 2023

This PR updates the config/generation for the XLSX file we send to the underwriting team. This fixes an issue where certain section titles in the XLSX file would be styled incorrectly. This was because we were not accounting for different application states, depending on the submitted answers - we now get the XLSX section title row indexes dynamically depending on the submitted answers:

  1. If the policy type is multiple - the "Policy and exports” section has 1 additional row.
  2. If "using a broker" is true - the “About your business“ section has 3 additional rows.

If any one of these conditions is true, all the proceeding row indexes change because there are new rows.

Changes

  • Update XLSX_CONFIG API constants to:
    • Extract into its own directory.
    • Accept application data.
    • Check certain application conditions (mentioned above), and depending on the answers, change the row indexes.

Other improvements

  • Update "submit application" E2E test to explicitly mention that it's testing a single policy type.
  • Add a new "submit application" E2E test to explicitly test a multiple policy type.
  • Update completeAndSubmitBrokerForm cypress command to accept a usingBroker flag/param and then complete/submit the form appropriately.
  • Update completeSignInAndSubmitAnApplication to accept a policyType flag/param and then complete/submit the "prepare application" sections appropriately.
  • Extract/move ANSWERS API constants and policyType helper function.
  • Update XLSX column height definitions so we have a new constant: LARGE_ADDITIONAL_COLUMN_HEIGHT.

@ttbarnes ttbarnes added bug Something isn't working tech Technical debt/improvements labels Jun 2, 2023
@ttbarnes ttbarnes self-assigned this Jun 2, 2023
@ttbarnes ttbarnes temporarily deployed to qa June 2, 2023 11:57 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 2, 2023 11:57 — with GitHub Actions Inactive
Zainzzkk
Zainzzkk previously approved these changes Jun 5, 2023
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@ttbarnes ttbarnes temporarily deployed to qa June 5, 2023 14:26 — with GitHub Actions Inactive
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
16.6% 16.6% Duplication

@ttbarnes ttbarnes merged commit 9a708c5 into main-application Jun 5, 2023
@ttbarnes ttbarnes deleted the fix/EMS-1693 branch June 5, 2023 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants