conversation-session-ask-user-question-keyboard-default-focus.json 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  1. {
  2. "version": 1,
  3. "caseName": "conversation-session-ask-user-question-keyboard-default-focus",
  4. "spec": "./test/e2e/conversation-session/conversation-session-ask-user-question-keyboard-default-focus.test.ts",
  5. "fixtures": [
  6. {
  7. "id": "upstream-conversation-ask-default-focus-empty-submit-call",
  8. "description": "Q15: AskUserQuestion 单题无预选 → 点 Submit 空答案",
  9. "metadata": {
  10. "kind": "main",
  11. "timingPolicy": "fast-text",
  12. "source": "synthetic",
  13. "syntheticReason": "稳定制造 AskUserQuestion 单选题等待态,测试无预聚焦鼠标点 Submit 提交空答案"
  14. },
  15. "maxMatches": 1,
  16. "match": {
  17. "method": "POST",
  18. "pathIncludes": "/messages",
  19. "lastUserMessageIncludes": ["E2E_ADF_EMPTY_SUBMIT"],
  20. "bodyIncludes": ["E2E_ADF_EMPTY_SUBMIT"],
  21. "bodyExcludes": [
  22. "Generate a concise title",
  23. "CRITICAL: Respond with TEXT ONLY"
  24. ]
  25. },
  26. "response": {
  27. "statusCode": 200,
  28. "toolUse": {
  29. "id": "toolu_e2e_adf_empty_submit",
  30. "name": "AskUserQuestion",
  31. "input": {
  32. "questions": [
  33. {
  34. "question": "E2E_ADF_Q1_SINGLE_SELECT",
  35. "header": "E2E default focus empty submit",
  36. "options": [
  37. {
  38. "label": "E2E_ADF_Q1_A",
  39. "description": "First option for empty submit test."
  40. },
  41. {
  42. "label": "E2E_ADF_Q1_B",
  43. "description": "Second option for empty submit test."
  44. }
  45. ]
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. },
  52. {
  53. "id": "upstream-conversation-ask-default-focus-empty-submit-final",
  54. "description": "Q15: 最终响应,确认收到空答案",
  55. "metadata": {
  56. "kind": "main",
  57. "timingPolicy": "fast-text",
  58. "source": "synthetic",
  59. "syntheticReason": "模拟 Agent 收到空 answers 后的简短确认"
  60. },
  61. "maxMatches": 1,
  62. "match": {
  63. "method": "POST",
  64. "pathIncludes": "/messages",
  65. "lastUserMessageIncludes": ["E2E_ADF_EMPTY_SUBMIT"],
  66. "bodyIncludes": ["toolu_e2e_adf_empty_submit"],
  67. "bodyExcludes": [
  68. "Generate a concise title",
  69. "CRITICAL: Respond with TEXT ONLY"
  70. ]
  71. },
  72. "response": {
  73. "statusCode": 200,
  74. "text": "Received. No answer was provided — continuing with best judgment."
  75. }
  76. },
  77. {
  78. "id": "upstream-conversation-ask-default-focus-tab-enter-call",
  79. "description": "Q18: AskUserQuestion 两题无预选 → Tab/↓+Enter 选中推进",
  80. "metadata": {
  81. "kind": "main",
  82. "timingPolicy": "fast-text",
  83. "source": "synthetic",
  84. "syntheticReason": "稳定制造 AskUserQuestion 两题等待态,测试 Tab 与初始方向键聚焦、Enter 选中推进"
  85. },
  86. "maxMatches": 1,
  87. "match": {
  88. "method": "POST",
  89. "pathIncludes": "/messages",
  90. "lastUserMessageIncludes": ["E2E_ADF_TAB_ENTER"],
  91. "bodyIncludes": ["E2E_ADF_TAB_ENTER"],
  92. "bodyExcludes": [
  93. "Generate a concise title",
  94. "CRITICAL: Respond with TEXT ONLY"
  95. ]
  96. },
  97. "response": {
  98. "statusCode": 200,
  99. "toolUse": {
  100. "id": "toolu_e2e_adf_tab_enter",
  101. "name": "AskUserQuestion",
  102. "input": {
  103. "questions": [
  104. {
  105. "question": "E2E_ADF_Q1_SINGLE_SELECT",
  106. "header": "E2E tab enter Q1",
  107. "options": [
  108. {
  109. "label": "E2E_ADF_Q1_A",
  110. "description": "Tab should focus this first."
  111. },
  112. {
  113. "label": "E2E_ADF_Q1_B",
  114. "description": "ArrowDown should move here."
  115. }
  116. ]
  117. },
  118. {
  119. "question": "E2E_ADF_Q2_MULTI_SELECT",
  120. "header": "E2E tab enter Q2",
  121. "options": [
  122. {
  123. "label": "E2E_ADF_Q2_A",
  124. "description": "First option for Q2."
  125. },
  126. {
  127. "label": "E2E_ADF_Q2_B",
  128. "description": "Second option for Q2."
  129. }
  130. ]
  131. }
  132. ]
  133. }
  134. }
  135. }
  136. },
  137. {
  138. "id": "upstream-conversation-ask-default-focus-tab-enter-final",
  139. "description": "Q18: 最终响应,确认收到 Q1_A + Q2_A",
  140. "metadata": {
  141. "kind": "main",
  142. "timingPolicy": "fast-text",
  143. "source": "synthetic",
  144. "syntheticReason": "模拟 Agent 收到 Q1_A 和 Q2_A 后的确认"
  145. },
  146. "maxMatches": 1,
  147. "match": {
  148. "method": "POST",
  149. "pathIncludes": "/messages",
  150. "lastUserMessageIncludes": ["E2E_ADF_TAB_ENTER"],
  151. "bodyIncludes": ["toolu_e2e_adf_tab_enter"],
  152. "bodyExcludes": [
  153. "Generate a concise title",
  154. "CRITICAL: Respond with TEXT ONLY"
  155. ]
  156. },
  157. "response": {
  158. "statusCode": 200,
  159. "text": "I received your selections: E2E_ADF_Q1_A for the first question, and E2E_ADF_Q2_A for the second question. Continuing."
  160. }
  161. },
  162. {
  163. "id": "upstream-conversation-ask-default-focus-enter-skip-call",
  164. "description": "Q19: AskUserQuestion 两题无预选 → Enter 跳过 Q1",
  165. "metadata": {
  166. "kind": "main",
  167. "timingPolicy": "fast-text",
  168. "source": "synthetic",
  169. "syntheticReason": "稳定制造 AskUserQuestion 两题等待态,测试 Enter 跳过 Q1"
  170. },
  171. "maxMatches": 1,
  172. "match": {
  173. "method": "POST",
  174. "pathIncludes": "/messages",
  175. "lastUserMessageIncludes": ["E2E_ADF_ENTER_SKIP"],
  176. "bodyIncludes": ["E2E_ADF_ENTER_SKIP"],
  177. "bodyExcludes": [
  178. "Generate a concise title",
  179. "CRITICAL: Respond with TEXT ONLY"
  180. ]
  181. },
  182. "response": {
  183. "statusCode": 200,
  184. "toolUse": {
  185. "id": "toolu_e2e_adf_enter_skip",
  186. "name": "AskUserQuestion",
  187. "input": {
  188. "questions": [
  189. {
  190. "question": "E2E_ADF_Q1_SINGLE_SELECT",
  191. "header": "E2E enter skip Q1",
  192. "options": [
  193. {
  194. "label": "E2E_ADF_Q1_A",
  195. "description": "Should be skipped by Enter."
  196. },
  197. {
  198. "label": "E2E_ADF_Q1_B",
  199. "description": "Should be skipped by Enter."
  200. }
  201. ]
  202. },
  203. {
  204. "question": "E2E_ADF_Q2_MULTI_SELECT",
  205. "header": "E2E enter skip Q2",
  206. "options": [
  207. {
  208. "label": "E2E_ADF_Q2_A",
  209. "description": "Should be selected by Tab+Enter."
  210. },
  211. {
  212. "label": "E2E_ADF_Q2_B",
  213. "description": "Second option for Q2."
  214. }
  215. ]
  216. }
  217. ]
  218. }
  219. }
  220. }
  221. },
  222. {
  223. "id": "upstream-conversation-ask-default-focus-enter-skip-final",
  224. "description": "Q19: 最终响应,确认收到 Q2_A(Q1 已跳过)",
  225. "metadata": {
  226. "kind": "main",
  227. "timingPolicy": "fast-text",
  228. "source": "synthetic",
  229. "syntheticReason": "模拟 Agent 收到 Q2_A 且 Q1 跳过后的确认"
  230. },
  231. "maxMatches": 1,
  232. "match": {
  233. "method": "POST",
  234. "pathIncludes": "/messages",
  235. "lastUserMessageIncludes": ["E2E_ADF_ENTER_SKIP"],
  236. "bodyIncludes": ["toolu_e2e_adf_enter_skip"],
  237. "bodyExcludes": [
  238. "Generate a concise title",
  239. "CRITICAL: Respond with TEXT ONLY"
  240. ]
  241. },
  242. "response": {
  243. "statusCode": 200,
  244. "text": "Received: E2E_ADF_Q2_A for Q2. Q1 was skipped. Continuing with best judgment."
  245. }
  246. },
  247. {
  248. "id": "upstream-conversation-ask-default-focus-multiselect-call",
  249. "description": "Q20: AskUserQuestion 多选题 → Space 勾选 Enter 确认",
  250. "metadata": {
  251. "kind": "main",
  252. "timingPolicy": "fast-text",
  253. "source": "synthetic",
  254. "syntheticReason": "稳定制造 AskUserQuestion 多选题等待态,测试 Space 勾选/取消 Enter 确认"
  255. },
  256. "maxMatches": 1,
  257. "match": {
  258. "method": "POST",
  259. "pathIncludes": "/messages",
  260. "lastUserMessageIncludes": ["E2E_ADF_MULTISELECT"],
  261. "bodyIncludes": ["E2E_ADF_MULTISELECT"],
  262. "bodyExcludes": [
  263. "Generate a concise title",
  264. "CRITICAL: Respond with TEXT ONLY"
  265. ]
  266. },
  267. "response": {
  268. "statusCode": 200,
  269. "toolUse": {
  270. "id": "toolu_e2e_adf_multiselect",
  271. "name": "AskUserQuestion",
  272. "input": {
  273. "questions": [
  274. {
  275. "question": "E2E_ADF_Q2_MULTI_SELECT",
  276. "header": "E2E multi-select",
  277. "multiSelect": true,
  278. "options": [
  279. {
  280. "label": "E2E_ADF_Q2_A",
  281. "description": "First multi-select option."
  282. },
  283. {
  284. "label": "E2E_ADF_Q2_B",
  285. "description": "Second option — should be toggled off."
  286. },
  287. { "label": "E2E_ADF_Q2_C", "description": "Third option." }
  288. ]
  289. }
  290. ]
  291. }
  292. }
  293. }
  294. },
  295. {
  296. "id": "upstream-conversation-ask-default-focus-multiselect-final",
  297. "description": "Q20: 最终响应,确认收到 Q2_A + Q2_C(Q2_B 已取消)",
  298. "metadata": {
  299. "kind": "main",
  300. "timingPolicy": "fast-text",
  301. "source": "synthetic",
  302. "syntheticReason": "模拟 Agent 收到 Q2_OPT_A + Q2_OPT_C 后的确认"
  303. },
  304. "maxMatches": 1,
  305. "match": {
  306. "method": "POST",
  307. "pathIncludes": "/messages",
  308. "lastUserMessageIncludes": ["E2E_ADF_MULTISELECT"],
  309. "bodyIncludes": ["toolu_e2e_adf_multiselect"],
  310. "bodyExcludes": [
  311. "Generate a concise title",
  312. "CRITICAL: Respond with TEXT ONLY"
  313. ]
  314. },
  315. "response": {
  316. "statusCode": 200,
  317. "text": "Received selections: E2E_ADF_Q2_A and E2E_ADF_Q2_C. E2E_ADF_Q2_B was deselected. Continuing."
  318. }
  319. },
  320. {
  321. "id": "upstream-conversation-ask-default-focus-escape-dismiss-call",
  322. "description": "Q22: AskUserQuestion 首题卡片初始焦点 → Escape dismiss",
  323. "metadata": {
  324. "kind": "main",
  325. "timingPolicy": "fast-text",
  326. "source": "synthetic",
  327. "syntheticReason": "稳定制造单题 AskUserQuestion 等待态,验证没有选项聚焦时卡片层 Escape 关闭整组问答"
  328. },
  329. "maxMatches": 1,
  330. "match": {
  331. "method": "POST",
  332. "pathIncludes": "/messages",
  333. "lastUserMessageIncludes": ["E2E_ADF_ESCAPE_DISMISS"],
  334. "bodyIncludes": ["E2E_ADF_ESCAPE_DISMISS"],
  335. "bodyExcludes": [
  336. "Generate a concise title",
  337. "CRITICAL: Respond with TEXT ONLY"
  338. ]
  339. },
  340. "response": {
  341. "statusCode": 200,
  342. "toolUse": {
  343. "id": "toolu_e2e_adf_escape_dismiss",
  344. "name": "AskUserQuestion",
  345. "input": {
  346. "questions": [
  347. {
  348. "question": "E2E_ADF_Q1_SINGLE_SELECT",
  349. "header": "E2E initial card Escape dismiss",
  350. "options": [
  351. {
  352. "label": "E2E_ADF_Q1_A",
  353. "description": "Must remain unselected before Escape."
  354. },
  355. {
  356. "label": "E2E_ADF_Q1_B",
  357. "description": "Must remain unselected before Escape."
  358. }
  359. ]
  360. }
  361. ]
  362. }
  363. }
  364. }
  365. },
  366. {
  367. "id": "upstream-conversation-ask-default-focus-escape-dismiss-final",
  368. "description": "Q22: Escape dismiss 后模型收到 declined tool_result 并正常收口",
  369. "metadata": {
  370. "kind": "main",
  371. "timingPolicy": "fast-text",
  372. "source": "synthetic",
  373. "syntheticReason": "稳定验证 dismiss 关闭 UI 后 declined tool_result 按当前产品语义回传模型,避免用未命中 fixture 的 500 重试做负向计时断言"
  374. },
  375. "maxMatches": 1,
  376. "match": {
  377. "method": "POST",
  378. "pathIncludes": "/messages",
  379. "bodyIncludes": ["toolu_e2e_adf_escape_dismiss", "AskUserQuestion was declined"],
  380. "bodyExcludes": [
  381. "Generate a concise title",
  382. "CRITICAL: Respond with TEXT ONLY"
  383. ]
  384. },
  385. "response": {
  386. "statusCode": 200,
  387. "text": "E2E_ADF_ESCAPE_DISMISS_ACK"
  388. }
  389. }
  390. ]
  391. }