From 911eed5e6784315123ae01945a33aa6ad77954b2 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Tue, 29 Sep 2026 22:38:08 +0800 Subject: [PATCH] test: wait for runtime readiness before question submission Wait for the enabled send control rather than its initial presence. Preserve the question rounds, saved answers, skip, and reload assertions; production behavior and bilingual release notes are unchanged. --- docs/development/release-preparation-0.15.4.md | 9 +++++++++ docs/quality/recurring-defects.md | 4 ++++ src/renderer/src/App.test.tsx | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/development/release-preparation-0.15.4.md b/docs/development/release-preparation-0.15.4.md index 899d10ad..78c8b75a 100644 --- a/docs/development/release-preparation-0.15.4.md +++ b/docs/development/release-preparation-0.15.4.md @@ -36,3 +36,12 @@ schema 49 在既有 SQLite 事务中迁移项目与会话选择,不引入额 所有探针结束时归属进程为 0,用户设置只在临时加密副本中读取,测试副本已清理。 - 既有开发记录缺少完整 UI 目测及全仓通过结果,保留边界,不将局部通过冒充全量。 完整测试与生产构建交由精确提交 CI;不执行本地生产构建、打包或安装包启动。 + +## 首轮候选 CI + +`ed47e2c` 已同步两个远端。Agent `36580699297` 三平台验证通过。 +Desktop `36580699255` 为 5,472 通过、52 跳过、1 失败,生产构建未执行, +尚未创建任何本轮发布标签。问答测试在 Runtime 就绪前点击仍禁用的发送按钮, +没有产生首个请求;按现有异步同步机制等待按钮可用,保留全部问答与重载断言。 +该修正仅影响测试和发布记录,运行时源码、锁文件及双语发布说明不变。 +修正后完整 `App.test.tsx` 314 项通过,类型检查与 lint 再次通过。 diff --git a/docs/quality/recurring-defects.md b/docs/quality/recurring-defects.md index a0a60376..1195e505 100644 --- a/docs/quality/recurring-defects.md +++ b/docs/quality/recurring-defects.md @@ -57,6 +57,10 @@ AI 列 280。测试同步原生输入与实际状态后独立复跑通过,保 `activeElement.textContent` 包含消息文字判断导航完成,`body` 也会满足,随后真正的 消息聚焦会关闭刚打开的菜单。应同时断言焦点元素是消息 `article`,不只匹配后代文本。 原生 Runtime 控件用例须等当前项目的能力请求及启动渲染完成,再打开失焦关闭的选项菜单。 +2026-09-29 的 0.15.4 候选 CI 中,问答轮次用例仅等“发送”按钮存在便点击; +Runtime 状态尚未匹配当前选择时按钮仍禁用,点击不会发出请求。发送前应以现有 +`waitFor` 等待按钮可用,而不是将按钮存在等同于 Runtime 就绪。保留问答保存、 +跳过与重载的全部断言,不延长全局超时。 ## 整窗遮罩与原生拖动区域 diff --git a/src/renderer/src/App.test.tsx b/src/renderer/src/App.test.tsx index 18a8a17f..4216377a 100644 --- a/src/renderer/src/App.test.tsx +++ b/src/renderer/src/App.test.tsx @@ -12361,7 +12361,8 @@ describe("App", () => { fireEvent.change(screen.getByLabelText("向 GoodBuddy 提问"), { target: { value: "需要确认的任务" }, }); - fireEvent.click(await screen.findByLabelText("发送")); + await waitFor(() => expect(screen.getByLabelText("发送")).toBeEnabled()); + fireEvent.click(screen.getByLabelText("发送")); await waitFor(() => expect(run).toHaveBeenCalledOnce()); const request = run.mock.calls[0]?.[0]; if (!request) {