Repository navigation
test(web): cover the components, mix report, hotkeys and form drafts - #427
Merged
Merged
Conversation
- epk: access requests (sign in, see the kit, error, declined, granted), the editor's delete confirm, conflicts while publishing, kit lists with custom access and untitled drafts, and every EpkForm field posted - supports: an artist's supports with sparse data, the artist page offline, and a story for the artist search error - add stubFormAction(), a fetch stub that holds a use:enhance form's answer so the form's saving state can be checked
- place and near pickers, genre and handle inputs, claim, show and project forms, and the basics, performer and promoter fields, each checked by what the form would post - hotkeys: the saved preference, blocked storage, editable targets, and every held or modified key - form drafts, the bug report approval, and stories for pagination, DM and email settings states and bug report errors - e2e: a revised change request isn't offered back as unsent changes after it saves - add renderInForm() and servePlaces() test helpers
- DjStats and PerformerFacts with sparse profiles, BookingDetails with only a phone, ManageLink for staff - follow, profile setup and channel topic saves, and the remove confirms in the people, verification and staff tables - render PerformerFacts on the server, as public pages do, and add stories for empty shows, plain invites and a verification with no name left
- MixReport, MixTracklist, KeyWheel, MixTimeline and TempoChart, with sparse and ridden reports - the set player stalling, closing, and crediting the set's artist for a track with none - the Mixcloud and SoundCloud widget loaders, MixList, LinkedSet and DjSets, without network - report helpers: lanes (with a property test), Camelot keys, ticks, tempo steps and handoffs
The tracklist's title is now a button named by its visible text, with the row's details beside it, so the mix report and set player tests find rows by those names and look for details in the row's list item.
Coverage Report for apps/web
File Coverage
SizeCompared with main. KiB are 1,024 bytes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parsing the whole report for every generated span took the property past the 5 s timeout under CI's coverage run.
bnb
previously approved these changes
Nov 4, 2026
bnb
previously approved these changes
Nov 4, 2026
…verage # Conflicts: # apps/web/vite.config.ts
bnb
approved these changes
Nov 5, 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.
What and why
Tests for the web app's components (
src/lib/components), the mix modules (src/lib/mix),hotkeys.svelte.tsandform-draft.svelte.ts, which had 155 uncovered lines, 122 functions and 483 branches between them. No app code changes.Added:
performer-facts.test.tsrenders PerformerFacts withsvelte/server, since public pages render it there and a route test already imports that build.src/lib/testing:stubFormAction()foruse:enhanceforms,renderInForm()for field groups, andservePlaces()for/api/places.tests/e2e/app.e2e.ts, the change request test now also revises the request and checks that, after a reload, the saved revision isn't offered back as unsent changes. That's ProjectForm dropping its draft on a successful save, which a component test can't reach becauseenhanceonly applies a success result with the router started.Changed:
player-fixtures.tsgainsstalled(), a recording that never loads.Coverage, from
pnpm test:coverage(the 91 files above, before and after): lines 93.69% to 99.92%, functions 93.34% to 99.95%, statements 93.55% to 99.88%, branches 76.14% to 89.18%. The whole app, merged with main (#423 and #436 landed first): lines 99.53%, functions 99.36%, statements 99.35%, branches 94.79%. The coverage gate is raised to match in the last commit, to 99.4/99.2/99.2/94.6.What's still uncovered:
tools/Capture.svelte,tools/HotCues.svelteandGuideList.svelte, which the Tools page branches are changing.?? ''around template values and itsvaluere-checks on constant options, which a mounted component never takes.DjStats.svelte:16andTempoChart.svelte:54(derived values only read inside an{#if}that rules the branch out),GenreInput.svelte:69(the input before hydration),ProjectForm.svelte:78(covered by the e2e test above, which coverage doesn't count), and fallbacks inmix/source.ts:47,79,mix/schema.ts:161andmix/report.ts:226that their callers never reach.How it was tested
pnpm test:coverage,pnpm check,pnpm lintandpnpm format:checkin apps/web, andpnpm test:e2e --project chromium -g 'a DJ proposes a change'. Each new test was broken once (its expectation or its input) and failed. The e2e check fails when ProjectForm'sformDraft.sentcall is removed.Checklist
docs/and--helpstill say what the code does