|
@@ -56,6 +56,11 @@ export type Props = {
|
56
|
56
|
*/
|
57
|
57
|
onKeyPress?: Function,
|
58
|
58
|
|
|
59
|
+ /**
|
|
60
|
+ * TestId of the element, if any.
|
|
61
|
+ */
|
|
62
|
+ testId?: string,
|
|
63
|
+
|
59
|
64
|
/**
|
60
|
65
|
* Action text.
|
61
|
66
|
*/
|
|
@@ -112,6 +117,7 @@ const ContextMenuItem = ({
|
112
|
117
|
onClick,
|
113
|
118
|
onKeyDown,
|
114
|
119
|
onKeyPress,
|
|
120
|
+ testId,
|
115
|
121
|
text,
|
116
|
122
|
textClassName }: Props) => {
|
117
|
123
|
const styles = useStyles();
|
|
@@ -126,6 +132,7 @@ const ContextMenuItem = ({
|
126
|
132
|
disabled && styles.contextMenuItemDisabled,
|
127
|
133
|
className
|
128
|
134
|
) }
|
|
135
|
+ data-testid = { testId }
|
129
|
136
|
id = { id }
|
130
|
137
|
key = { text }
|
131
|
138
|
onClick = { disabled ? undefined : onClick }
|