Repository navigation
test(qt): IME 组合/提交/取消的行为断言 (#155) - #206
Conversation
…r refs #155 The smoke test now sends a preedit, a commit and a cancelled preedit through QInputMethodEvent and asserts that only the committed text reaches the session.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2eabdfaef7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| require(has_text(model.screen(), "TFIME_COMMIT"), "cancel removed already committed text"); | ||
| } |
There was a problem hiding this comment.
Clear committed IME input before sending the exit command
In the Windows cmd smoke test, TFIME_COMMIT is committed without a Return or any subsequent line clearing, so it remains in cmd's current input buffer. The existing keyClicks("exit 37") then appends to it, executing TFIME_COMMITexit 37 rather than exiting. Consequently, the natural-exit wait times out and none of the subsequent lifecycle scenarios run. After checking cancellation, clear the pending command line before sending exit 37.
Useful? React with 👍 / 👎.
…efs #155 QInputMethodEvent no longer exposes setPreeditString; the smoke test builds preedit events with the constructor instead.
内容
在
qt_cpp_shell_smoke中新增 #155 的行为断言:QInputMethodEvent(仅 preedittfime_preedit)→ 断言会话屏幕没有该文本;TFIME_COMMIT→ 断言会话收到(cmd 回显);tfime_cancel后以空 preedit 取消 → 断言屏幕没有tfime_cancel,且已提交的TFIME_COMMIT仍在。这样"组合不写、提交写入、取消不写"在 CI 上有行为级证据,而不只是编译通过。
边界
QInputMethodEvent驱动,不依赖真实输入法/拼音;真实 IME 的候选窗位置等仍由 [R2][输入验收] Qt IME 候选窗与固定拼音交叉验证 #155 的 VM 实验覆盖;Refs #155