Skip to content

Commit 8a823ef

Browse files
committed
test: add missing testIDs for maestro selectors
1 parent 1c1839d commit 8a823ef

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/__tests__/scenes/__snapshots__/CreateWalletSelectCryptoScene.test.tsx.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
968968
"paddingHorizontal": 11,
969969
}
970970
}
971+
testID="createWalletRow.create-wallet:ethereum-ethereum"
971972
>
972973
<View
973974
style={
@@ -1169,6 +1170,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
11691170
"paddingHorizontal": 11,
11701171
}
11711172
}
1173+
testID="createWalletRow.create-ethereum-1985365e9f78359a9b6ad760e32412f4a445e862"
11721174
>
11731175
<View
11741176
style={
@@ -1406,6 +1408,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
14061408
"paddingHorizontal": 11,
14071409
}
14081410
}
1411+
testID="createWalletRow.create-ethereum-221657776846890989a759ba2973e427dff5c9bb"
14091412
>
14101413
<View
14111414
style={
@@ -1643,6 +1646,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
16431646
"paddingHorizontal": 11,
16441647
}
16451648
}
1649+
testID="createWalletRow.create-ethereum-2e91e3e54c5788e9fdd6a181497fdcea1de1bcc1"
16461650
>
16471651
<View
16481652
style={
@@ -1880,6 +1884,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
18801884
"paddingHorizontal": 11,
18811885
}
18821886
}
1887+
testID="createWalletRow.create-ethereum-6b175474e89094c44da98b954eedeac495271d0f"
18831888
>
18841889
<View
18851890
style={

src/components/scenes/CreateWalletSelectCryptoScene.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ const CreateWalletSelectCryptoComponent: React.FC<Props> = (props: Props) => {
393393
pluginId={pluginId}
394394
tokenId={tokenId}
395395
walletName={displayName}
396+
testID={`createWalletRow.${key}`}
396397
onPress={async () => {
397398
await handleCreateWalletToggle(key)
398399
}}

src/components/themed/CreateWalletSelectCryptoRow.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ interface Props {
1616
settingsSummary?: string
1717
walletName: string
1818

19+
/**
20+
* Selector for automated tests. A single `pluginId` renders several rows
21+
* (mainnet plus each token, and the Segwit/non-Segwit variants), so pass the
22+
* create-list item's unique key rather than the `pluginId`.
23+
*/
24+
testID?: string
25+
1926
// Icon currency:
2027
pluginId: string
2128
tokenId: EdgeTokenId
@@ -29,6 +36,7 @@ export const CreateWalletSelectCryptoRowComponent: React.FC<Props> = props => {
2936
rightSide,
3037
settingsSummary,
3138
walletName,
39+
testID,
3240

3341
// Icon currency:
3442
pluginId,
@@ -59,6 +67,7 @@ export const CreateWalletSelectCryptoRowComponent: React.FC<Props> = props => {
5967

6068
return (
6169
<EdgeTouchableOpacity
70+
testID={testID}
6271
style={styles.container}
6372
disabled={onPress == null}
6473
onPress={handlePress}

0 commit comments

Comments
 (0)