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

[FSADT1-999] Add birth date to frontend #643

Merged
merged 24 commits into from
Nov 30, 2023
Merged

Conversation

fterra-encora
Copy link
Collaborator

@fterra-encora fterra-encora commented Nov 29, 2023

Description

  • Adds a date input component as specified;
  • Adds validation rules;
  • Adds the birth date field to the frontend.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • New unit tests
  • New integrated tests
  • New component tests
  • New end-to-end tests
  • New user flow tests
  • No new tests are required
  • Manual tests (description below)

Checklist

  • I have read the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have already been accepted and merged

Further comments


Thanks for the PR!

Any successful deployments (not always required) will be available below.
Backend available
Frontend available
Legacy available

Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow

@github-actions github-actions bot added javascript Pull requests that update Javascript code source source code changes frontend labels Nov 29, 2023
Copy link
Contributor

github-actions bot commented Nov 29, 2023

Current changelog

Bug Fixes

  • adjust validations and events (fdf581a)
  • always revalidate day (173f3e2)
  • disable the next button properly (f4c2e94)
  • issue after returning to the step containing the date (8b74cba)
  • make complexity of regex linear (2822592)
  • prevent highlighting all parts on error (039d6fb)
  • revalidate everything on revalidate-bus (0879deb)

Features

  • add a date input component (ab5eed9)
  • add birthdate label (6404304)
  • add business validations (2b67458)
  • add condition for displaying the birthdate (062f910)
  • add the date of birth to the form (a87655a)
  • apply text mask (c084b59)
  • auto-move to next date part (35cdcd6)
  • perform conditional validation (ccbf063)
  • replace some messages (3300c25)

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@github-actions github-actions bot added the tests test classes changes label Nov 29, 2023
Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@fterra-encora fterra-encora marked this pull request as ready for review November 30, 2023 20:03
Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Fixes the security risk pointed by sonarcloud.
Moves from `DateValidator` to props for part-specific business validations.
Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Copy link
Contributor

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

Copy link

sonarcloud bot commented Nov 30, 2023

[forest-client-frontend] 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

83.8% 83.8% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

Frontend unit Test Coverage

Coverage after merging feat/fe/FSADT1-999 into main will be
47.27%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   App.vue48.39%50%0%68.42%108, 36, 39–40, 44, 52–53, 62
   directivesMap.ts100%100%100%100%
src/components
   DataFetcher.vue85%60%83.33%95.83%33–35, 50, 55
   MainHeaderComponent.vue79.69%76.56%58.33%88.46%100, 107, 111, 122, 124, 134, 136, 147, 173, 176, 185, 201, 217, 217, 217, 230, 249, 41, 50–51, 55
   UserProfileComponent.vue80%33.33%100%85.71%17, 17, 19, 23
src/components/forms
   AutoCompleteInputComponent.vue75.38%58.54%80.95%83.82%110–111, 127, 132–133, 201, 46, 59, 61, 61, 61, 61, 61–63, 65, 65, 65–67, 77, 80, 80, 80, 80, 80, 82, 84
   DropdownInputComponent.vue89.11%83.87%83.33%94.23%111, 136, 152, 67, 81, 81, 81–82
   MultiselectInputComponent.vue91.49%87.50%85.71%95.92%100, 109, 122, 80, 89
   RadioInputComponent.vue88.46%91.67%75%92.86%38, 43, 82
   ReadOnlyComponent.vue66.67%100%100%66.67%2
   TextInputComponent.vue86.49%77.27%84.62%92.31%122–123, 130, 55, 84, 89–90, 98
src/components/forms/DateInputComponent
   DateInputPart.vue8.70%0%0%15.38%16, 21, 23, 25, 27, 31, 37, 39, 46, 46, 50, 50, 57, 57, 57–58, 58, 58, 8
   common.ts100%100%100%100%
   index.vue2.60%0%0%4.70%102, 102, 102–104, 104, 104, 110, 110, 110, 110–111, 113, 116, 116, 116, 118, 124, 124, 124, 124, 124–125, 128, 131–133, 136, 142, 144–145, 145, 145, 148, 150–152, 154, 156–157, 157, 157, 157, 159–160, 160, 160, 160, 163, 165, 167–170, 173–178, 178, 178, 178, 178–181, 181, 181–182, 185, 189–190, 194–197, 199, 199, 199–200, 203–204, 208–209, 209, 209, 211, 211, 211–212, 214, 214, 214–215, 218–219, 221, 224, 230, 236, 242, 25, 265, 265, 265–266, 268, 271, 271, 271, 271, 271–272, 274, 285, 285, 285–286, 286, 286–287, 287, 287, 289, 289, 289–290, 293–296, 298, 300, 300, 300–301, 301, 301, 305, 308, 308, 308–309, 311, 314–316, 318–322, 325–326, 329, 329, 329–331, 333–334, 336–337, 339, 339, 339–340, 345, 350, 352, 358, 360–366, 366, 366–368, 368, 368–371, 371, 371–372, 378–380, 382, 388, 428, 428–429, 429, 429, 438, 438–439, 439, 439, 448, 448–449, 449, 449, 456, 456, 462, 462, 468, 468, 50, 72, 72, 72, 74, 76, 82, 88, 97, 97, 97–99
