diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx index b67e503f8d3e2..da74dcabaf1e8 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_create.test.tsx @@ -266,9 +266,7 @@ describe('', () => { it('should not allow invalid json', async () => { const { form, actions } = testBed; - await act(async () => { - actions.completeStepThree('{ invalidJsonString '); - }); + await actions.completeStepThree('{ invalidJsonString '); expect(form.getErrorsMessages()).toContain('Invalid JSON format.'); }); diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts index 025410129a002..2ce5aa2fccfc4 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_template_wizard/template_form.helpers.ts @@ -208,7 +208,9 @@ export const formSetup = async (initTestBed: SetupFunc) => { jsonString: settings, }); // Using mocked EuiCodeEditor } + }); + await act(async () => { clickNextButton(); });