@@ -16,6 +16,7 @@ import {
1616 sleep ,
1717 tap ,
1818 typeText ,
19+ waitForBackup ,
1920} from '../helpers/actions' ;
2021import { ciIt } from '../helpers/suite' ;
2122
@@ -66,9 +67,11 @@ describe('@backup - Backup', () => {
6667 await typeText ( 'TagInput' , tag ) ;
6768 await tap ( 'ActivityTagsSubmit' ) ;
6869 // workaround for Android keyboard not hiding (only in emulator)
69- await confirmInputOnKeyboard ( ) ;
70+ if ( driver . isAndroid ) {
71+ await confirmInputOnKeyboard ( ) ;
72+ }
7073 await sleep ( 200 ) ;
71- await doNavigationClose ( ) ;
74+ await tap ( 'NavigationBack' ) ;
7275 await tap ( 'NavigationBack' ) ;
7376
7477 // - change settings (currency to GBP) //
@@ -82,6 +85,7 @@ describe('@backup - Backup', () => {
8285 await doNavigationClose ( ) ;
8386
8487 // - add widgets (add PriceWidget) //
88+ await sleep ( 1000 ) ; // wait for the app to settle
8589 await deleteAllDefaultWidgets ( ) ;
8690 await tap ( 'WidgetsAdd' ) ;
8791 await tap ( 'WidgetsOnboarding-button' ) ;
@@ -99,8 +103,7 @@ describe('@backup - Backup', () => {
99103
100104 // - backup seed and restore wallet //
101105 const seed = await getSeed ( ) ;
102- // await waitForBackup();
103- await sleep ( 10_000 ) ; //temp wait (until we have a proper event for backup completion)
106+ await waitForBackup ( ) ;
104107 await restoreWallet ( seed ) ;
105108
106109 // - check if everything was restored
@@ -111,12 +114,9 @@ describe('@backup - Backup', () => {
111114 // check widget
112115 await elementById ( 'PriceWidget' ) . waitForDisplayed ( ) ;
113116 // check metadata
114-
115- // data backup not fully functional yet
116- // https://github.com/synonymdev/bitkit-android/issues/321
117- // await tap('ActivitySavings');
118- // await tap('Activity-1');
119- // const tagElement = await elementById('Tag-${tag}');
120- // await tagElement.waitForDisplayed();
117+ await tap ( 'ActivitySavings' ) ;
118+ await tap ( 'Activity-1' ) ;
119+ const tagElement = await elementById ( `Tag-${ tag } -delete` ) ;
120+ await tagElement . waitForDisplayed ( ) ;
121121 } ) ;
122122} ) ;
0 commit comments