File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -651,9 +651,6 @@ export async function receiveOnchainFunds(
651651 await acknowledgeReceivedPayment ( ) ;
652652
653653 await mineBlocks ( rpc , blocksToMine ) ;
654- // if (blocksToMine > 0) {
655- // await waitForToast('PaymentConfirmedToast');
656- // }
657654
658655 if ( driver . isAndroid ) {
659656 await dismissBackupTimedSheet ( ) ;
@@ -674,6 +671,8 @@ export async function receiveOnchainFunds(
674671}
675672
676673export type ToastId =
674+ | 'BalanceUnitSwitchedToast'
675+ | 'BalanceHiddenToast'
677676 | 'RgsUpdatedToast'
678677 | 'RgsErrorToast'
679678 | 'ElectrumErrorToast'
@@ -684,10 +683,17 @@ export type ToastId =
684683 | 'TransactionUnconfirmedToast'
685684 | 'TransactionRemovedToast' ;
686685
687- export async function waitForToast ( toastId : ToastId , { waitToDisappear = true } = { } ) {
686+ export async function waitForToast (
687+ toastId : ToastId ,
688+ { waitToDisappear = false , dismiss = true } = { }
689+ ) {
688690 await elementById ( toastId ) . waitForDisplayed ( ) ;
689691 if ( waitToDisappear ) {
690692 await elementById ( toastId ) . waitForDisplayed ( { reverse : true } ) ;
693+ return ;
694+ }
695+ if ( dismiss ) {
696+ await dragOnElement ( toastId , 'up' , 0.2 ) ;
691697 }
692698}
693699
Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ describe('@settings - Settings', () => {
218218 await dragOnElement ( 'TotalBalance' , 'right' , 0.5 ) ;
219219 }
220220 await elementById ( 'ShowBalance' ) . waitForDisplayed ( ) ;
221+ if ( driver . isIOS ) {
222+ await waitForToast ( 'BalanceHiddenToast' , { waitToDisappear : false , dismiss : true } ) ;
223+ }
221224
222225 // Disable 'swipe to hide balance'
223226 await tap ( 'HeaderMenu' ) ;
You can’t perform that action at this time.
0 commit comments