1
0
Fork 0
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:
Chaim Lev-Ari 2022-06-28 19:36:40 +03:00 committed by GitHub
parent ed8f9b5931
commit 882051cc30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 158 additions and 25 deletions

View file

@ -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}
/>
);