test: follow the empty overview's own call to action - #18
Merged
Conversation
`refactor: use step-by-step guide for desktop agents` gated the header's "安装命令行 Agent" on `installed.length || desktopInstalled`, so with nothing installed it is deliberately absent -- the empty state owns the call to action as its own primary button. The test still clicked the header one and failed to find it. The test now clicks the button the empty state actually renders, and asserts the header's is absent, so the arrangement this refactor chose is pinned rather than left to be rediscovered. Confirmed it still catches a regression: disconnecting the empty state's onClick fails it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
main上有 1 个前端测试失败,是 #17 留下的。新 CI 在 #17 合并时还没生效,所以没拦住。不是代码的问题,是测试过期了
refactor: use step-by-step guide for desktop agents把顶部的「安装命令行 Agent」按钮加了条件:这是有意的——什么都没装时,空状态自己有一个 primary 按钮「安装 Agent」承担引导,顶部工具栏不必重复一遍。但
EnvironmentOverviewPage.test.tsx:87仍然去点顶部那个,于是Unable to find an accessible element with the role "button" and name "安装命令行 Agent"。改成点空状态实际渲染的那个按钮,并额外断言顶部那个不存在——把 #17 选择的这个布局钉住,而不是留给下一个人重新发现。
做了变异测试确认它仍然有效:把空状态按钮的
onClick断开,测试立刻失败。验证
go vet无输出、go test -race ./...全过、前端pnpm run build通过、pnpm run test156/156。修完这个,
main三道门全绿。🤖 Generated with Claude Code