Update test with new input interaction

This commit is contained in:
Eric NGUYEN 2022-09-14 17:36:18 +02:00
parent 498ca9dc75
commit 84f25af490

View file

@ -75,6 +75,13 @@ describe.concurrent('Properties', () => {
fireEvent.change(propertyParentId as Element, { target: { value: 'parentedId' } });
fireEvent.change(propertyX as Element, { target: { value: '2' } });
fireEvent.change(propertyY as Element, { target: { value: '2' } });
expect(handleChange).toBeCalledTimes(0);
expect(prop.x).toBe(1);
expect(prop.y).toBe(1);
fireEvent.keyUp(propertyX as Element, { key: 'Enter' });
fireEvent.keyUp(propertyY as Element, { key: 'Enter' });
expect(handleChange).toBeCalledTimes(2);
expect(prop.id).toBe('stuff');