From b04a02c59b931c4990801d2a5b3af9b9f2cf6012 Mon Sep 17 00:00:00 2001 From: Kito Clark Date: Tue, 6 Aug 2024 10:25:00 +1000 Subject: [PATCH] ensure data-testid only gets added to trigger element --- lib/components/ActionsMenu/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/components/ActionsMenu/index.js b/lib/components/ActionsMenu/index.js index a71ebb0b..4bf87da3 100644 --- a/lib/components/ActionsMenu/index.js +++ b/lib/components/ActionsMenu/index.js @@ -257,6 +257,7 @@ export const ActionsMenuBody = ({ onTriggerFocus, closeMenu, closeOnClick = false, + "data-testid": dataTestId, ...props }) => { const id = useId(); @@ -285,7 +286,8 @@ export const ActionsMenuBody = ({ ref: triggerRef, ...props, ...children.props, - "data-state": actionMenu.open ? "open" : "closed" + "data-state": actionMenu.open ? "open" : "closed", + "data-testid": dataTestId }) };