Repository navigation
Test the ranked choice results page and signup preview; fix reason filter - #12112
Merged
Merged
Conversation
…lter - RankedChoiceSignupDecisionsPage: the reason filter used the integer array codec, but reasons are enum names (CONFLICT, FULL, ...), so a reason filter in the URL decoded to nothing and could never be applied. It uses the string array codec now. - Reason descriptions: NO_PENDING_CHOICES and RANKED_CHOICE_USER_CONSTRAINTS both used the noPendingChoices translation, whose text said "user constraints", so the former was mislabelled. Each has its own key now. - A signup round id that doesn't exist crashed the page reading round.timespan; the loader throws a 404 instead. Tests: describeDecision/describeReason, the results page (round naming, executed message, table contents, query variables, URL filters), and MaximumEventSignupsPreview (calendar months, colours, transitions, tooltips, too-long and empty ranges). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Tests for the ranked choice results page (
RankedChoiceSignupDecisionsPage) andMaximumEventSignupsPreview/ScheduledValuePreview, and fixes for three bugs in the results page:FilterCodecs.integerArray, but reasons are enum names (CONFLICT,FULL, ...). Encoding to the URL worked, but decoding parsed them as integers and dropped them all, and since the table state is derived from the URL, choosing a reason would immediately clear itself. It usesstringArraynow.NO_PENDING_CHOICESandRANKED_CHOICE_USER_CONSTRAINTSboth usedtables.rankedChoiceDecision.reasons.noPendingChoices, whose English text was "user constraints", so "no pending choices" was shown as "user constraints". Each now has its own key and text (locales/en.json). There's no Spanish entry for these keys, so nothing to update there.round.timespanofundefined. The loader now throws a 404.Tests (~33):
describeDecisionanddescribeReasonfor every value (including that every reason has a different description), the results page (round numbering from the pre-signup period, "automation ran" message, 404, table contents, the ticket word in the missing-ticket reason, default query variables, filters from the URL including reasons, export button), andMaximumEventSignupsPreview(months shown, weekday headers, first-of-month placement, colours per day including cycling for large limits, transition days, descriptions, hover tooltip, "too long" and empty ranges).I suspected the calendar's weekday header (
((dayIndex - 1) % 7) + 1is 0 for the first column) would show an invalid date, but Luxon wraps it to Sunday and the headers come out right, so no change there.Not covered yet
ExportButton(shared by every table; only its presence is checked here) and the other signup round admin pages.Testing
Full Vitest suite (1417 passed),
tsc --noEmitclean, ESLint no errors in the files changed (two pre-existing errors remain in the untouchedMaximumEventSignupsInput.tsx).🤖 Generated with Claude Code
https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd