Merge pull request #2895 from wbkd/chore/plugin-testids
Add data-testids for plugins
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'@reactflow/background': patch
|
||||||
|
'@reactflow/controls': patch
|
||||||
|
'@reactflow/core': patch
|
||||||
|
'@reactflow/minimap': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
add data-testid for controls, minimap and background
|
||||||
@@ -59,6 +59,7 @@ function Background({
|
|||||||
left: 0,
|
left: 0,
|
||||||
}}
|
}}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
data-testid="rf__background"
|
||||||
>
|
>
|
||||||
<pattern
|
<pattern
|
||||||
id={patternId}
|
id={patternId}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user