test: trigger form test (#38305)

This commit is contained in:
二货爱吃白萝卜 2022-10-31 21:23:59 +08:00 committed by GitHub
parent 0eb368f84a
commit ea2d5b4482
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(2000);
await waitFakeTimer(2000, 2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('aaa');
await changeValue(0, '2');
await waitFakeTimer(2000);
await waitFakeTimer(2000, 2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('ccc');
await changeValue(0, '1');
await waitFakeTimer(2000);
await waitFakeTimer(2000, 2000);
expect(container.querySelector('.ant-form-item-explain-error')).toHaveTextContent('aaa');
});
});