コンテンツにスキップ

AI Page Import — テストケース

Area Required assertion Current automated coverage
Queue schema 必須 field、正数 tenant ID、HTTP(S)、viewport、attempt 1、unknown field rejection Service/schema test
Public URL policy Credential、非標準 port、loopback、private、link-local、IPv6 loopback を拒否 test_security.py
Redirect security Asset redirect を毎回検証し、metadata/private IP への redirect を拒否 test_security.py
Browser evidence CSS filter normalization と SVG rasterization 判定 test_browser.py
Success path Capture、asset、screenshot、immutable result/manifest、success webhook test_service.py
Failure path 安全な failure artifact/manifest と failed webhook Component/E2E で必要
Idempotency 同一 immutable write を再利用し、duplicate callback で再 enqueue しない Backend webhook unit test
Database isolation Worker が PostgreSQL/DocumentDB client を import しない Architecture/static review
SQS batch behavior batchItemFailures に failed record ID のみを返す Handler component coverage
アップロード入力 組織・プレフィックス・ハッシュ・長さの不一致を拒否し、ローカル URL を開かず保存 test_service.py
画像制限 動画・超過画像のスキップとアップロード画像の上限検証 test_security.py、test_service.py

Local E2E acceptance

代表的な公開 page を REST から Page Import し、row の completed、tenant prefix 配下の capture.json/screenshot/asset、そして Code2Des row が作成されないことを確認します。その後 plugin で import を選択し、新しい Code2Des row の completed と materialization を確認します。同じ Page Import から再度 generate し、別の Code2Des row と Figma frame が保持されることも確認します。Source screenshot と Figma output の geometry、stacking、background/SVG、text wrap、image color/filter、missing layer を比較します。

Network-dependent E2E fixture は明示的に許可した public target と bounded timeout を使用し、決定的 unit suite には含めません。