chore: create new tests for the UI, namely normnode, and one for all nodes

This commit is contained in:
Björn Otgaar
2025-11-27 17:14:19 +01:00
parent f87c7fed03
commit c5d9b8342d
7 changed files with 999 additions and 11 deletions

View File

@@ -37,7 +37,11 @@ function DraggableNode({ className, children, nodeType, onDrop }: DraggableNodeP
});
return (
<div className={className} ref={draggableRef}>
<div className={className}
ref={draggableRef}
id={`draggable-${nodeType}`}
data-testid={`draggable-${nodeType}`}
>
{children}
</div>
);
@@ -120,6 +124,7 @@ export function DndToolbar() {
{/* Maps over all the nodes that are droppable, and puts them in the panel */}
{droppableNodes.map(({type, data}) => (
<DraggableNode
key={type}
className={styles[`draggable-node-${type}`]} // Our current style signature for nodes
nodeType={type}
onDrop={handleNodeDrop}