src/components/grouping
   AddressGroupComponent.vue1.22%0%0%2.73%104–105, 107, 107, 107, 111–112, 114–115, 115, 115, 115, 117, 124, 131, 140–141, 141, 141, 141, 143, 145, 147, 151, 153–154, 154, 154–155, 155, 155, 155, 157, 159, 161, 164, 168–169, 169, 169, 169, 171, 173, 175, 179–180, 180, 180, 183, 185–186, 186–187, 187, 189, 19, 192, 194–196, 196, 196, 196, 196–198, 206, 208–209, 212, 214, 219–220, 220, 220–225, 225, 225–227, 230, 234–235, 235, 235–236, 247, 247, 247, 254, 254, 254–255, 255, 255–256, 256, 268, 268, 268, 270, 270, 270, 274, 274, 274, 28, 285, 285, 285–286, 286, 292, 292, 292, 294, 294, 294–295, 295, 295, 297, 297, 304, 304, 304, 312, 312, 312–313, 313, 313, 317, 317, 317, 333, 333, 333–334, 334, 334, 34, 345, 345, 345, 348, 348,

Copy link
Contributor

Frontend component Test Coverage

Coverage after merging feat/fe/FSADT1-999 into main will be
91.86%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   App.vue100%100%100%100%
   CoreConstants.ts100%100%100%100%
   directivesMap.ts100%100%100%100%
   main.ts100%100%100%100%
   routes.ts100%100%100%100%
   shims-vue.d.ts100%100%100%100%
src/components
   DataFetcher.vue96.97%80%100%100%33
   MainHeaderComponent.vue100%100%100%100%
   UserProfileComponent.vue100%100%100%100%
src/components/forms
   AutoCompleteInputComponent.vue93.04%94.12%85%95.08%40, 45, 67, 79, 82
   DropdownInputComponent.vue89.02%87.50%82.35%92.68%111, 135, 152, 81, 81–82
   MultiselectInputComponent.vue89.61%84.21%85%94.74%108, 122, 47, 88, 99
   RadioInputComponent.vue100%100%100%100%
   ReadOnlyComponent.vue100%100%100%100%
   TextInputComponent.vue90%86.67%83.33%93.94%123, 138, 54, 98
src/components/forms/DateInputComponent
   DateInputPart.vue100%100%100%100%
   common.ts100%100%100%100%
   index.vue100%100%100%100%
src/components/grouping
   AddressGroupComponent.vue89.38%90.36%90.48%88.12%115, 131, 141, 147, 154–155, 155, 155, 155, 157, 159, 161, 169, 175, 208–209, 225, 274, 317, 354
   ContactGroupComponent.vue91.06%95.56%90%87.50%100, 136, 208, 215, 84, 91, 99, 99
   ErrorNotificationGroupingComponent.vue100%100%100%100%
src/composables
   useFetch.ts100%100%100%100%
   useFocus.ts100%100%100%100%
   useScreenSize.ts100%100%100%100%
   useSvg.ts100%100%100%100%
src/dto
   ApplyClientNumberDto.ts100%100%100%100%
   CommonTypesDto.ts100%100%100%100%
src/helpers
   CustomDirectives.ts100%100%100%100%
   DataConversors.ts100%100%100%100%
   ForestClientUserSession.ts100%100%100%100%
src/helpers/validators
   BCeIDFormValidations.ts100%100%100%100%
   GlobalValidators.ts100%100%100%100%
   SubmissionValidators.ts100%100%100%100%
src/pages
   ErrorPage.vue100%100%100%100%
   FormBCSCPage.vue100%100%100%100%
   FormBCeIDPage.vue100%100%100%100%
   FormSubmittedPage.vue100%100%100%100%
   LandingPage.vue100%100%100%100%
   NotFoundPage.vue100%100%100%100%
   SubmissionListPage.vue100%100%100%100%
   SubmissionReviewPage.vue100%100%100%100%
   UserLoadingPage.vue100%100%100%100%
src/pages/bceidform
   AddressWizardStep.vue100%100%100%100%
   BusinessInformationWizardStep.vue100%100%100%100%
   ContactWizardStep.vue100%100%100%100%
   ReviewWizardStep.vue100%100%100%100%
src/services
   ForestClientService.ts100%100%100%100%

Copy link
Contributor

Frontend e2e Test Coverage

Coverage after merging feat/fe/FSADT1-999 into main will be
57.46%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   App.vue45.83%100%0%66.67%39–40, 44, 52–53
   CoreConstants.ts100%100%100%100%
   directivesMap.ts100%100%100%100%
   main.ts100%100%100%100%
   routes.ts100%100%100%100%
   shims-vue.d.ts100%100%100%100%
src/components
   DataFetcher.vue96.97%80%100%100%33
   MainHeaderComponent.vue38%40%8.33%44.19%118, 125, 133, 148, 150, 173, 173–174, 174–175, 175, 178, 178, 185, 185, 185, 196, 199, 216, 216, 216, 229, 248, 41, 41–42, 50, 50, 50, 50–51, 53–55, 55–56, 56, 56–57, 59, 66–67, 70–72, 81, 87, 87, 87–88, 90
   UserProfileComponent.vue0%0%0%0%11, 17, 17, 17, 17, 19, 21, 23, 4
