conversation-session-v4-attachment-layout.json 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-v4-attachment-layout",
  4. "spec": "./test/e2e/conversation-session/attachments/conversation-session-v4-attachment-layout.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "v4-attachment-layout-send",
  8. "description": "AL01-AL14:附件、context 与可见文本首发。",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "固定附件和四类 context 组合,稳定验证布局与 edit 解析。图片请求使用缓存路径,不匹配原文件名;原文件名由 UI 断言覆盖。"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "bodyIncludes": [
  20. "E2E_ATTACHMENT_LAYOUT_VISIBLE",
  21. "\"type\":\"image\"",
  22. "image/png",
  23. "e2e-attachment-layout-a-very-long-filename-for-truncation.txt",
  24. "E2E comment",
  25. "e2e.example.test",
  26. "E2E selection"
  27. ],
  28. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  29. },
  30. "response": {
  31. "statusCode": 200,
  32. "text": {
  33. "id": "v4-attachment-layout-send",
  34. "inputTokens": 100,
  35. "outputTokens": 8,
  36. "text": "V4_ATTACHMENT_LAYOUT_SEND_OK"
  37. }
  38. }
  39. },
  40. {
  41. "id": "v4-attachment-layout-edit",
  42. "description": "AL15:删除网页 context 后重新序列化。",
  43. "metadata": {
  44. "kind": "main",
  45. "timingPolicy": "fast-text",
  46. "source": "synthetic",
  47. "syntheticReason": "bodyExcludes 网页 URL,证明 edit branch 不保留已删除 context。"
  48. },
  49. "maxMatches": 1,
  50. "match": {
  51. "method": "POST",
  52. "pathIncludes": "/messages",
  53. "bodyIncludes": ["E2E_ATTACHMENT_LAYOUT_VISIBLE", "E2E comment", "E2E selection"],
  54. "bodyExcludes": [
  55. "e2e.example.test",
  56. "Generate a concise title",
  57. "CRITICAL: Respond with TEXT ONLY"
  58. ]
  59. },
  60. "response": {
  61. "statusCode": 200,
  62. "text": {
  63. "id": "v4-attachment-layout-edit",
  64. "inputTokens": 100,
  65. "outputTokens": 8,
  66. "text": "V4_ATTACHMENT_LAYOUT_EDIT_OK"
  67. }
  68. }
  69. },
  70. {
  71. "id": "v4-attachment-context-only",
  72. "description": "AL02/AL14:仅 conversation selection 不产生空气泡。",
  73. "metadata": {
  74. "kind": "main",
  75. "timingPolicy": "fast-text",
  76. "source": "synthetic",
  77. "syntheticReason": "仅 context prompt 是确定性 renderer/provider 合同。"
  78. },
  79. "maxMatches": 1,
  80. "match": {
  81. "method": "POST",
  82. "pathIncludes": "/messages",
  83. "bodyIncludes": ["E2E_ATTACHMENT_CONTEXT_ONLY"],
  84. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  85. },
  86. "response": {
  87. "statusCode": 200,
  88. "text": {
  89. "id": "v4-attachment-context-only",
  90. "inputTokens": 30,
  91. "outputTokens": 8,
  92. "text": "V4_ATTACHMENT_CONTEXT_ONLY_OK"
  93. }
  94. }
  95. },
  96. {
  97. "id": "v4-attachment-failed-image",
  98. "description": "AL18/AL19:失败图片静态降级,gallery 保持消息隔离。",
  99. "metadata": {
  100. "kind": "main",
  101. "timingPolicy": "fast-text",
  102. "source": "synthetic",
  103. "syntheticReason": "固定第二条图片消息,稳定验证 renderer 缩略图失败和跨消息 gallery 边界。"
  104. },
  105. "maxMatches": 1,
  106. "match": {
  107. "method": "POST",
  108. "pathIncludes": "/messages",
  109. "bodyIncludes": ["E2E_ATTACHMENT_FAILED_IMAGE", "\"type\":\"image\"", "image/png"],
  110. "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"]
  111. },
  112. "response": {
  113. "statusCode": 200,
  114. "text": {
  115. "id": "v4-attachment-failed-image",
  116. "inputTokens": 30,
  117. "outputTokens": 8,
  118. "text": "V4_ATTACHMENT_FAILED_IMAGE_OK"
  119. }
  120. }
  121. }
  122. ]
  123. }