✅ 加固 UI 异步断言与 E2E 保存结果观察 - #1727
Open
cyfung1031 wants to merge 6 commits into
Open
Conversation
cyfung1031
marked this pull request as draft
September 5, 2026 02:39
Collaborator
Author
|
astra 烧了整个上午的token. 下午做最终审查后改回正式PR |
cyfung1031
marked this pull request as ready for review
September 5, 2026 05:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
修正 PR #1727 中两层测试在 #1532 合并后出现的异步观察偏差,并把可重复执行的约束写入 agent 文档和 ESLint 配置。
实际改动
waitFor交互、重复包装查询和固定休眠增加三个边界明确的 ESLint 规则及规则测试;交互/查询规则按真实导入绑定识别本地别名并尊重词法遮蔽,同名普通函数或对象不会误报;timer Promise 规则覆盖直接 resolver 回调,不提供自动修复。waitFor(getBy*)和无条件 timer,保留请求完成、拖拽监听器注册及有限负向观察窗口等真实契约。{ saveOutcome: "failure" },等待对应的 error toast。旧通知、任意 toast 和列表外壳都不能完成断言。AGENTS.md要求修改测试、helper 或 runner 前走测试规范路由并建模成功/失败两种结果。CI 失败修正
CI shard 2 的
user-config-yaml.spec.ts失败原因是恶意__proto__配置本应触发保存失败,但 helper 无条件等待成功通知。当前用例显式等待失败信号,并在重建后的本地完整 E2E 与 CI 中通过。验证
pnpm run typecheck、Prettier、完整 ESLint、i18n/issue-template checks、pnpm run buildpassed。user-config-yaml.spec.ts2/2 passed。onloadend观察窗口波动。隔离重跑该用例(含一次 retry)通过,138/138。6e064871的 CI:Lint、Vitest 两分片、E2E 四分片、Run tests、Codecov、FOSSA 全部通过。