Skip to content

Test the schedule grid components - #12109

Merged
nbudin merged 1 commit into
mainfrom
test-schedule-grid
Oct 6, 2026
Merged

nbudin merged 1 commit into
mainfrom
test-schedule-grid

Conversation

@nbudin

@nbudin nbudin commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

What

Tests for the schedule grid components (ScheduleGridContext, ScheduleGrid, ScheduleGridEventRun, RunDisplay, RunDetails, SignupStatusBadge, the legends, ConventionDayTabContainer, ScheduleGridApp). No bugs found this time; one small cleanup:

  • RunDisplay opened its details on Enter/Space by checking the deprecated keyEvent.keyCode (13/32); it checks keyEvent.key now (same behaviour in browsers, and it's what user-event and assistive tech send).

Tests (~40):

  • useScheduleGridProvider: the schedule built from events with their categories, the empty skeleton without a config/convention/events, rating/conflict settings, and run-details visibility (toggling, per-block tracking, closing overlapping runs while leaving non-overlapping ones open).
  • The grid and its runs: titles, hour labels, room row headers, the details popover (opens on click and keyboard, closes, when/where/link to the event's page for that run, title suffix), rating from the popover (members only), signup status badges (confirmed/waitlisted/request pending/ranked choice priorities/rating), and extended counts.
  • ScheduleGridApp: unknown config, day heading and timezone message, query variables (day range, filters, form items, extended counts), errors, day tabs (links keep the filters, prefetch on hover, refresh), the three legends, rating filter, per-hour counts.

The earlier schedule PRs are all merged, so this is independent; it only reuses scheduleFixtures.

Not covered yet

ConventionDayTabContainer's infinite-convention warning, PersonalScheduleFiltersBar's caption logic, StylingUtils and FakeEventRun directly (exercised through the grid and legends), and the table view (EventTable).

Testing

Full Vitest suite (1312 passed), tsc --noEmit clean, ESLint no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd

Tests for useScheduleGridProvider (run details visibility, skeleton),
ScheduleGrid and its runs (details popover, rating, signup status
badges, extended counts), and ScheduleGridApp (day tabs and prefetch,
refresh, query variables, errors, legends, rating filter).

RunDisplay opened its details on Enter/Space by checking the deprecated
keyCode; it uses event.key now.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
app/javascript/EventsApp/EventCatalog/EventList/EventListMyRatingSelector.tsx 🔴 0% 🔴 40% 🟢 40%
app/javascript/EventsApp/ScheduleGrid/AvailabilityUtils.tsx 🔴 48% 🟢 76% 🟢 28%
app/javascript/EventsApp/ScheduleGrid/CategoryLegend.tsx 🔴 0% 🟢 100% 🟢 100%
app/javascript/EventsApp/ScheduleGrid/ConventionDayTabContainer.tsx 🔴 0% 🟢 88.89% 🟢 88.89%
app/javascript/EventsApp/ScheduleGrid/FakeEventRun.tsx 🔴 0% 🟢 88.89% 🟢 88.89%
app/javascript/EventsApp/ScheduleGrid/FullnessLegend.tsx 🔴 0% 🟢 100% 🟢 100%
app/javascript/EventsApp/ScheduleGrid/PersonalScheduleFiltersBar.tsx 🔴 0% 🔴 46.34% 🟢 46.34%
app/javascript/EventsApp/ScheduleGrid/RefreshButton.tsx 🔴 0% 🟢 100% 🟢 100%
app/javascript/EventsApp/ScheduleGrid/RunDetails.tsx 🔴 0% 🟠 73.08% 🟢 73.08%
app/javascript/EventsApp/ScheduleGrid/RunDisplay.tsx 🔴 0% 🟢 95.24% 🟢 95.24%
app/javascript/EventsApp/ScheduleGrid/Schedule.ts 🟢 94.49% 🟢 95.28% 🟢 0.79%
app/javascript/EventsApp/ScheduleGrid/ScheduleGrid.tsx 🔴 0% 🟢 88.89% 🟢 88.89%
app/javascript/EventsApp/ScheduleGrid/ScheduleGridConfig.ts 🟢 86.67% 🟢 100% 🟢 13.33%
app/javascript/EventsApp/ScheduleGrid/ScheduleGridContext.tsx 🔴 22.86% 🟢 97.14% 🟢 74.28%
app/javascript/EventsApp/ScheduleGrid/ScheduleGridEventRun.tsx 🔴 0% 🟢 88.89% 🟢 88.89%
app/javascript/EventsApp/ScheduleGrid/ScheduleGridExtendedCounts.tsx 🔴 0% 🟢 93.55% 🟢 93.55%
app/javascript/EventsApp/ScheduleGrid/ScheduleGridRowHeader.tsx 🟠 75% 🟢 100% 🟢 25%
app/javascript/EventsApp/ScheduleGrid/SignupStatusBadge.tsx 🔴 0% 🟢 100% 🟢 100%
app/javascript/EventsApp/ScheduleGrid/StylingUtils.ts 🟠 54.55% 🟢 93.94% 🟢 39.39%
app/javascript/EventsApp/ScheduleGrid/getCapacityThresholds.ts 🔴 0% 🟠 66.67% 🟢 66.67%
app/javascript/EventsApp/ScheduleGrid/getFullnessClass.ts 🔴 0% 🟢 93.33% 🟢 93.33%
app/javascript/EventsApp/ScheduleGrid/index.tsx 🔴 0% 🟢 93.75% 🟢 93.75%
app/javascript/EventsApp/conventionDayUrls.ts 🟢 86.11% 🟢 97.22% 🟢 11.11%
app/javascript/EventsApp/queries.generated.ts 🔴 0% 🟢 100% 🟢 100%
app/javascript/Tables/FilterUtils.ts 🔴 16.07% 🔴 32.14% 🟢 16.07%
app/javascript/Tables/useReactRouterReactTable.tsx 🟠 63.64% 🟢 77.27% 🟢 13.63%
Overall Coverage 🟢 61.39% 🟢 62.43% 🟢 1.04%

Minimum allowed coverage is 0%, this run produced 62.43%

@nbudin
nbudin merged commit e285153 into main Oct 6, 2026
24 checks passed
@nbudin
nbudin deleted the test-schedule-grid branch October 6, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant