Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased (develop)

- changed: Add testIDs to the send address tile buttons and the confirm slider to support UI test automation.

## 4.49.0 (staging)

- added: Monero wallet import support
Expand Down
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ export default [

'src/components/themed/SceneHeader.tsx',

'src/components/themed/SearchFooter.tsx',
'src/components/themed/SelectableRow.tsx',

'src/components/themed/ShareButtons.tsx',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ exports[`AccelerateTxModalComponent should render with loading props 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
},
]
}
testID="createWalletSearch"
>
<View
collapsable={false}
Expand Down Expand Up @@ -541,7 +542,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"opacity": 1,
}
}
testID="undefined.doneButton"
testID="createWalletSearch.doneButton"
>
<View
collapsable={false}
Expand Down Expand Up @@ -687,7 +688,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
]
}
submitBehavior="submit"
testID="undefined.textInput"
testID="createWalletSearch.textInput"
textAlignVertical="top"
/>
<View
Expand Down Expand Up @@ -724,7 +725,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"opacity": 1,
}
}
testID="undefined.clearIcon"
testID="createWalletSearch.clearIcon"
>
<View
collapsable={false}
Expand Down Expand Up @@ -968,6 +969,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"paddingHorizontal": 11,
}
}
testID="createRow.create-wallet:ethereum-ethereum"
>
<View
style={
Expand Down Expand Up @@ -1169,6 +1171,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"paddingHorizontal": 11,
}
}
testID="createRow.create-ethereum-1985365e9f78359a9b6ad760e32412f4a445e862"
>
<View
style={
Expand Down Expand Up @@ -1406,6 +1409,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"paddingHorizontal": 11,
}
}
testID="createRow.create-ethereum-221657776846890989a759ba2973e427dff5c9bb"
>
<View
style={
Expand Down Expand Up @@ -1643,6 +1647,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"paddingHorizontal": 11,
}
}
testID="createRow.create-ethereum-2e91e3e54c5788e9fdd6a181497fdcea1de1bcc1"
>
<View
style={
Expand Down Expand Up @@ -1880,6 +1885,7 @@ exports[`CreateWalletSelectCrypto should render with loading props 1`] = `
"paddingHorizontal": 11,
}
}
testID="createRow.create-ethereum-6b175474e89094c44da98b954eedeac495271d0f"
>
<View
style={
Expand Down
12 changes: 12 additions & 0 deletions src/__tests__/scenes/__snapshots__/SendScene2.ui.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,7 @@ exports[`SendScene2 1 spendTarget 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -3714,6 +3715,7 @@ exports[`SendScene2 1 spendTarget with info tiles 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -5723,6 +5725,7 @@ exports[`SendScene2 2 spendTargets 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -7313,6 +7316,7 @@ exports[`SendScene2 2 spendTargets hide tiles 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -8883,6 +8887,7 @@ exports[`SendScene2 2 spendTargets hide tiles 2`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -10220,6 +10225,7 @@ exports[`SendScene2 2 spendTargets hide tiles 3`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -11970,6 +11976,7 @@ exports[`SendScene2 2 spendTargets lock tiles 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -13671,6 +13678,7 @@ exports[`SendScene2 2 spendTargets lock tiles 2`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -15299,6 +15307,7 @@ exports[`SendScene2 2 spendTargets lock tiles 3`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down Expand Up @@ -16078,6 +16087,7 @@ exports[`SendScene2 Render SendScene 1`] = `
"opacity": 1,
}
}
testID="sendAddressEnter"
>
<Text
allowFontScaling={false}
Expand Down Expand Up @@ -16164,6 +16174,7 @@ exports[`SendScene2 Render SendScene 1`] = `
"opacity": 1,
}
}
testID="sendAddressScan"
>
<Text
allowFontScaling={false}
Expand Down Expand Up @@ -16252,6 +16263,7 @@ exports[`SendScene2 Render SendScene 1`] = `
"opacity": 1,
}
}
testID="sendAddressPaste"
>
<Text
allowFontScaling={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,7 @@ exports[`SwapConfirmationScene should render with loading props 1`] = `
},
]
}
testID="confirmSliderThumb"
>
<Text
adjustsFontSizeToFit={true}
Expand Down
2 changes: 2 additions & 0 deletions src/components/scenes/CreateWalletSelectCryptoScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ const CreateWalletSelectCryptoComponent: React.FC<Props> = (props: Props) => {
pluginId={pluginId}
tokenId={tokenId}
walletName={displayName}
testID={`createRow.${key}`}
onPress={async () => {
await handleCreateWalletToggle(key)
}}
Expand Down Expand Up @@ -445,6 +446,7 @@ const CreateWalletSelectCryptoComponent: React.FC<Props> = (props: Props) => {
withTopMargin
/>
<SimpleTextInput
testID="createWalletSearch"
verticalRem={0.5}
horizontalRem={1}
autoCorrect={false}
Expand Down
1 change: 1 addition & 0 deletions src/components/scenes/WalletListScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export const WalletListScene: React.FC<Props> = props => {
) : (
<SearchFooter
name={key}
testID="walletListSearch"
placeholder={lstrings.wallet_list_wallet_search}
isSearching={isSearching}
searchText={searchText}
Expand Down
3 changes: 3 additions & 0 deletions src/components/themed/CreateWalletSelectCryptoRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Props {
rightSide?: React.ReactNode
settingsSummary?: string
walletName: string
testID?: string

// Icon currency:
pluginId: string
Expand All @@ -29,6 +30,7 @@ export const CreateWalletSelectCryptoRowComponent: React.FC<Props> = props => {
rightSide,
settingsSummary,
walletName,
testID,

// Icon currency:
pluginId,
Expand Down Expand Up @@ -62,6 +64,7 @@ export const CreateWalletSelectCryptoRowComponent: React.FC<Props> = props => {
style={styles.container}
disabled={onPress == null}
onPress={handlePress}
testID={testID}
>
<CryptoIcon
marginRem={0.5}
Expand Down
1 change: 1 addition & 0 deletions src/components/themed/SafeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const SafeSlider: React.FC<Props> = props => {

<GestureDetector gesture={gesture}>
<Animated.View
testID="confirmSliderThumb"
style={[
styles.thumb,
sliderDisabled ? styles.disabledThumb : null,
Expand Down
3 changes: 3 additions & 0 deletions src/components/themed/SearchFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ interface SearchFooterProps {

noBackground?: boolean
sceneWrapperInfo?: SceneWrapperInfo
testID?: string

onChangeText: (value: string) => void
onCancel: () => void
Expand All @@ -34,6 +35,7 @@ export const SearchFooter: React.FC<SearchFooterProps> = props => {
searchText,
noBackground,
sceneWrapperInfo,
testID,

onChangeText,
onCancel,
Expand Down Expand Up @@ -90,6 +92,7 @@ export const SearchFooter: React.FC<SearchFooterProps> = props => {
onLayoutHeight={handleFooterLayoutHeight}
>
<SimpleTextInput
testID={testID}
returnKeyType="search"
placeholder={placeholder}
onChangeText={handleChangeText}
Expand Down
1 change: 1 addition & 0 deletions src/components/themed/WalletListCurrencyRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const WalletListCurrencyRowComponent = (
}
onLongPress={handleLongPress}
onPress={handlePress}
testID={`walletRow.${wallet.id}${tokenId == null ? '' : `.${tokenId}`}`}
paddingRem={0.5}
gradientBackground={{
colors: [primaryColor, '#00000000'],
Expand Down
4 changes: 4 additions & 0 deletions src/components/tiles/AddressTile2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ export const AddressTile2 = React.forwardRef(
>
<EdgeTouchableOpacity
style={styles.buttonContainer}
testID="sendAddressEnter"
onPress={handleChangeAddress}
>
<FontAwesome
Expand All @@ -531,6 +532,7 @@ export const AddressTile2 = React.forwardRef(
{canSelfTransfer ? (
<EdgeTouchableOpacity
style={styles.buttonContainer}
testID="sendAddressMyself"
onPress={handleSelfTransfer}
>
<AntDesign
Expand All @@ -545,6 +547,7 @@ export const AddressTile2 = React.forwardRef(
) : null}
<EdgeTouchableOpacity
style={styles.buttonContainer}
testID="sendAddressScan"
onPress={handleScan}
>
<FontAwesome5
Expand All @@ -558,6 +561,7 @@ export const AddressTile2 = React.forwardRef(
</EdgeTouchableOpacity>
<EdgeTouchableOpacity
style={styles.buttonContainer}
testID="sendAddressPaste"
onPress={handlePasteFromClipboard}
>
<FontAwesome5
Expand Down