Add unit tests for cartoon scene-plan validation and plan timing
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 94/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start by reading frontend/src/engine/cartoon/scene-plan.ts, timing.ts, and the fixture functions in frontend/src/engine/cartoon/harness/reference-plan.ts. Create scene-plan.test.ts and timing.test.ts using the existing fixture to cover validation, canonical JSON, hashing, and frame timing. Done means both files pass with npx vitest run, and the test output is pasted in the PR.
Written by the indexing model from the issue text.
Description
Context
The versioned scene plan is the single source of truth for cartoon renders (.claude/skills/scene-plan-schema). The determinism law L6 depends on canonicalJson producing the same output for any key order, and on computePlanTiming quantizing to whole frames. None of this is unit-tested, but a ready-made fixture already exists.
Where
frontend/src/engine/cartoon/scene-plan.ts:143-213:validateScenePlan;:230:canonicalJson;:245/:250:hashScenePlan/hashScenefrontend/src/engine/cartoon/timing.ts:15:takeKeyForLine;:58-139:computePlanTiming- Fixture:
frontend/src/engine/cartoon/harness/reference-plan.ts:buildReferencePlan(),buildEditedReferencePlan()(type-only imports, safe in vitest)
What to do
Create src/engine/cartoon/scene-plan.test.ts and timing.test.ts:
validateScenePlan(buildReferencePlan())→{ok:true}. Then mutate one field at a time (wrong version, duplicate scene id, dialoguecharIdnot in the scene,fps: 0) and assert the specific error string.canonicalJson: the same object with keys in a different order gives the same string, andundefinedmembers are dropped.hashScenePlanis stable across calls (Node 18+ hascrypto.subtle).computePlanTiming: build atakeDurationsmap fromtakeKeyForLine. Assert that everyframeCountis an integer, that scenes are contiguous (startFrame= previous start + count), and that a missing take throws.
Acceptance criteria
- Both test files pass under
npx vitest run - Tests use the existing fixture, not a hand-written fake plan
- Paste the test output in the PR
Getting started
Read CONTRIBUTING.md for dev setup and the quality bar (no facades, evidence before done). Comment here to claim the issue.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BeyondITL/contentine-create
-
good first issue level: 1 ui
Difficulty 2/5 1-3 hours Newbie friendliness 94/100
BeyondITL/contentine-create#58 ·
Maintainers usually reply within 1 day
-
Fix Enter on the marketplace Buy button opening details instead of buyingPossibly taken @developedbyBob claimed this 6 days ago. Openaccessibility claimed good first issue level: 1
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
BeyondITL/contentine-create#57 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Enable JSX in vitest so React component tests can runPossibly taken @29miaoet claimed this 7 days ago. Openclaimed good first issue level: 1 testing
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
BeyondITL/contentine-create#56 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
good first issue level: 1 testing
Difficulty 2/5 1-3 hours Newbie friendliness 94/100
BeyondITL/contentine-create#55 ·
Maintainers usually reply within 1 day
-
good first issue level: 1 testing
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
BeyondITL/contentine-create#54 ·
Maintainers usually reply within 1 day
All issues in BeyondITL/contentine-create
Similar issues
-
area:frontend kind:bug priority:p2 ready
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
handsontable/hyperformula#1879 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
RunestoneInteractive/rs#1661 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
capricorn86/happy-dom#2594 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day