@@ -145,14 +145,14 @@ describe('@lnurl - LNURL', () => {
145145 await waitForActiveChannel ( lnd as any , ldkNodeID ) ;
146146
147147 // Success toast/flow
148- if ( driver . isIOS ) await waitForToast ( 'SpendingBalanceReadyToast' )
148+ if ( driver . isIOS ) await waitForToast ( 'SpendingBalanceReadyToast' ) ;
149149 if ( driver . isAndroid ) await dismissQuickPayIntro ( ) ;
150150 await elementById ( 'ExternalSuccess' ) . waitForDisplayed ( { timeout : 30_000 } ) ;
151151 await tap ( 'ExternalSuccess-button' ) ;
152152 if ( driver . isIOS ) {
153153 await dismissBackgroundPaymentsTimedSheet ( ) ;
154154 await dismissQuickPayIntro ( { triggerTimedSheet : driver . isIOS } ) ;
155- }
155+ }
156156 await expectTextWithin ( 'ActivitySpending' , '20 001' ) ;
157157
158158 // lnurl-pay (min != max) with comment
@@ -182,7 +182,12 @@ describe('@lnurl - LNURL', () => {
182182 await multiTap ( 'NRemove' , 3 ) ; // remove "201"
183183 await multiTap ( 'N9' , 2 ) ;
184184 await expectTextWithin ( 'SendNumberField' , '99' ) ;
185- await elementById ( 'ContinueAmount' ) . waitForEnabled ( { reverse : true } ) ;
185+ if ( driver . isIOS ) {
186+ await tap ( 'ContinueAmount' ) ;
187+ await waitForToast ( 'LnurlPayAmountTooLowToast' ) ;
188+ } else {
189+ await elementById ( 'ContinueAmount' ) . waitForEnabled ( { reverse : true } ) ;
190+ }
186191 await multiTap ( 'NRemove' , 2 ) ; // remove "99"
187192 // go with 150
188193 await tap ( 'N1' ) ;
@@ -224,11 +229,24 @@ describe('@lnurl - LNURL', () => {
224229 } ) ;
225230 console . log ( 'payRequest2' , payRequest2 ) ;
226231
227- await tap ( 'Scan' ) ;
228- await tap ( 'ScanPrompt' ) ;
229- await typeText ( 'QRInput' , payRequest2 . encoded ) ;
230- await confirmInputOnKeyboard ( ) ;
231- await tap ( 'DialogConfirm' ) ;
232+ try {
233+ await tap ( 'Scan' ) ;
234+ await tap ( 'ScanPrompt' ) ;
235+ await typeText ( 'QRInput' , payRequest2 . encoded ) ;
236+ await confirmInputOnKeyboard ( ) ;
237+ await tap ( 'DialogConfirm' ) ;
238+ await sleep ( 1000 ) ;
239+ await elementById ( 'ReviewAmount-primary' ) . waitForDisplayed ( { timeout : 5000 } ) ;
240+ } catch {
241+ console . warn ( 'ReviewAmount not found, trying again' ) ;
242+ await dismissQuickPayIntro ( { triggerTimedSheet : driver . isIOS } ) ;
243+ await tap ( 'Scan' ) ;
244+ await tap ( 'ScanPrompt' ) ;
245+ await typeText ( 'QRInput' , payRequest2 . encoded ) ;
246+ await confirmInputOnKeyboard ( ) ;
247+ await tap ( 'DialogConfirm' ) ;
248+ await sleep ( 1000 ) ;
249+ }
232250 // Comment input should not be visible
233251 await elementById ( 'CommentInput' ) . waitForDisplayed ( { reverse : true } ) ;
234252 const reviewAmt = await elementByIdWithin ( 'ReviewAmount-primary' , 'MoneyText' ) ;
@@ -283,11 +301,22 @@ describe('@lnurl - LNURL', () => {
283301 } ) ;
284302 console . log ( 'withdrawRequest1' , withdrawRequest1 ) ;
285303
286- await tap ( 'Scan' ) ;
287- await tap ( 'ScanPrompt' ) ;
288- await typeText ( 'QRInput' , withdrawRequest1 . encoded ) ;
289- await confirmInputOnKeyboard ( ) ;
290- await tap ( 'DialogConfirm' ) ;
304+ try {
305+ await tap ( 'Scan' ) ;
306+ await tap ( 'ScanPrompt' ) ;
307+ await typeText ( 'QRInput' , withdrawRequest1 . encoded ) ;
308+ await confirmInputOnKeyboard ( ) ;
309+ await tap ( 'DialogConfirm' ) ;
310+ await elementById ( 'SendNumberField' ) . waitForDisplayed ( { timeout : 5000 } ) ;
311+ } catch {
312+ console . warn ( 'SendNumberField not found, trying again' ) ;
313+ await dismissQuickPayIntro ( { triggerTimedSheet : driver . isIOS } ) ;
314+ await tap ( 'Scan' ) ;
315+ await tap ( 'ScanPrompt' ) ;
316+ await typeText ( 'QRInput' , withdrawRequest1 . encoded ) ;
317+ await confirmInputOnKeyboard ( ) ;
318+ await tap ( 'DialogConfirm' ) ;
319+ }
291320 await expectTextWithin ( 'SendNumberField' , '102' ) ;
292321 await tap ( 'ContinueAmount' ) ;
293322 await tap ( 'WithdrawConfirmButton' ) ;
0 commit comments