Skip to content

Round-trip tests: non-default crop survives .mock.json and share links (source-media issue 02) - #13

Merged
lenxism merged 1 commit into
mainfrom
test/source-media-02-crop-roundtrips
Jul 13, 2026
Merged

Round-trip tests: non-default crop survives .mock.json and share links (source-media issue 02)#13
lenxism merged 1 commit into
mainfrom
test/source-media-02-crop-roundtrips

Conversation

@lenxism

@lenxism lenxism commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Test-only addendum to Non-destructive crop: core UV math + Scene Document v5 (source-media issue 02) #12: two round-trip tests asserting a non-default crop survives .mock.json (toJson/fromJson) and share links (encodeShareParam/decodeShareParam) with full fidelity.
  • These were accidentally absorbed into the issue-01 prefactor commit while both tickets shared a working tree, so they landed in neither merged PR — this restores them.

Test plan

  • pnpm vitest run src/core/serialize.test.ts — 17 passed

Note

Low Risk
Only new tests in serialize.test.ts; no runtime or serialization logic changes.

Overview
Test-only restoration of coverage that was meant to land with related work but was dropped when two tickets shared a working tree.

Adds two Vitest cases in serialize.test.ts: one asserts a document with a non-default image.crop (zoom / panX / panY) survives toJsonfromJson with recovered: false and full document equality; the other asserts the same crop values survive encodeShareParamdecodeShareParam for share links.

Reviewed by Cursor Bugbot for commit 923ff2d. Bugbot is set up for automated code reviews on this repo. Configure here.

…s (source-media issue 02)

Addendum to #12: these two tests were accidentally absorbed into the
issue-01 prefactor commit while both tickets shared a working tree, so
they landed in neither merged PR. Test-only.
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mockstudio Ready Ready Preview, Comment Jul 13, 2026 7:04pm

@lenxism
lenxism merged commit fe0ad57 into main Jul 13, 2026
4 checks passed
@lenxism
lenxism deleted the test/source-media-02-crop-roundtrips branch July 13, 2026 19:07
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.

1 participant