Repository navigation
test(coverage): Cover the shell, map and task-queue components - #315
Merged
Merged
Conversation
…rted components The coverage gate only read exports whose source sits under src/components, so Map and PlaceAutocomplete, re-exported through src/exports/map.ts, were never checked and PlaceAutocomplete had no tests. The gate now follows src/exports re-exports, and new tests cover searching, keyboard selection, Escape, the empty and error states, and cancelling a stale search.
Map's only test covered the theme-aware tile layer. A smoke test now mounts the real lazy-loaded Leaflet map, and the zoom, locate and fullscreen controls are tested against a fake Leaflet map: zooming, disabling at the zoom limits, locating and reporting the result or the error, and following the map's fullscreen events.
Sidebar had no tests and the coverage baseline exempted it. New tests cover the trigger, defaultOpen and controlled open, the Cmd+B and Ctrl+B shortcut (a bare b, including one typed in the sidebar input, does nothing), the state cookie, the mobile sheet, and active and disabled menu items. Sidebar leaves the coverage baseline.
Stepper had no tests and the coverage baseline exempted it. New tests cover moving next and back, staying on the first and last steps, the current, completed and upcoming step states, disabled steps that cannot be clicked, and the helpers for step state, DOM ids and arrow-key focus. Stepper leaves the coverage baseline.
useTaskQueue and the scope helpers had no tests. New tests cover the error outside a provider, listing, cancelling, filtering and dismissing tasks, picking the project, org or global scope, matching tasks to the current scope, the context labels, and when the task list shows those labels.
Typing starts a search per letter, so the error-state test could hold an element an earlier search rendered just before the component replaced it, and failed now and then in the full run. It now waits for a fresh match.
The bare-b sidebar test pressed b twice, so with the Cmd/Ctrl check removed the two toggles cancelled out and it still passed. The task status-filter test had one task, so it passed without the filter. The search test read the last request URL before the final keystroke's search could run. Each now fails with its behaviour removed: separate bare-b tests, a never-finishing task beside the completed one, and a wait for the full query.
yahyafakhroji
requested review from
gaghan430,
kevwilliams and
mattdjenkinson
November 19, 2026 08:03
scotwells
approved these changes
Nov 19, 2026
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.
Problem
About 3,700 lines of shipped UI had little or no test coverage. The coverage gate never checked Map or PlaceAutocomplete, because datum-ui re-exports them through
src/exports/map.ts, and the baseline exempted Sidebar and Stepper. TaskQueue's hooks had no tests either.Solution
The coverage gate now follows
src/exports/re-exports, so it checks Map and PlaceAutocomplete like any other component. New tests cover PlaceAutocomplete search and selection, Map rendering and its controls, Sidebar toggling and its shortcut, Stepper navigation and step states, and TaskQueue's queue and scope hooks. Sidebar and Stepper leave the coverage baseline. No component code changes.Closes #314