File tree Expand file tree Collapse file tree 4 files changed +17
-4
lines changed
Expand file tree Collapse file tree 4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import SwiftUI
33struct WalletBalanceView : View {
44 let type : WalletType
55 let sats : UInt64
6+ var amountTestIdentifier : String ?
67
78 @EnvironmentObject var currency : CurrencyViewModel
89
@@ -20,6 +21,7 @@ struct WalletBalanceView: View {
2021 . padding ( . trailing, 4 )
2122
2223 SubtitleText ( btcComponents. value)
24+ . accessibilityIdentifierIfPresent ( amountTestIdentifier)
2325 }
2426 } else {
2527 HStack ( spacing: 4 ) {
@@ -30,6 +32,7 @@ struct WalletBalanceView: View {
3032 SubtitleText ( converted. symbol)
3133 . frame ( maxWidth: 12 )
3234 SubtitleText ( converted. formatted)
35+ . accessibilityIdentifierIfPresent ( amountTestIdentifier)
3336 }
3437 }
3538 }
Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ struct HomeView: View {
2626 VStack ( spacing: 0 ) {
2727 HStack ( spacing: 0 ) {
2828 NavigationLink ( value: Route . savingsWallet) {
29- WalletBalanceView ( type: . onchain, sats: UInt64 ( wallet. totalOnchainSats) )
29+ WalletBalanceView (
30+ type: . onchain,
31+ sats: UInt64 ( wallet. totalOnchainSats) ,
32+ amountTestIdentifier: " ActivitySavings "
33+ )
3034 }
3135
3236 Divider ( )
@@ -36,7 +40,11 @@ struct HomeView: View {
3640 . padding ( . leading, 16 )
3741
3842 NavigationLink ( value: Route . spendingWallet) {
39- WalletBalanceView ( type: . lightning, sats: UInt64 ( wallet. totalLightningSats) )
43+ WalletBalanceView (
44+ type: . lightning,
45+ sats: UInt64 ( wallet. totalLightningSats) ,
46+ amountTestIdentifier: " ActivitySpending "
47+ )
4048 }
4149 }
4250 . frame ( maxWidth: . infinity, alignment: . leading)
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ struct SavingsWalletView: View {
1414 sats: wallet. totalOnchainSats,
1515 showSymbol: true ,
1616 showEyeIcon: false ,
17- enableSwipeGesture: true
17+ enableSwipeGesture: true ,
18+ testIdPrefix: " TotalBalance "
1819 )
1920 . padding ( . top)
2021
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ struct SpendingWalletView: View {
1414 sats: wallet. totalLightningSats,
1515 showSymbol: true ,
1616 showEyeIcon: false ,
17- enableSwipeGesture: true
17+ enableSwipeGesture: true ,
18+ testIdPrefix: " TotalBalance "
1819 )
1920 . padding ( . top)
2021
You can’t perform that action at this time.
0 commit comments