Tests using react-dnd with useDrag and useDrop Tests using react-dnd with useDrag and useDrop reactjs reactjs

Tests using react-dnd with useDrag and useDrop


I copied this from the github ticket and worked for me:

const dragAndDrop = (src: Element, dst: Element) => {  fireEvent.dragStart(src);  fireEvent.dragEnter(dst);  fireEvent.drop(dst);  fireEvent.dragLeave(dst);  fireEvent.dragEnd(src); };const allSections = rendered.getAllByRole('dropzone');const marketSection = allSections[0];const marketExpandedSection = allSections[1];const basisIdDrag = within(marketSection).getByRole('draggable');act(() => {  dragAndDrop(basisIdDrag, marketExpandedSection);});