修复持久目标模式切换测试的异步竞态
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 5m11s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 5m4s
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 5m50s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m59s
Project CI / AI game creator shell Rust crates (push) Successful in 2m28s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 4m37s
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled

- developer-agent-window.suite.ts 在切换目标模式前等待按钮脱离 disabled,避免读取历史链路在途时点击落空导致 aria-pressed 断言偶发失败
This commit was merged in pull request #428.
This commit is contained in:
2026-09-19 01:21:05 +08:00
parent 769740a46d
commit ea141d9f17
@@ -2519,6 +2519,11 @@ export function registerDeveloperAgentWindowTests() {
const emptyGoalPanel = await screen.findByLabelText('Agent Goal 状态');
expect(within(emptyGoalPanel).getByText('尚未开始')).not.toBeNull();
// 读取历史的异步链路未结束时按钮处于 disabled,等它可用再切换模式,避免点击落空。
const goalModeButton = screen.getByRole('button', { name: '目标' });
await waitFor(() => {
expect(goalModeButton.hasAttribute('disabled')).toBe(false);
});
selectDeveloperAgentChatMode('goal');
expect(
screen.getByRole('button', { name: '目标' }).getAttribute('aria-pressed'),