Skip to content

test: add flowsheet hooks tests#154

Merged
jakebromberg merged 2 commits intomainfrom
test/09-flowsheet-hooks
Apr 21, 2026
Merged

test: add flowsheet hooks tests#154
jakebromberg merged 2 commits intomainfrom
test/09-flowsheet-hooks

Conversation

@jakebromberg
Copy link
Copy Markdown
Member

@jakebromberg jakebromberg commented Feb 5, 2026

Closes #254

Summary

Add ~87 tests covering the flowsheet hooks — the primary interface between flowsheet components and the Redux store/API layer:

  • useShowControl — Join/leave show lifecycle, show state management
  • useFlowsheetSearch — Search query dispatching and result handling
  • useFlowsheet — Core flowsheet data access, entry ordering, pagination
  • useQueue — Queue management (add, remove, reorder)
  • useFlowsheetSubmit — Submission workflow from queue/catalog/bin to the live flowsheet

All tests in a single flowsheetHooks.test.tsx file since the hooks share interconnected store state.

Test plan

  • Run npm test src/hooks/flowsheetHooks.test.tsx

Part 9 of 26

@jakebromberg jakebromberg force-pushed the test/09-flowsheet-hooks branch from 89099b8 to ef59eac Compare February 5, 2026 21:26
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Feb 5, 2026

Deploying wxyc-dj with  Cloudflare Pages  Cloudflare Pages

Latest commit: 601b06e
Status: ✅  Deploy successful!
Preview URL: https://3bdf12ef.dj-site.pages.dev
Branch Preview URL: https://test-09-flowsheet-hooks.dj-site.pages.dev

View logs

- Add tests for useShowControl hook
- Add tests for useFlowsheetSearch hook
- Add tests for useFlowsheet hook
- Add tests for useQueue hook
- Add tests for useFlowsheetSubmit hook
@jakebromberg jakebromberg force-pushed the test/09-flowsheet-hooks branch from dccdebb to 403704c Compare April 18, 2026 03:58
Add useGetInfiniteEntriesInfiniteQuery mock to the API mock factory, type mockUseRegistry to accept null for info, type mockUseCatalogFlowsheetSearch to accept AlbumEntry[], provide preventDefault in FormEvent mocks, and remove nonexistent play_freq field from test data.
@jakebromberg jakebromberg merged commit 3af3ddf into main Apr 21, 2026
5 checks passed
@jakebromberg jakebromberg deleted the test/09-flowsheet-hooks branch April 21, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for flowsheet hooks

2 participants