@@ -715,12 +715,25 @@ export async function acknowledgeReceivedPayment() {
715715 * await doTriggerTimedSheet();
716716 */
717717export async function doTriggerTimedSheet ( ) {
718+ await sleep ( 700 ) ; // wait for any previous animations to finish
718719 await tap ( 'HeaderMenu' ) ;
719720 await tap ( 'DrawerSettings' ) ;
720721 await sleep ( 500 ) ; // wait for the app to settle
721722 await doNavigationClose ( ) ;
722723}
723724
725+ export async function dismissBackgroundPaymentsTimedSheet ( {
726+ triggerTimedSheet = false ,
727+ } : { triggerTimedSheet ?: boolean } = { } ) {
728+ if ( triggerTimedSheet ) {
729+ await doTriggerTimedSheet ( ) ;
730+ }
731+ await elementById ( 'BackgroundPaymentsDescription' ) . waitForDisplayed ( ) ;
732+ await sleep ( 500 ) ; // wait for the app to settle
733+ await tap ( 'BackgroundPaymentsCancel' ) ;
734+ await sleep ( 500 ) ;
735+ }
736+
724737/**
725738 * Dismisses the backup reminder sheet.
726739 * This sheet is triggered by first onchain balance change.
@@ -744,7 +757,7 @@ export async function dismissBackupTimedSheet({
744757 }
745758 await elementById ( 'BackupIntroViewDescription' ) . waitForDisplayed ( ) ;
746759 await sleep ( 500 ) ; // wait for the app to settle
747- await tap ( 'BackupIntroViewCancel ') ;
760+ await swipeFullScreen ( 'down ') ;
748761 await sleep ( 500 ) ;
749762}
750763
@@ -766,14 +779,22 @@ export async function dismissBackupTimedSheet({
766779export async function dismissQuickPayIntro ( {
767780 triggerTimedSheet = false ,
768781} : { triggerTimedSheet ?: boolean } = { } ) {
769- if ( driver . isIOS ) return ; // Not supported on iOS yet
770782 if ( triggerTimedSheet ) {
771783 await doTriggerTimedSheet ( ) ;
772784 }
773- await elementById ( 'QuickpayIntro-button' ) . waitForDisplayed ( ) ;
774- await sleep ( 500 ) ; // wait for the app to settle
775- await swipeFullScreen ( 'down' ) ;
776- await sleep ( 500 ) ;
785+
786+ if ( driver . isAndroid ) {
787+ // TODO: it's temp, change on Android to match iOS testID
788+ await elementById ( 'QuickpayIntro-button' ) . waitForDisplayed ( ) ;
789+ await sleep ( 500 ) ; // wait for the app to settle
790+ await swipeFullScreen ( 'down' ) ;
791+ await sleep ( 500 ) ;
792+ } else {
793+ await elementById ( 'QuickpayIntroDescription' ) . waitForDisplayed ( ) ;
794+ await sleep ( 500 ) ; // wait for the app to settle
795+ await tap ( 'QuickpayIntroCancel' ) ;
796+ await sleep ( 500 ) ;
797+ }
777798}
778799
779800/**
0 commit comments