Add calculator route coverage for near misses and unusual queries

Open Beginner friendly
#1,587 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Domain
testing

Research direction

Start with website/src/__tests__/config/property-tax-relief-routes.test.ts and inspect the existing resolveRoute cases for calculator paths and generated queries. Add coverage for the listed near-miss paths and repeated, empty, and percent-encoded query values, comparing the page rewrite with the host’s trailing-slash redirect. Done when the new assertions pass and routing behavior remains unchanged.

Written by the indexing model from the issue text.

Description

Add calculator route coverage for near misses and unusual queries

The calculator routing tests at 2e30a17 cover exact pages, deep files and assets, but omit /calculators, /calculator-x and /Calculator under /us/rent-and-property-taxes. The generated query cases use one key with a nonempty value and omit repeated keys, empty values and percent-encoded values.

Add these cases through the existing resolveRoute helper, preserving the current routing and query semantics. Assert that near-miss paths do not receive the exact calculator page's added slash. Compare repeated, empty and encoded query values through both the page rewrite and the host's trailing-slash redirect. Track this as optional P3 regression coverage for PR #1570.

Dominant language
HTML
Stars
1
Forks
3
Avg merge
1d 6h
Merged PRs (30d)
113

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-app-v2

All issues in PolicyEngine/policyengine-app-v2

Similar issues

More Testing & QA issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.