openpencil/openspec/changes/archive/2026-03-01-sync-ai-chat-code-tab/specs/testing/spec.md
Anton A S 15abce330f Sync specs & docs: AI chat, Code panel, JSX export
- Merge from master: 19 commits (AI chat + Code tab)
- Update specs: editor-ui (Properties panel → Design|Code|AI tabs,
  AI chat panel, model selector, 10 AI tools, DirectChatTransport,
  Code panel with JSX export), scene-graph (sceneNodeToJsx),
  testing (AI chat Playwright, 14 JSX export tests)
- Update docs: features (AI Chat + Code Panel sections, Properties
  Panel tabs), figma-comparison (AI tools 🟡, Dev Mode 🟡,
  Code snippets 🟡, 83/150), roadmap (Phase 5 AI + Code),
  keyboard-shortcuts (⌘J ✅, ⌘B/I/U ✅)
- Archive sync-ai-chat-code-tab change
2026-03-01 12:33:57 +03:00

871 B

testing Specification (delta)

New Requirements

Requirement: AI chat Playwright tests

The test suite SHALL include Playwright e2e tests for the AI chat panel with mock transport (no real LLM calls). Tests cover: sending a message, receiving a response, tool call display. Real LLM tests available via TEST_REAL_LLM=1 flag.

Scenario: Chat with mock transport

  • WHEN a Playwright test sends a message via the chat input
  • THEN the mock transport returns a response and the message appears in the chat

Requirement: JSX export tests

The test suite SHALL include tests for sceneNodeToJsx() covering shapes, text, layout props, effects, and multi-selection. Currently 14 tests.

Scenario: Export rectangle to JSX

  • WHEN sceneNodeToJsx is called on a rectangle with blue fill
  • THEN the output includes Rectangle component with bg prop