Merge pull request #2895 from wbkd/chore/plugin-testids
Add data-testids for plugins
This commit is contained in:
8
.changeset/empty-carpets-reply.md
Normal file
8
.changeset/empty-carpets-reply.md
Normal 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
|
||||
@@ -59,6 +59,7 @@ function Background({
|
||||
left: 0,
|
||||
}}
|
||||
ref={ref}
|
||||
data-testid="rf__background"
|
||||
>
|
||||
<pattern
|
||||
id={patternId}
|
||||
|
||||
@@ -68,7 +68,12 @@ const Controls: FC<PropsWithChildren<ControlProps>> = ({
|
||||
};
|
||||
|
||||
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 && (
|
||||
<>
|
||||
<ControlButton
|
||||
|
||||
@@ -161,7 +161,12 @@ function MiniMap({
|
||||
: undefined;
|
||||
|
||||
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
|
||||
width={elementWidth}
|
||||
height={elementHeight}
|
||||
|
||||
Reference in New Issue
Block a user