Skip to content

Commit 10fed8f

Browse files
committed
adjust backup
1 parent d1ea055 commit 10fed8f

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

test/helpers/actions.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,7 @@ export async function waitForBackup() {
832832
await tap('HeaderMenu');
833833
await tap('DrawerSettings');
834834
await tap('BackupSettings');
835-
const allSynced = await elementById('AllSynced');
836-
await allSynced.waitForDisplayed();
835+
await elementById('AllSynced').waitForDisplayed();
837836
await doNavigationClose();
838837
}
839838

test/specs/backup.e2e.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
sleep,
1717
tap,
1818
typeText,
19+
waitForBackup,
1920
} from '../helpers/actions';
2021
import { 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

Comments
 (0)