From afb8bc00587da5cc33dbb25579e726731e193e29 Mon Sep 17 00:00:00 2001 From: Volodymyr Zakhovaiko Date: Fri, 1 Mar 2024 00:28:36 +0100 Subject: [PATCH] changed props --- packages/uniforms/__suites__/SelectField.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/uniforms/__suites__/SelectField.tsx b/packages/uniforms/__suites__/SelectField.tsx index 187fe9676..f9319b049 100644 --- a/packages/uniforms/__suites__/SelectField.tsx +++ b/packages/uniforms/__suites__/SelectField.tsx @@ -43,23 +43,23 @@ export function testSelectField(SelectField: ComponentType) { test(' - renders a select which correctly reacts on change (uncheck) by value', () => { const onChange = jest.fn(); renderWithZod({ - element: , + element: , schema: z.object({ x: z.enum(['a', 'b']) }), }); - const select = screen.getByRole('combobox'); + const select = screen.getByRole('listbox'); fireEvent.change(select, { target: { value: '' } }); - expect(onChange).toHaveBeenCalledWith(undefined); + expect(onChange).toHaveBeenCalledWith([]); }); test(' - renders a select which correctly reacts on change (uncheck) by selectedIndex', () => { const onChange = jest.fn(); renderWithZod({ - element: , + element: , schema: z.object({ x: z.enum(['a', 'b']) }), }); - const select = screen.getByRole('combobox'); + const select = screen.getByRole('listbox'); fireEvent.change(select, { target: { selectedIndex: -1 } }); - expect(onChange).toHaveBeenCalledWith(undefined); + expect(onChange).toHaveBeenCalledWith([]); }); // FIXME: This test is not working as expected