src/components/forms
   AutoCompleteInputComponent.vue93.91%97.06%85%95.08%45, 67, 79, 82
   DropdownInputComponent.vue89.02%87.50%82.35%92.68%111, 135, 152, 81, 81–82
   MultiselectInputComponent.vue89.61%84.21%85%94.74%108, 122, 47, 88, 99
   RadioInputComponent.vue88.10%80%80%95.45%37, 48, 82
   ReadOnlyComponent.vue0%100%100%0%2
   TextInputComponent.vue90%86.67%83.33%93.94%123, 138, 54, 98
src/components/forms/DateInputComponent
   DateInputPart.vue90%71.43%100%100%45, 63
   common.ts100%100%100%100%
   index.vue83.70%77.27%92.31%85.19%104, 113, 116, 118, 132, 144, 199, 214, 221, 265–266, 271–272, 285–287, 289–290, 300, 300, 305, 319–322, 329–331, 333–334, 336–337, 339, 339–340
src/components/grouping
   AddressGroupComponent.vue89.38%90.36%90.48%88.12%115, 131, 141, 147, 154–155, 155, 155, 155, 157, 159, 161, 169, 175, 208–209, 225, 274, 317, 354
   ContactGroupComponent.vue91.06%95.56%90%87.50%100, 136, 208, 215, 84, 91, 99, 99
   ErrorNotificationGroupingComponent.vue35.59%8.70%57.14%51.72%111, 117, 117, 117, 122, 135, 135, 139, 151, 175, 175, 175, 178, 178, 30–31, 31, 34, 58, 58, 58, 63, 63–64, 64, 64, 66–67, 67, 69, 73–74, 74, 76, 90
src/composables
   useFetch.ts100%100%100%100%
   useFocus.ts100%100%100%100%
   useScreenSize.ts100%100%100%100%
   useSvg.ts100%100%100%100%
src/dto
   ApplyClientNumberDto.ts100%100%100%100%
   CommonTypesDto.ts100%100%100%100%
src/helpers
   CustomDirectives.ts100%100%100%100%
   DataConversors.ts100%100%100%100%
   ForestClientUserSession.ts100%100%100%100%
src/helpers/validators
   BCeIDFormValidations.ts100%100%100%100%
   GlobalValidators.ts100%100%100%100%
   SubmissionValidators.ts100%100%100%100%
src/pages
   ErrorPage.vue0%100%100%0%11–12
   FormBCSCPage.vue0%0%0%0%114–116, 122, 122, 150, 150, 150, 186, 186, 186, 239–241, 243, 246, 246–247, 247–248, 248, 252, 254, 260, 260, 260, 262, 264–267, 270, 276, 276, 288, 290, 295–296, 299–300, 311, 315, 317–319, 324–326, 328, 331–332, 332–334, 337, 337–339, 341, 344, 346–350, 359, 361–362, 362–363, 363, 363, 365–367, 37, 37, 37, 370, 374, 378–379, 379–380, 384–385, 385, 385, 391, 396–397, 399, 401–402, 402, 402, 407, 416, 420, 422, 443, 445, 449, 453, 455–457, 457–458, 462, 462–463, 473, 475, 479, 484, 487, 487–488, 488–489, 489, 494–496, 498, 498–501, 505–506, 506–507, 511–512, 512, 512, 515, 521, 84, 84, 84, 91, 91, 91–92, 92, 92
   FormBCeIDPage.vue52.55%47.06%36.67%61.22%109–111, 118, 118–119, 124, 124, 124, 127, 133, 239–240, 250, 260–261, 261, 261, 261, 261, 261–264, 279, 279–284, 298, 298–299, 303, 303–304, 304–305, 305, 311, 317–318, 320, 320–322, 327–328, 335, 340–344, 354, 354, 356–358, 430, 460, 460, 460, 477, 477, 477, 525, 549, 67–69, 95, 98
   FormSubmittedPage.vue0%0%0%0%11–12, 15, 31, 31, 31, 33, 9
   LandingPage.vue66.67%60%100%75%18, 18–19
   SubmissionListPage.vue0%0%0%0%103–105, 137, 23, 26–28, 31–34, 37–38, 41–42, 42–43, 46, 46, 46, 49–51, 54–55, 55, 55, 55, 55, 57, 59, 61, 63, 67–69, 69, 72–73, 75–76, 79–82, 82, 82–83, 85, 88, 91–92, 92–93, 96–97, 97, 97, 97–99
   SubmissionReviewPage.vue0%0%0%0%102, 104–106, 114, 114–115, 115, 121–122, 122–125,

@fterra-encora fterra-encora merged commit 72f549f into main Nov 30, 2023
18 checks passed
@fterra-encora fterra-encora deleted the feat/fe/FSADT1-999 branch November 30, 2023 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend javascript Pull requests that update Javascript code source source code changes tests test classes changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants