Skip to content

test(qt): IME 组合/提交/取消的行为断言 (#155) - #206

Merged
JavaZeroo merged 3 commits into
mainfrom
feat/qt-ime-smoke
Oct 29, 2026
Merged

JavaZeroo merged 3 commits into
mainfrom
feat/qt-ime-smoke

Conversation

@JavaZeroo

Copy link
Copy Markdown
Owner

内容

在 qt_cpp_shell_smoke 中新增 #155 的行为断言:

  1. 发送 QInputMethodEvent(仅 preedit tfime_preedit)→ 断言会话屏幕没有该文本;
  2. 发送 commit TFIME_COMMIT → 断言会话收到(cmd 回显);
  3. 发送 preedit tfime_cancel 后以空 preedit 取消 → 断言屏幕没有 tfime_cancel,且已提交的 TFIME_COMMIT 仍在。

这样"组合不写、提交写入、取消不写"在 CI 上有行为级证据,而不只是编译通过。

边界

Refs #155

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T20:47:40.539798Z 2eabdfa PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/qt/shell_smoke.cpp
Comment on lines +382 to +383
require(has_text(model.screen(), "TFIME_COMMIT"), "cancel removed already committed text");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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.


The commit path leaves text in cmd's line editor; the smoke test now backspaces it away and asserts the line is clean before typing exit.
@JavaZeroo
JavaZeroo merged commit def8a37 into main Oct 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant