稳定 GDD 恢复弹层测试时序
Project CI / Repository checks (pull_request) Successful in 3m47s
Project CI / Frontend tests (pull_request) Successful in 5m14s
Project CI / Backend tests (pull_request) Successful in 7m38s
Project CI / Native shell tests (pull_request) Successful in 15m45s

等待初始 hydrate 完成后再断言提交按钮可用
保留恢复期间禁用提交和输入内容回归验证
This commit is contained in:
2026-09-02 13:15:34 +08:00
parent 45d8bad188
commit 24ab773283
@@ -250,13 +250,15 @@ export function registerPlanGddApprovalTests() {
const dialog = openReviseDialog();
const textarea = typeComment(dialog, '战斗节奏太慢,请压缩到三个回合');
expect(
(
within(dialog).getByRole('button', {
name: '提交决定',
}) as HTMLButtonElement
).disabled,
).toBe(false);
await waitFor(() => {
expect(
(
within(dialog).getByRole('button', {
name: '提交决定',
}) as HTMLButtonElement
).disabled,
).toBe(false);
});
// 弹层是打开之后才被后台 hydrate 翻掉决定资格的:触发按钮的 disabled 管不到它。
harness.setPlanGddState(createPlanGddStateView({ recoveryPending: true }));