@@ -20,6 +20,7 @@ import {
2020 mineBlocks ,
2121 dismissQuickPayIntro ,
2222 doNavigationClose ,
23+ acceptAppNotificationAlert ,
2324} from '../helpers/actions' ;
2425import { bitcoinURL , lndConfig } from '../helpers/constants' ;
2526import { reinstallApp } from '../helpers/setup' ;
@@ -63,6 +64,7 @@ describe('@send - Send', () => {
6364
6465 ciIt ( '@send_1 - Validates payment data in the manual input' , async ( ) => {
6566 await tap ( 'Send' ) ;
67+ await acceptAppNotificationAlert ( 'permission_allow_foreground_only_button' ) ;
6668 await tap ( 'RecipientManual' ) ;
6769
6870 // check validation for empty address
@@ -222,7 +224,7 @@ describe('@send - Send', () => {
222224 const { paymentRequest : invoice1 } = await lnd . addInvoice ( { } ) ;
223225 console . info ( { invoice1 } ) ;
224226 await sleep ( 1000 ) ;
225- await enterAddress ( invoice1 ) ;
227+ await enterAddress ( invoice1 , { acceptCameraPermission : false } ) ;
226228 await elementById ( 'AssetButton-spending' ) . waitForDisplayed ( ) ;
227229 await tap ( 'N2' ) ;
228230 await multiTap ( 'N0' , 3 ) ;
@@ -240,7 +242,7 @@ describe('@send - Send', () => {
240242 console . info ( 'Editing invoice on review screen...' ) ;
241243 const { paymentRequest : invoice2 } = await lnd . addInvoice ( { value : '2000' } ) ;
242244 console . info ( { invoice2 } ) ;
243- await enterAddress ( invoice2 ) ;
245+ await enterAddress ( invoice2 , { acceptCameraPermission : false } ) ;
244246 const reviewAmt = await elementByIdWithin ( 'ReviewAmount-primary' , 'MoneyText' ) ;
245247 await reviewAmt . waitForDisplayed ( ) ;
246248 await expect ( reviewAmt ) . toHaveText ( '2 000' ) ;
@@ -280,7 +282,7 @@ describe('@send - Send', () => {
280282 } ) ;
281283 console . info ( { unified1 } ) ;
282284 await sleep ( 1000 ) ;
283- await enterAddress ( unified1 ) ;
285+ await enterAddress ( unified1 , { acceptCameraPermission : false } ) ;
284286 await expect ( reviewAmt ) . toHaveText ( '1 000' ) ; // invoice amount
285287 await dragOnElement ( 'GRAB' , 'right' , 0.95 ) ;
286288 await elementById ( 'SendSuccess' ) . waitForDisplayed ( ) ;
@@ -302,7 +304,7 @@ describe('@send - Send', () => {
302304 } ) ;
303305 console . info ( { unified2 } ) ;
304306 await sleep ( 1000 ) ;
305- await enterAddress ( unified2 ) ;
307+ await enterAddress ( unified2 , { acceptCameraPermission : false } ) ;
306308 // should only allow spending from savings
307309 await elementById ( 'AssetButton-savings' ) . waitForDisplayed ( ) ;
308310 await sleep ( 500 ) ;
@@ -334,7 +336,7 @@ describe('@send - Send', () => {
334336 // // console.info(JSON.stringify(dec, null, 2));
335337
336338 // await sleep(1000);
337- // await enterAddress(unified3);
339+ // await enterAddress(unified3, { acceptCameraPermission: false } );
338340 // await elementById('AssetButton-savings').waitForDisplayed();
339341 // await tap('N1');
340342 // await multiTap('N0', 4);
@@ -358,7 +360,7 @@ describe('@send - Send', () => {
358360 const unified4 = encode ( onchainAddress , { lightning : invoice5 } ) ;
359361 console . info ( { unified4 } ) ;
360362 await sleep ( 1000 ) ;
361- await enterAddress ( unified4 ) ;
363+ await enterAddress ( unified4 , { acceptCameraPermission : false } ) ;
362364 // max amount (lightning)
363365 await expectText ( '6 000' , { strategy : 'contains' } ) ; // current balance 8k - 1k reserve balance
364366 await tap ( 'AssetButton-switch' ) ;
@@ -384,7 +386,7 @@ describe('@send - Send', () => {
384386 const unified5 = encode ( onchainAddress , { lightning : invoice6 } ) ;
385387 console . info ( { unified5 } ) ;
386388 await sleep ( 1000 ) ;
387- await enterAddress ( unified5 ) ;
389+ await enterAddress ( unified5 , { acceptCameraPermission : false } ) ;
388390 // max amount (lightning)
389391 await tap ( 'AvailableAmount' ) ;
390392 await tap ( 'ContinueAmount' ) ;
@@ -426,7 +428,7 @@ describe('@send - Send', () => {
426428 await doNavigationClose ( ) ;
427429
428430 await sleep ( 1000 ) ;
429- await enterAddress ( invoice7 ) ;
431+ await enterAddress ( invoice7 , { acceptCameraPermission : false } ) ;
430432 await elementById ( 'SendSuccess' ) . waitForDisplayed ( ) ;
431433 await sleep ( 500 ) ;
432434 await tap ( 'Close' ) ;
@@ -443,7 +445,7 @@ describe('@send - Send', () => {
443445 } ) ;
444446 console . info ( { unified7 } ) ;
445447 await sleep ( 1000 ) ;
446- await enterAddress ( unified7 ) ;
448+ await enterAddress ( unified7 , { acceptCameraPermission : false } ) ;
447449 await elementById ( 'SendSuccess' ) . waitForDisplayed ( ) ;
448450 await sleep ( 500 ) ;
449451 await tap ( 'Close' ) ;
@@ -469,7 +471,7 @@ describe('@send - Send', () => {
469471 const { paymentRequest : invoice9 } = await lnd . addInvoice ( { value : '10000' } ) ;
470472 console . info ( { invoice9 } ) ;
471473 await sleep ( 1000 ) ;
472- await enterAddress ( invoice9 ) ;
474+ await enterAddress ( invoice9 , { acceptCameraPermission : false } ) ;
473475 await elementById ( 'ReviewAmount' ) . waitForDisplayed ( ) ;
474476 await swipeFullScreen ( 'down' ) ;
475477 } ) ;
0 commit comments