Merge pull request #2895 from wbkd/chore/plugin-testids

Add data-testids for plugins
This commit is contained in:
Moritz Klack
2023-03-06 16:46:47 +01:00
committed by GitHub
4 changed files with 21 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
---
'@reactflow/background': patch
'@reactflow/controls': patch
'@reactflow/core': patch
'@reactflow/minimap': patch
---
add data-testid for controls, minimap and background
+1
View File
@@ -59,6 +59,7 @@ function Background({
left: 0, left: 0,
}} }}
ref={ref} ref={ref}
data-testid="rf__background"
> >
<pattern <pattern
id={patternId} id={patternId}
+6 -1
View File
@@ -68,7 +68,12 @@ const Controls: FC<PropsWithChildren<ControlProps>> = ({
}; };
return ( return (
<Panel className={cc(['react-flow__controls', className])} position={position} style={style}> <Panel
className={cc(['react-flow__controls', className])}
position={position}
style={style}
data-testid="rf__controls"
>
{showZoom && ( {showZoom && (
<> <>
<ControlButton <ControlButton
+6 -1
View File
@@ -161,7 +161,12 @@ function MiniMap({
: undefined; : undefined;
return ( return (
<Panel position={position} style={style} className={cc(['react-flow__minimap', className])}> <Panel
position={position}
style={style}
className={cc(['react-flow__minimap', className])}
data-testid="rf__minimap"
>
<svg <svg
width={elementWidth} width={elementWidth}
height={elementHeight} height={elementHeight}