From 234f347cc2f8583be0ff3756d8401009ca98246c Mon Sep 17 00:00:00 2001 From: Sauli Purhonen Date: Thu, 7 Oct 2021 08:51:28 +0300 Subject: [PATCH] Fix for testing validation on blur --- src/__tests__/FormValidation.test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/__tests__/FormValidation.test.js b/src/__tests__/FormValidation.test.js index 4c4bf85e..d08a042f 100644 --- a/src/__tests__/FormValidation.test.js +++ b/src/__tests__/FormValidation.test.js @@ -56,8 +56,9 @@ describe("Test form render by custom schema", () => { const integerField = screen.getByLabelText(props.integerField.title + " *") expect(integerField).toBeInTheDocument() + userEvent.type(integerField, "Test value") + await waitFor(() => { - userEvent.type(integerField, "Test value") integerField.blur() })