Skip to content

Commit 788ef80

Browse files
committed
feat: add property testId to TokenProfile
1 parent a812114 commit 788ef80

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/design-system/assets-table/assets-table-token-profile.component.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,32 @@ interface Props {
1111
imageSrc: string;
1212
name: string;
1313
description: string;
14+
testId?: string;
1415
}
1516

1617
export const TokenProfile = ({
1718
imageSrc,
1819
name,
1920
description,
21+
testId = 'token-profile',
2022
}: Readonly<Props>): JSX.Element => {
2123
return (
2224
<div className={cx.container}>
2325
<Grid columns="$fitContent" gutters="$0">
2426
<Cell>
2527
<Box mr="$24">
26-
<Image imageSrc={imageSrc} alt={name} testId="token-icon" />
28+
<Image imageSrc={imageSrc} alt={name} testId={`${testId}-icon`} />
2729
</Box>
2830
</Cell>
2931
<Cell>
30-
<Text.Body.Large weight="$semibold" data-testid="token-name">
32+
<Text.Body.Large weight="$semibold" data-testid={`${testId}-name`}>
3133
{name}
3234
</Text.Body.Large>
3335
<Box>
3436
<Text.Body.Normal
3537
color="secondary"
3638
weight="$semibold"
37-
data-testid="token-ticker"
39+
data-testid={`${testId}-ticker`}
3840
>
3941
{description}
4042
</Text.Body.Normal>

src/design-system/profile-picture/image.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Image = ({
2121
alt,
2222
delayMs = 600,
2323
selected,
24-
testId = 'image',
24+
testId = 'profile-picture',
2525
}: Readonly<Props>): JSX.Element => (
2626
<RadixUIAvatar.Root
2727
className={classNames(cx.root, cx.container, {

0 commit comments

Comments
 (0)