{ "version": 1, "caseName": "conversation-session-ask-user-question-keyboard-default-focus", "spec": "./test/e2e/conversation-session/permissions/conversation-session-ask-user-question-keyboard-default-focus.test.ts", "fixtures": [ { "id": "upstream-conversation-ask-default-focus-empty-submit-call", "description": "Q15: AskUserQuestion 单题无预选 → 点 Submit 空答案", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造 AskUserQuestion 单选题等待态,测试无预聚焦鼠标点 Submit 提交空答案" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_EMPTY_SUBMIT"], "bodyIncludes": ["E2E_ADF_EMPTY_SUBMIT"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_adf_empty_submit", "name": "AskUserQuestion", "input": { "questions": [ { "question": "E2E_ADF_Q1_SINGLE_SELECT", "header": "E2E default focus empty submit", "options": [ { "label": "E2E_ADF_Q1_A", "description": "First option for empty submit test." }, { "label": "E2E_ADF_Q1_B", "description": "Second option for empty submit test." } ] } ] } } } }, { "id": "upstream-conversation-ask-default-focus-empty-submit-final", "description": "Q15: 最终响应,确认收到空答案", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "模拟 Agent 收到空 answers 后的简短确认" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_EMPTY_SUBMIT"], "bodyIncludes": ["toolu_e2e_adf_empty_submit"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "Received. No answer was provided — continuing with best judgment." } }, { "id": "upstream-conversation-ask-default-focus-tab-enter-call", "description": "Q18: AskUserQuestion 两题无预选 → Tab/↓+Enter 选中推进", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造 AskUserQuestion 两题等待态,测试 Tab 与初始方向键聚焦、Enter 选中推进" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_TAB_ENTER"], "bodyIncludes": ["E2E_ADF_TAB_ENTER"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_adf_tab_enter", "name": "AskUserQuestion", "input": { "questions": [ { "question": "E2E_ADF_Q1_SINGLE_SELECT", "header": "E2E tab enter Q1", "options": [ { "label": "E2E_ADF_Q1_A", "description": "Tab should focus this first." }, { "label": "E2E_ADF_Q1_B", "description": "ArrowDown should move here." } ] }, { "question": "E2E_ADF_Q2_MULTI_SELECT", "header": "E2E tab enter Q2", "options": [ { "label": "E2E_ADF_Q2_A", "description": "First option for Q2." }, { "label": "E2E_ADF_Q2_B", "description": "Second option for Q2." } ] } ] } } } }, { "id": "upstream-conversation-ask-default-focus-tab-enter-final", "description": "Q18: 最终响应,确认收到 Q1_A + Q2_A", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "模拟 Agent 收到 Q1_A 和 Q2_A 后的确认" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_TAB_ENTER"], "bodyIncludes": ["toolu_e2e_adf_tab_enter"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "I received your selections: E2E_ADF_Q1_A for the first question, and E2E_ADF_Q2_A for the second question. Continuing." } }, { "id": "upstream-conversation-ask-default-focus-enter-skip-call", "description": "Q19: AskUserQuestion 两题无预选 → Enter 跳过 Q1", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造 AskUserQuestion 两题等待态,测试 Enter 跳过 Q1" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_ENTER_SKIP"], "bodyIncludes": ["E2E_ADF_ENTER_SKIP"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_adf_enter_skip", "name": "AskUserQuestion", "input": { "questions": [ { "question": "E2E_ADF_Q1_SINGLE_SELECT", "header": "E2E enter skip Q1", "options": [ { "label": "E2E_ADF_Q1_A", "description": "Should be skipped by Enter." }, { "label": "E2E_ADF_Q1_B", "description": "Should be skipped by Enter." } ] }, { "question": "E2E_ADF_Q2_MULTI_SELECT", "header": "E2E enter skip Q2", "options": [ { "label": "E2E_ADF_Q2_A", "description": "Should be selected by Tab+Enter." }, { "label": "E2E_ADF_Q2_B", "description": "Second option for Q2." } ] } ] } } } }, { "id": "upstream-conversation-ask-default-focus-enter-skip-final", "description": "Q19: 最终响应,确认收到 Q2_A(Q1 已跳过)", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "模拟 Agent 收到 Q2_A 且 Q1 跳过后的确认" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_ENTER_SKIP"], "bodyIncludes": ["toolu_e2e_adf_enter_skip"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "Received: E2E_ADF_Q2_A for Q2. Q1 was skipped. Continuing with best judgment." } }, { "id": "upstream-conversation-ask-default-focus-multiselect-call", "description": "Q20: AskUserQuestion 多选题 → Space 勾选 Enter 确认", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造 AskUserQuestion 多选题等待态,测试 Space 勾选/取消 Enter 确认" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_MULTISELECT"], "bodyIncludes": ["E2E_ADF_MULTISELECT"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_adf_multiselect", "name": "AskUserQuestion", "input": { "questions": [ { "question": "E2E_ADF_Q2_MULTI_SELECT", "header": "E2E multi-select", "multiSelect": true, "options": [ { "label": "E2E_ADF_Q2_A", "description": "First multi-select option." }, { "label": "E2E_ADF_Q2_B", "description": "Second option — should be toggled off." }, { "label": "E2E_ADF_Q2_C", "description": "Third option." } ] } ] } } } }, { "id": "upstream-conversation-ask-default-focus-multiselect-final", "description": "Q20: 最终响应,确认收到 Q2_A + Q2_C(Q2_B 已取消)", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "模拟 Agent 收到 Q2_OPT_A + Q2_OPT_C 后的确认" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_MULTISELECT"], "bodyIncludes": ["toolu_e2e_adf_multiselect"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "Received selections: E2E_ADF_Q2_A and E2E_ADF_Q2_C. E2E_ADF_Q2_B was deselected. Continuing." } }, { "id": "upstream-conversation-ask-default-focus-escape-dismiss-call", "description": "Q22: AskUserQuestion 首题卡片初始焦点 → Escape dismiss", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定制造单题 AskUserQuestion 等待态,验证没有选项聚焦时卡片层 Escape 关闭整组问答" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "lastUserMessageIncludes": ["E2E_ADF_ESCAPE_DISMISS"], "bodyIncludes": ["E2E_ADF_ESCAPE_DISMISS"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "toolUse": { "id": "toolu_e2e_adf_escape_dismiss", "name": "AskUserQuestion", "input": { "questions": [ { "question": "E2E_ADF_Q1_SINGLE_SELECT", "header": "E2E initial card Escape dismiss", "options": [ { "label": "E2E_ADF_Q1_A", "description": "Must remain unselected before Escape." }, { "label": "E2E_ADF_Q1_B", "description": "Must remain unselected before Escape." } ] } ] } } } }, { "id": "upstream-conversation-ask-default-focus-escape-dismiss-final", "description": "Q22: Escape dismiss 后模型收到 declined tool_result 并正常收口", "metadata": { "kind": "main", "timingPolicy": "fast-text", "source": "synthetic", "syntheticReason": "稳定验证 dismiss 关闭 UI 后 declined tool_result 按当前产品语义回传模型,避免用未命中 fixture 的 500 重试做负向计时断言" }, "maxMatches": 1, "match": { "method": "POST", "pathIncludes": "/messages", "bodyIncludes": ["toolu_e2e_adf_escape_dismiss", "AskUserQuestion was declined"], "bodyExcludes": ["Generate a concise title", "CRITICAL: Respond with TEXT ONLY"] }, "response": { "statusCode": 200, "text": "E2E_ADF_ESCAPE_DISMISS_ACK" } } ] }