-
DragDropList
- {childList.map((child, index) => (
-
{}}
- onClick={() => {
- onMoveItem({
- source: { index: 0 },
- destination: { index: 1 },
- });
- }}
- >
- {children({ child: child[1], childId: child[0], index, draginfo })}
-
- ))}
-
- );
+vi.mock('@plone/volto/components/manage/DragDropList/DragDropList', () => {
+ return {
+ default: ({ childList, onMoveItem, children }) => {
+ // Create mock drag info without jest functions to avoid DOM warnings
+ const draginfo = {
+ innerRef: () => {},
+ draggableProps: {},
+ dragHandleProps: {},
+ };
+ return (
+
+
DragDropList
+ {childList.map((child, index) => (
+
{}}
+ onClick={() => {
+ onMoveItem({
+ source: { index: 0 },
+ destination: { index: 1 },
+ });
+ }}
+ >
+ {children({
+ child: child[1],
+ childId: child[0],
+ index,
+ draginfo,
+ })}
+
+ ))}
+
+ );
+ },
};
});
-jest.mock('@plone/volto/components/theme/Icon/Icon', () => () => (
-