@@ -22,6 +22,8 @@ import {
2222 doNavigationClose ,
2323 waitForToast ,
2424 acceptAppNotificationAlert ,
25+ dismissBackgroundPaymentsTimedSheet ,
26+ acknowledgeReceivedPayment ,
2527} from '../helpers/actions' ;
2628import { bitcoinURL , lndConfig } from '../helpers/constants' ;
2729import { reinstallApp } from '../helpers/setup' ;
@@ -193,10 +195,13 @@ describe('@send - Send', () => {
193195 // console.info(JSON.stringify(dec, null, 2));
194196 const response = await lnd . sendPaymentSync ( { paymentRequest : receive , amt : '10000' } ) ;
195197 console . info ( { response } ) ;
196- await elementById ( 'ReceivedTransaction' ) . waitForDisplayed ( ) ;
197- await tap ( 'ReceivedTransactionButton' ) ;
198- await sleep ( 500 ) ;
199- await dismissQuickPayIntro ( ) ;
198+ await acknowledgeReceivedPayment ( ) ;
199+ if ( driver . isIOS ) {
200+ await dismissBackgroundPaymentsTimedSheet ( { triggerTimedSheet : driver . isIOS } ) ;
201+ await dismissQuickPayIntro ( { triggerTimedSheet : driver . isIOS } ) ;
202+ } else {
203+ await dismissQuickPayIntro ( ) ;
204+ }
200205
201206 const totalBalance = await elementByIdWithin ( 'TotalBalance-primary' , 'MoneyText' ) ;
202207 await expect ( totalBalance ) . toHaveText ( '110 000' ) ; // 100k onchain + 10k lightning
@@ -464,9 +469,7 @@ describe('@send - Send', () => {
464469 await swipeFullScreen ( 'down' ) ;
465470 const r = await lnd . sendPaymentSync ( { paymentRequest : receive2 , amt : '10000' } ) ;
466471 console . info ( { r } ) ;
467- await elementById ( 'ReceivedTransaction' ) . waitForDisplayed ( ) ;
468- await tap ( 'ReceivedTransactionButton' ) ;
469- await sleep ( 500 ) ;
472+ await acknowledgeReceivedPayment ( ) ;
470473 await expectTextWithin ( 'ActivitySpending' , '14 000' ) ;
471474
472475 const { paymentRequest : invoice9 } = await lnd . addInvoice ( { value : '10000' } ) ;
0 commit comments