Repository navigation
Test event catalog, run list and schedule app; fix catalog bugs - #12108
Merged
Merged
Conversation
- EventListEvents: the convention-day headings (shown when sorted by convention order) could never appear. The loop assigned previousConventionDay before testing whether the day had changed, so the second test was always false. - EventList: and even with that fixed, the day headings need the convention's start and end, which the events query doesn't fetch, so the list of convention days was always empty. The page now passes the loader's convention merged with the query's. - EventListCategoryDropdown: categories selected in the URL decode to numbers but were compared to string ids, so a selected category never matched and the button always said "All event types". Tests: EventCard, EventListEvents, the EventList page (default queries, URL filters and sort, search, sort/category dropdowns, filterable form items, errors), useFilterableFormItems, RunList (day/time grouping, rating and conflict filters) and ScheduleApp (view choice and persistence, abilities, filters). Adds event catalog fixtures. 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 event catalog and schedule (
EventCatalog/EventList,RunList,ScheduleApp), and fixes for three bugs they found in the catalog:EventListEvents, when sorted by convention order, the loop setpreviousConventionDay = conventionDaybefore testing whether the day had changed, so the second test (!previousConventionDay.isSame(conventionDay)) was always false and no heading was ever recorded. It now records the heading and then updates the previous day.EventListEventsQueryonly fetchesidandtimezone_mode, so the list of convention days was always empty.EventListnow passes the loader's convention (which has the dates) merged with the query's. (I preferred this to changing the query and regenerating types; say if you'd rather add the fields to the query.)filters.categorydecodes to numbers, butEventListCategoryDropdowncompared them to string ids withincludes, so the button always said "All event types" for a URL-supplied selection. It compares as strings now.Tests (~75):
EventCard(runs and their formatting, team members, author de-duplication, organization, exposed form items, added date, rating),EventListEvents, theEventListpage (default queries for visitors vs members, URL sort/filters, search, sort and category dropdowns, filterable form items, errors),useFilterableFormItems(merging choices across categories),RunList(day/time grouping and ordering, rating filter, conflict hiding, "+N hidden") andScheduleApp(choosing and remembering the view, which views are offered, abilities and fallbacks, filter dropdowns). The grids themselves are stubbed in theScheduleApptests. Addsfixtures/eventCatalog.ts.Not covered yet
ScheduleGridContext(still ~23%),PersonalScheduleFiltersBar's hook beyond what's exercised here, the grid components (ScheduleGridEventRun,RunDetails, ...) and the table view (EventTable).Testing
Full Vitest suite (1343 passed),
tsc --noEmitclean, ESLint no errors.🤖 Generated with Claude Code
https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd