mirror of
https://github.com/portainer/portainer.git
synced 2025-08-03 04:45:21 +02:00
chore(sidebar): add data-cys [EE-3605] (#7143)
* chore(sidebar): add data-cys [EE-3605] fix [EE-3605]
This commit is contained in:
parent
ed8f9b5931
commit
882051cc30
10 changed files with 158 additions and 25 deletions
|
@ -1,12 +1,14 @@
|
|||
import { ReactNode } from 'react';
|
||||
import { Icon } from 'react-feather';
|
||||
|
||||
import { AutomationTestingProps } from '@/types';
|
||||
|
||||
import { Wrapper } from './Wrapper';
|
||||
import { Menu } from './Menu';
|
||||
import { Head } from './Head';
|
||||
import { getPathsForChildren } from './utils';
|
||||
|
||||
interface Props {
|
||||
interface Props extends AutomationTestingProps {
|
||||
icon?: Icon;
|
||||
to: string;
|
||||
params?: object;
|
||||
|
@ -22,6 +24,7 @@ export function SidebarItem({
|
|||
params,
|
||||
label,
|
||||
openOnPaths = [],
|
||||
'data-cy': dataCy,
|
||||
}: Props) {
|
||||
const childrenPath = getPathsForChildren(children);
|
||||
const head = (
|
||||
|
@ -31,6 +34,7 @@ export function SidebarItem({
|
|||
params={params}
|
||||
label={label}
|
||||
ignorePaths={childrenPath}
|
||||
data-cy={dataCy}
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue