Description
VisualizationSwitcher.tsx toggles between the factory (Excalibur GameCanvas) and flow diagram (React Flow FlowDiagram) views. It is the primary rendering path in App.tsx.
Core tests already exist (7 tests covering switching behavior, active-button styling, and URL param integration). Two gaps remain:
- Status prop forwarding is untested: The mocks render static
<div> elements that ignore all props, so there is no verification that status reaches the child component.
- No shared mock setup:
GameCanvas/FlowDiagram mocks are defined inline in the test file. A shared module would let other test files (e.g., App.test.tsx) reuse them.
Key files
- Component:
packages/factory/src/client/components/VisualizationSwitcher.tsx
- Existing tests:
packages/factory/src/client/components/__tests__/VisualizationSwitcher.test.tsx
- Test helpers:
packages/factory/src/__test-helpers__/fixtures.ts
Acceptance criteria
Must have (already met)
Should have
Nice to have
Part of
#57
Description
VisualizationSwitcher.tsxtoggles between the factory (ExcaliburGameCanvas) and flow diagram (React FlowFlowDiagram) views. It is the primary rendering path inApp.tsx.Core tests already exist (7 tests covering switching behavior, active-button styling, and URL param integration). Two gaps remain:
<div>elements that ignore all props, so there is no verification thatstatusreaches the child component.GameCanvas/FlowDiagrammocks are defined inline in the test file. A shared module would let other test files (e.g.,App.test.tsx) reuse them.Key files
packages/factory/src/client/components/VisualizationSwitcher.tsxpackages/factory/src/client/components/__tests__/VisualizationSwitcher.test.tsxpackages/factory/src/__test-helpers__/fixtures.tsAcceptance criteria
Must have (already met)
GameCanvas(Excalibur) andFlowDiagram(React Flow) dependenciesShould have
statuspropNice to have
__test-helpers__/reusable by other component testsPart of
#57