File tree Expand file tree Collapse file tree 5 files changed +25
-15
lines changed
Expand file tree Collapse file tree 5 files changed +25
-15
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ struct NumberPadTextField: View {
7171 }
7272 . contentShape ( Rectangle ( ) )
7373 . animation ( springAnimation, value: currency. primaryDisplay)
74+ . accessibilityElement ( children: . contain)
75+ . accessibilityIdentifierIfPresent ( testIdentifier)
7476 }
7577
7678 @ViewBuilder
@@ -87,7 +89,6 @@ struct NumberPadTextField: View {
8789 + Text( viewModel. getPlaceholder ( currency: currency) )
8890 . foregroundColor ( isFocused ? . textSecondary : . textPrimary) )
8991 . font ( . custom( Fonts . black, size: 44 ) )
90- . accessibilityIdentifierIfPresent ( testIdentifier)
9192 }
9293 }
9394}
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ struct FundManualAmountView: View {
5757 isDisabled: amountSats == 0 ,
5858 destination: FundManualConfirmView ( lnPeer: lnPeer, amountSats: amountSats)
5959 )
60+ . accessibilityIdentifier ( " ExternalAmountContinue " )
6061 }
6162 }
6263 . navigationBarHidden ( true )
Original file line number Diff line number Diff line change @@ -34,11 +34,15 @@ struct SpendingAdvancedView: View {
3434 DisplayText ( t ( " lightning__spending_advanced__title " ) , accentColor: . purpleAccent)
3535 . fixedSize ( horizontal: false , vertical: true )
3636
37- NumberPadTextField ( viewModel: amountViewModel, showConversion: false )
38- . onTapGesture {
39- amountViewModel. togglePrimaryDisplay ( currency: currency)
40- }
41- . padding ( . top, 32 )
37+ NumberPadTextField (
38+ viewModel: amountViewModel,
39+ showConversion: false ,
40+ testIdentifier: " SpendingAdvancedNumberField "
41+ )
42+ . onTapGesture {
43+ amountViewModel. togglePrimaryDisplay ( currency: currency)
44+ }
45+ . padding ( . top, 32 )
4246
4347 // Fee estimate
4448 HStack ( spacing: 4 ) {
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ struct SpendingAmount: View {
103103 guard let max = maxTransferAmount else { return }
104104 amountViewModel. updateFromSats ( max, currency: currency)
105105 }
106+ . accessibilityIdentifier ( " SpendingAmountMax " )
106107 }
107108 }
108109
Original file line number Diff line number Diff line change @@ -26,16 +26,19 @@ struct ReceiveEdit: View {
2626 SheetHeader ( title: t ( " wallet__receive_specify " ) , showBackButton: true )
2727
2828 VStack ( alignment: . leading, spacing: 0 ) {
29- NumberPadTextField ( viewModel: amountViewModel, isFocused: isAmountInputFocused)
30- . padding ( . bottom, isAmountInputFocused ? 0 : 32 )
31- . onTapGesture {
32- if isAmountInputFocused {
33- amountViewModel. togglePrimaryDisplay ( currency: currency)
34- } else {
35- isAmountInputFocused = true
36- }
29+ NumberPadTextField (
30+ viewModel: amountViewModel,
31+ isFocused: isAmountInputFocused,
32+ testIdentifier: " ReceiveNumberPadTextField "
33+ )
34+ . padding ( . bottom, isAmountInputFocused ? 0 : 32 )
35+ . onTapGesture {
36+ if isAmountInputFocused {
37+ amountViewModel. togglePrimaryDisplay ( currency: currency)
38+ } else {
39+ isAmountInputFocused = true
3740 }
38- . accessibilityIdentifier ( " ReceiveNumberPadTextField " )
41+ }
3942
4043 if !isAmountInputFocused {
4144 CaptionMText ( t ( " wallet__note " ) )
You can’t perform that action at this time.
0 commit comments