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-3385): no PDF - policy - nullify data when changing policy type #2500

Merged
merged 10 commits into from
Jun 4, 2024

Conversation

ttbarnes
Copy link
Contributor

Introduction ✏️

This PR fixes an issue where, when changing the policy type from "single" to "multiple" (or vice versa), certain "single" or "multiple" specific policy data would not be wiped.

Resolution ✔️

  • Create new cypress commands:
    • changePolicyTypeToSingleAndSubmitContractPolicyForm
    • assertCurrencyFormFieldsAreEmpty
    • assertEmptyContractCompletionDateFieldValues
    • assertEmptyRequestedStartDateFieldValues
  • Add an E2E test for changing the policy type from "multiple" to "single", then back to "multiple".
  • Add an E2E test for changing the policy type from "single" to "multiple" then back to "single".
  • Update mapAndSave.policy to pass application to mapSubmittedData.
  • Split up policy data saving mapping functions into their own files/functions:
    • mapDateFields
    • nullifyGenericContractPolicyFields
    • nullifyMultipleContractPolicyFields
    • nullifySingleContractPolicyFields
  • Update saveData.policy to not strip empty form fields.
  • Create new helper function to determine if a policy type has changed, hasPolicyTypeChanged.

Miscellaneous ➕

  • Fix some linting issues.
  • Minor documentation improvements.

@ttbarnes ttbarnes added bug Something isn't working documentation Improvements or additions to documentation tech Technical debt/improvements chore Chore fix Fixes an existing issue labels May 31, 2024
@ttbarnes ttbarnes self-assigned this May 31, 2024
@ttbarnes ttbarnes merged commit 55424cf into main-application-no-pdf Jun 4, 2024
161 checks passed
@ttbarnes ttbarnes deleted the fix/EMS-3385 branch June 4, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Chore documentation Improvements or additions to documentation fix Fixes an existing issue tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants