mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
[Panel Header - Fullstory]: Make sure new menu's are findable in fullstory (#65167)
This commit is contained in:
@@ -72,6 +72,7 @@ export const Components = {
|
||||
Panel: {
|
||||
title: (title: string) => `data-testid Panel header ${title}`,
|
||||
headerItems: (item: string) => `Panel header item ${item}`,
|
||||
menuItems: (item: string) => `data-testid Panel menu item ${item}`,
|
||||
containerByTitle: (title: string) => `${title} panel`,
|
||||
headerCornerInfo: (mode: string) => `Panel header ${mode}`,
|
||||
},
|
||||
|
||||
@@ -46,6 +46,8 @@ export interface MenuItemProps<T = any> {
|
||||
customSubMenuContainerStyles?: CSSProperties;
|
||||
/** Shortcut key combination */
|
||||
shortcut?: string;
|
||||
/** Test id for e2e tests and fullstory*/
|
||||
testId?: string;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
@@ -68,6 +70,7 @@ export const MenuItem = React.memo(
|
||||
tabIndex = -1,
|
||||
customSubMenuContainerStyles,
|
||||
shortcut,
|
||||
testId,
|
||||
} = props;
|
||||
const styles = useStyles2(getStyles);
|
||||
const [isActive, setIsActive] = useState(active);
|
||||
@@ -150,6 +153,7 @@ export const MenuItem = React.memo(
|
||||
role={url === undefined ? role : undefined}
|
||||
data-role="menuitem" // used to identify menuitem in Menu.tsx
|
||||
ref={localRef}
|
||||
data-testid={testId}
|
||||
aria-label={ariaLabel}
|
||||
aria-checked={ariaChecked}
|
||||
tabIndex={tabIndex}
|
||||
|
||||
Reference in New Issue
Block a user