diff --git a/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts index e87da4da5..fe387dd7d 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/plan-gdd.suite.ts @@ -155,6 +155,11 @@ export function registerPlanGddApprovalTests() { const dialog = openReviseDialog(); typeComment(dialog, '把核心循环压到三步'); + await waitFor(() => { + expect( + within(dialog).getByRole('button', { name: '提交决定' }), + ).toHaveProperty('disabled', false); + }); harness.failNextPlanGddDecision('PLAN_DURABILITY_FAILED'); fireEvent.click(screen.getByRole('button', { name: '提交决定' })); await waitFor(() => { @@ -163,6 +168,11 @@ export function registerPlanGddApprovalTests() { // 原样重试:属于方案 §13.2 的 busy/超时/网络重试,必须复用同一 responseId。 harness.failNextPlanGddDecision('PLAN_DURABILITY_FAILED'); + await waitFor(() => { + expect( + within(dialog).getByRole('button', { name: '提交决定' }), + ).toHaveProperty('disabled', false); + }); fireEvent.click(screen.getByRole('button', { name: '提交决定' })); await waitFor(() => { expect(harness.planGddDecisionCalls).toHaveLength(2); @@ -175,6 +185,11 @@ export function registerPlanGddApprovalTests() { // 「同 responseId 的审批意图不一致」硬拒,用户改写后的原因永远落不了盘。 typeComment(dialog, '把核心循环压到两步,并去掉天气系统'); harness.failNextPlanGddDecision('PLAN_DURABILITY_FAILED'); + await waitFor(() => { + expect( + within(dialog).getByRole('button', { name: '提交决定' }), + ).toHaveProperty('disabled', false); + }); fireEvent.click(screen.getByRole('button', { name: '提交决定' })); await waitFor(() => { expect(harness.planGddDecisionCalls).toHaveLength(3);