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

vebt-1009: 22-10216 - Added validation for calculation date. #34677

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fatmakhan0395
Copy link
Contributor

@fatmakhan0395 fatmakhan0395 commented Feb 13, 2025

Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.

Are you removing, renaming or moving a folder in this PR?

  • No, I'm not changing any folders (skip to TeamSites and delete the rest of this section)
  • Yes, I'm removing, renaming or moving a folder

If the folder you changed contains a manifest.json, search for its entryName in the content-build registry.json (the entryName there will match).

If an entry for this folder exists in content-build and you are:

  1. Deleting a folder:

    1. First search vets-website for all instances of the entryName in your manifest.json and remove them in a separate PR. Look particularly for references in src/applications/static-pages/static-pages-entry.js and src/platform/forms/constants.js. If you do not do this, other applications will break!
      • Add the link to your merged vets-website PR here
    2. Then, Delete the application entry in registry.json and merge that PR before this one
      • Add the link to your merged content-build PR here
  2. Renaming or moving a folder: Update the entry in the registry.json, but do not merge it until your vets-website changes here are merged. The content-build PR must be merged immediately after your vets-website change is merged in to avoid CI errors with content-build (and Tugboat).

⚠️ TeamSites ⚠️

Examples of a TeamSite: https://va.gov/health and https://benefits.va.gov/benefits/. This scenario is also referred to as the "injected" header and footer. You can reach out in the #sitewide-public-websites Slack channel for questions.

Did you change site-wide styles, platform utilities or other infrastructure?

Summary

  • Added validation for calculation date

  • Added Unit tests

  • Added cypress test

  • (Summarize the changes that have been made to the platform)

  • (If bug, how to reproduce)

  • (What is the solution, why is this the solution)

  • (Which team do you work for, does your team own the maintenance of this component?)

  • (If using a flipper, what is the end date of the flipper being required/success criteria being targeted)

Related issue(s)

As a...

VEBT Developer

I want…

To update calendar day submission check

So that…

When users submits beyond 30 period, correct error message is thrown

Acceptance Criteria

If the user enters a date of calculation that is not within 30 calendar days from the term start date, the system should throw an error message that reads:
"The calculation date is more than 30 days from the term start date. Please enter a valid date within the timeframe."

For example, if the user enters a term start date in April and then selects a calculation date of 10/31, this would exceed the 30-day limit and trigger the error. I’ve provided wireframes to illustrate this particular use case.

Technical Details:

Dependencies:

Feature Flag needed: Yes

Demo needed: No

UAT needed: No

Additional Notes:

Testing Details:

  • Link to ticket created in va.gov-team repo
  • https://jira.devops.va.gov/browse/VEBT-1009
    department-of-veterans-affairs/va.gov-team#0000
  • Link to previous change of the code/bug (if applicable)
    department-of-veterans-affairs/vets-website#0000
  • Link to epic if not included in ticket
    department-of-veterans-affairs/va.gov-team#0000

Testing done

  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected
  • Describe the tests completed and the results
  • _Exclusively stating 'Specs and automated tests passing' is NOT acceptable as appropriate testing
  • Optionally, provide a link to your test plan and test execution records

Screenshots

Desktop:

image

Mobile:

image

Note: This field is mandatory for UI changes (non-component work should NOT have screenshots).

Before After
Mobile
Desktop

What areas of the site does it impact?

(Describe what parts of the site are impacted if code touched other areas)

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.
  • Events are being sent to the appropriate logging solution
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)

Authentication

  • Did you login to a local build and verify all authenticated routes work as expected with a test user

Requested Feedback

(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@fatmakhan0395 fatmakhan0395 marked this pull request as ready for review February 13, 2025 17:46
@fatmakhan0395 fatmakhan0395 requested review from a team as code owners February 13, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants