Commit graph

23 commits

Author SHA1 Message Date
Danila Poyarkov 21b649e540 test(engine): organize clipboard and vector coverage 2026-05-16 13:18:38 +03:00
Danila Poyarkov 9616094766 refactor(text): group derived text helpers 2026-05-16 11:56:35 +03:00
Danila Poyarkov 91f516ecaa fix(clipboard): include text glyph blobs 2026-05-16 11:46:14 +03:00
Danila Poyarkov 992be9b713 fix(clipboard): include glyph advances 2026-05-16 11:05:15 +03:00
Danila Poyarkov e47455d91b fix(clipboard): export Figma font style names 2026-05-16 10:52:51 +03:00
Danila Poyarkov 5fd0e60a99 fix(editor): hit test entered containers in world space 2026-05-13 04:11:19 +03:00
Danila Poyarkov f25e5cfe0a fix(scene-graph): avoid id collisions after import 2026-05-13 03:36:28 +03:00
Danila Poyarkov 72614fac4c fix(editor): paste into selected container
Paste now targets the selected frame/group/component/section instead of
always placing nodes on the page root, matching Figma's behavior:

- Single container selected: paste as child
- Non-container child selected: paste as sibling in its parent
- Entered container (double-click): paste inside it
- Nothing or multiple nodes selected: paste on the page

Also applies to image paste via placeImageFiles.

Fixes #79
2026-05-07 13:56:30 +03:00
Danila Poyarkov aad26b535e test: move prefixed splits into domain folders
- Move newly split tests under explicit domain subfolders
- Update nested helper imports after the moves
- Add a lint guard against repeating existing sibling domains as filename prefixes
2026-05-06 14:27:21 +03:00
Danila Poyarkov b9da0dcb76 chore(lint): enforce test complexity limits
- Extract color picker fill comparison helpers
- Guard derived text assertions without optional chains
- Split resize math into smaller helper functions
- Remove the remaining complexity test exceptions
2026-05-06 14:18:29 +03:00
Danila Poyarkov c589818a71 test(clipboard): split node import coverage
- Move clipboard node import tests into focused files by behavior
- Preserve filtering, hierarchy, styling, component, and undo coverage
- Remove import-nodes from max-lines exceptions
2026-05-06 14:01:18 +03:00
Danila Poyarkov 657188b097 chore(tests): enforce non-null assertion rule
- Remove remaining test non-null assertions and delete the broad test override
- Add explicit guards for canvas, design panel, auto-layout, SVG, Kiwi, hit-test, scene graph, text editor, and clipboard tests
- Validate check plus affected engine and E2E coverage
2026-05-06 11:44:18 +03:00
Danila Poyarkov 86cb3970ff chore(tests): guard component and cache assertions
- Remove non-null assertions from component, visibility, scene cache, and redo sequence tests
- Add explicit node, store, renderer, and canvas bounds guards
- Validate check plus affected engine and E2E coverage
2026-05-06 11:07:47 +03:00
Danila Poyarkov ac5bb4add3 chore(tests): guard engine node assertions
- Replace non-null assertions in effects, Figma API, and individual stroke tests
- Use expectDefined and getNodeOrThrow for optional graph/proxy lookups
- Validate affected engine tests
2026-05-06 09:48:55 +03:00
Danila Poyarkov 3387b5bb6b chore(tests): guard more test lookups
- Remove non-null assertions from context menu, panels, perf, properties, MCP, SVG, undo, and instance override tests
- Add explicit store, renderer, node, and bounding-box guards
- Validate affected engine and E2E tests
2026-05-06 09:43:28 +03:00
Danila Poyarkov 017c55cbf5 chore(tests): clean more non-null assertions
- Replace clipboard, variable, centerline, layout, menu, and text formatting assertions with explicit guards
- Use expectDefined and getNodeOrThrow instead of postfix non-null assertions
- Validate affected engine and E2E tests
2026-05-06 03:28:25 +03:00
Danila Poyarkov 9e4d7bee5d chore(lint): fix unused test code
- Remove stale imports and unused locals from split engine and e2e tests
- Drop the targeted no-unused-vars test allowances
- Keep check and affected test suites warning-free
2026-05-06 02:53:19 +03:00
Danila Poyarkov 0af8cd271e chore(lint): enforce named core types in tests
- Remove the broad test exception for inline named type literals
- Replace duplicated Color, Vector, and Rect shapes with shared core types
- Keep affected engine tests passing
2026-05-06 02:38:27 +03:00
Danila Poyarkov c3f5189f8f style: tighten import grouping
- Configure oxfmt custom import groups for workspace, app, package, and test aliases
- Keep type imports grouped with their matching source category instead of one global tail group
- Expand the format script to cover formatter config, Vite files, and scripts
2026-05-06 02:22:08 +03:00
Danila Poyarkov 930cf39216 test: organize prefixed test files into folders
- Move top-level engine and e2e prefixed test files under domain folders
- Update fixture path helpers after moving render and pen tests
- Add lint coverage to prevent new top-level prefixed test files
- Refresh testing docs for the new fig and layout paths
2026-05-06 02:13:18 +03:00
Danila Poyarkov e42dffa003 chore(lint): consolidate oxlint config
- Merge structural lint rules into oxlint.json and remove the second config file
- Add #tests/* path aliases and rewrite deep test helper imports
- Ban new deep parent-relative imports through the shared lint config
2026-05-06 02:05:02 +03:00
Danila Poyarkov c31e7ae7d4 test(selection): split multi-selection coverage
- Move multi-selection.test.ts into focused flip, alignment, and property files
- Reuse scene and assertion helpers for selection tests
- Preserve all 22 multi-selection tests and enforce non-null assertion cleanup on the new folder
2026-05-06 01:56:27 +03:00
Danila Poyarkov 0532dfc697 test(clipboard): split editor clipboard coverage
- Move clipboard.test.ts into focused import, bounds, HTML encoding, and fixture roundtrip files
- Add a shared clipboard graph helper for import tests
- Preserve all 29 clipboard tests after the split
2026-05-06 01:53:10 +03:00