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

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