Skip to content

Commit

Permalink
add data-testid for ButtonText
Browse files Browse the repository at this point in the history
  • Loading branch information
lkowalczyk87 committed Jun 26, 2024
1 parent 3ddf376 commit 9dbe053
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libs/generic-view/ui/src/lib/buttons/button-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export const ButtonText: APIFC<undefined, ButtonTextConfig> = ({
...props
}) => {
return (
<Button {...props} action={config.action} $modifiers={config.modifiers}>
<Button
{...props}
action={config.action}
$modifiers={config.modifiers}
data-testid={`button-text_${props.componentKey}`}
>
{children}
{config.icon && <Icon className={"icon"} data={{ type: config.icon }} />}
<span>{config.text}</span>
Expand Down

0 comments on commit 9dbe053

Please sign in to comment.