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(webform): Adjust noGapsOrOverlaps validation per feedback #802

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

charmcitygavin
Copy link
Collaborator

Purpose

This PR updates the noGapsOrOverlaps validation rule based on HCD feedback.

Previous Behavior:

  • When age range 1 was 0-2 and age range 2 was 3-4, this was not considered a gap.
  • When age range 2 was 0-2 and age range 2 was 2-4, this was considered an overlap.

New Behavior:

  • Overlap rule changed: When age range 1 is 0-2 and age range 2 is 2-4, this is no longer considered an overlap.
  • Gap rule changed: When age range 1 is 0-2 and age range 2 is 3-4, this is now considered a gap.

Linked Issues to Close

Closes OY2-30287

Approach

The change was made by adjusting the noGapsOrOverlaps validation rule in additionalRules.ts.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 62.31% 4533 / 7274
🔵 Statements 61.94% 4802 / 7752
🔵 Functions 54.56% 1237 / 2267
🔵 Branches 33.66% 867 / 2575
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
react-app/src/components/RHF/tests/additionalRules.test.ts 93.93% 50% 100% 100% 42, 72, 103, 130
react-app/src/components/RHF/utils/additionalRules.ts 61.42% 60.93% 53.33% 59.09% 7-8, 15-19, 16-18, 26-27, 29-33, 30, 32, 64, 127, 131-160, 134-135, 137-139, 138, 141-142, 142, 144-146, 145, 148, 150-152, 151, 154-157, 162
Generated in workflow #342 for commit 0e18359 by the Vitest Coverage Report Action

@charmcitygavin charmcitygavin self-assigned this Oct 7, 2024
Copy link

codeclimate bot commented Oct 8, 2024

Code Climate has analyzed commit 0e18359 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 62.3% (0.2% change).

View more on Code Climate.

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.

2 participants