Skip to content

Commit

Permalink
test: add data-testid attribute on card value
Browse files Browse the repository at this point in the history
  • Loading branch information
ickas committed Feb 22, 2024
1 parent 1c298a9 commit 2e9d349
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/molecules/card-value/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface CardValueProps {
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
className?: string;
style?: React.CSSProperties;
dataTestId?: string;
}

const CardValue = (props: CardValueProps) => {
Expand All @@ -23,10 +24,15 @@ const CardValue = (props: CardValueProps) => {
onClick,
className = 'card-value',
style,
dataTestId,
} = props;

return (
<Styles.CardValueStyle className={className} style={style}>
<Styles.CardValueStyle
className={className}
style={style}
data-testid={dataTestId}
>
<Label value={label} currency={currency} />
<span>{value}</span>
{description && <p>{description}</p>}
Expand Down

0 comments on commit 2e9d349

Please sign in to comment.