test: fix form test case (#38276)

This commit is contained in:
afc163 2022-10-30 15:20:39 +08:00 committed by GitHub
parent b0fe69c18f
commit 9893efeb51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,15 +179,15 @@ describe('Form', () => {
const { container } = render(<Demo />);
await changeValue(0, '1');
await waitFakeTimer();
await waitFakeTimer(2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('aaa');
await changeValue(0, '2');
await waitFakeTimer();
await waitFakeTimer(2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('ccc');
await changeValue(0, '1');
await waitFakeTimer();
await waitFakeTimer(2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('aaa');
});
});