Skip to content

Commit 920a49a

Browse files
Merge pull request #52 from input-output-hk/fix/test_ids
fix: replace data-testid attributes with props
2 parents 876bca2 + 5af6152 commit 920a49a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/design-system/profile-dropdown/accounts/profile-dropdown-account-item.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const AccountItem = ({
6363
justifyContent="space-between"
6464
gap="$8"
6565
className={cx.root}
66-
data-testid="wallet-account-item"
66+
testId="wallet-account-item"
6767
>
6868
<div
6969
style={{ display: 'contents' }}

src/design-system/profile-dropdown/accounts/profile-dropdown-accounts-list.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const AccountsList = ({
3535
const hasMultipleUnlockedAccounts =
3636
accounts.filter(a => a.isUnlocked).length > 1;
3737
return (
38-
<Flex gap="$16" flexDirection="column" data-testid="wallet-accounts-list">
38+
<Flex gap="$16" flexDirection="column" testId="wallet-accounts-list">
3939
{accounts.map(a => (
4040
<AccountItem
4141
key={a.accountNumber}

src/design-system/text-link/text-link.component.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ import type { OmitClassName } from '../../types';
1313
export type Props = OmitClassName<'a'> & {
1414
disabled?: boolean;
1515
label?: string;
16+
testId?: string;
1617
px?: keyof typeof spacing;
1718
};
1819

1920
export const TextLink = ({
2021
disabled = false,
2122
px = '$8',
2223
label,
24+
testId,
2325
...props
2426
}: Readonly<Props>): JSX.Element => {
2527
return (
@@ -30,6 +32,7 @@ export const TextLink = ({
3032
alignItems="center"
3133
justifyContent="center"
3234
px={px}
35+
testId={testId}
3336
>
3437
<Flex alignItems="center" justifyContent="center">
3538
<Text.Button

0 commit comments

Comments
 (0)