稳定 GDD 恢复弹层测试时序
等待初始 hydrate 完成后再断言提交按钮可用 保留恢复期间禁用提交和输入内容回归验证
This commit is contained in:
@@ -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 }));
|
||||
|
||||
Reference in New Issue
Block a user