Test Plan - Gravity Toy
Version: 0.1.0
Date: 2026-04-13
Status: Active visual
1. Purpose
Define the initial verification approach for the Gravity Toy visual.
2. Test Focus
- gravity interaction stability
- absorption and momentum behavior
- preset integrity
- drag-to-launch interaction
- pause/resume correctness
- reduced-motion behavior
- bilingual UI correctness
- desktop and mobile usability
3. Test Levels
3.1 Logic Checks
- mass-to-radius mapping remains stable for small, medium, and heavy bodies
- gravitational pair update uses mutual force accumulation
- merge survivor mass equals combined mass
- merge survivor velocity follows momentum conservation
- fixed Solar star does not drift during updates
- escape-margin removal culls far-off bodies correctly
3.2 Manual Interaction Tests
- load page and confirm the Solar System preset starts automatically
- switch presets and confirm
Solar System,Chaos,Binary, andSandboxeach reset cleanly - drag on desktop and confirm a new orb launches in the drag direction
- hold before release and confirm the ghost circle grows and the spawned orb is visibly heavier
- repeat the drag-to-launch flow on touch/mobile input
- pause the simulation during an active merge/launch effect and confirm visuals freeze in place
- resume and confirm the simulation continues cleanly
- reset the active preset and confirm the current preset state is restored
- toggle language and confirm controls, hint text, and descriptive copy update in NL/EN
- open with
?lang=enand confirm English is used on first load
3.3 Visual Smoke Tests
- canvas renders without console errors
- glow hierarchy is visible on large and small bodies
- motion trails appear on moving orbs
- force lines appear between close orb pairs
- barycenter markers appear on close-pair lines, including pairs with a heavy central body
- launch burst ring appears on spawn
- merge pulse and survivor flash appear on absorption
- hint text appears on load and fades away
3.4 Accessibility and Preference Tests
- all control buttons remain keyboard focusable
- language toggle remains labeled
prefers-reduced-motionsuppresses trails, pulses, launch bursts, and hint animation- reduced-motion state starts paused as designed
3.5 Docs and Routing Checks
site/visuals.htmllinks tosite/visuals-gravity.htmlsite/docs/index.htmllistsGravity Toy Docssite/visuals-gravity/docs/index.htmllinks toURS,FS,DS, andTest Plansite/visuals-gravity/docs/test-plan.htmlrenders afternpm run docs:render
4. Acceptance Checks
The current release should be considered acceptable when:
- all four presets load and feel distinct
- user-launched orbs reliably affect the simulation
- pause/resume and reset behave predictably
- key visual feedback effects are present
- NL and EN copy remain correct
- the public docs set is reachable and consistent with the source markdown