I’m using react-beautiful dnd with React 18, so we have to use wrapper with requestAnimationFrame
from this issue https://github.com/atlassian/react-beautiful-dnd/issues/2399#issuecomment-1175638194.
The problem is that in my tests
it('should allow to change the fields visibility state', async () => {
expect.hasAssertions();
const user = userEvent.setup();
render(<Component mockProps={MOCK_PROPS} />);
const checkboxes = await screen.findAllByRole('checkbox');
expect(checkboxes).toHaveLength(6);
await user.click(checkboxes[0]);
expect(checkboxes[0]).toHaveAttribute('data-state', 'unchecked');
on user click nothing happens, if I remove my dnd wrapper with requestAnimationFrame
all works fine.
How can I make this test work?