Merge pull request #4844 from xyflow/chore/custom-data-testid

Chore/custom data testid
This commit is contained in:
Moritz Klack
2024-11-24 14:23:20 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Allow custom data-testid for ReactFlow component
@@ -153,11 +153,11 @@ function ReactFlow<NodeType extends Node = Node, EdgeType extends Edge = Edge>(
return ( return (
<div <div
data-testid="rf__wrapper"
{...rest} {...rest}
style={{ ...style, ...wrapperStyle }} style={{ ...style, ...wrapperStyle }}
ref={ref} ref={ref}
className={cc(['react-flow', className, colorModeClassName])} className={cc(['react-flow', className, colorModeClassName])}
data-testid="rf__wrapper"
id={id} id={id}
> >
<Wrapper <Wrapper