Merged
Conversation
renderHook + EditorProvider で各 action を act() 発火して state 遷移を 検証する React 統合テスト(jsdom 環境)。 網羅領域: - 基本: selectNode / updateNode + undo / deleteNode / addNode / toggleSelectNode - wrapSelectionInFrame: bbox 計算、子座標のローカル化、空選択で no-op - components: createComponent / unmakeComponent / insertInstance - z-order: reorderSelected forward/front/backward (境界) / reorderChildren - styles: upsertStyle 上書き / removeStyle / applyStyleToSelection (color に対する fill 適用、text の fontSize/weight/fill 適用) - boolean / flatten / outlineStroke: それぞれ 1〜2 ケース (alert 時の no-op も) - mask / comments: toggleMaskSelected、コメント add/update/remove ライフサイクル - detachFromParentIfOutside: 外に出たら昇格 / 内なら維持 / top-level は no-op - variables: upsertVariable / renameVariable / removeVariable window.alert / confirm を spyOn で mock。 168 → 196 tests (+28)。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EditorContext の action を React Testing Library の
renderHook+actで発火し、state 遷移を検証する統合テストを 28 件追加。168 → 196 tests。網羅領域
window.alert / confirm は
vi.spyOnで mock。Test plan
npm testで 14 ファイル / 196 件全 pass🤖 Generated with Claude Code