fix(评论): 输入文字读取 comment_text,修复输入框为空

- CommentItem.to_dict 的键是 comment_text,input_text 之前读 item['text'] 拿不到 → 步骤 ok 但没输入
- foreach_comment 兼容补 text 键
- test_comment 覆盖真实键名
This commit is contained in:
2026-10-31 10:26:22 +08:00
parent b9bee52878
commit 7b0d8d8a0f
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ class _D:
w5 = gt.GenericStepsWorker("S1", {"steps": []})
w5._vars["comment"] = {"text": "输入框评论"}
w5._vars["comment"] = {"comment_text": "输入框评论"}
w5._verify_input = lambda d, text, clear: True
w5._exec_input_text(_D(), {"text_source": "comment", "clear_first": True})
check("input_text 取评论内容", sent.get("text"), "输入框评论")