|
1 | 1 | import type { ChainablePromiseElement } from 'webdriverio'; |
2 | 2 | import { reinstallApp } from './setup'; |
3 | 3 | import { deposit, mineBlocks } from './regtest'; |
4 | | -import { openSettings } from './settings'; |
| 4 | +import { doNavigationClose, doTriggerTimedSheet, openSettings } from './navigation'; |
| 5 | + |
| 6 | +export { doNavigationClose, doTriggerTimedSheet } from './navigation'; |
5 | 7 |
|
6 | 8 | export const sleep = (ms: number) => browser.pause(ms); |
7 | 9 |
|
@@ -604,12 +606,6 @@ export async function handleAndroidAlert( |
604 | 606 | } |
605 | 607 | } |
606 | 608 |
|
607 | | -export async function doNavigationClose() { |
608 | | - await tap('HeaderMenu'); |
609 | | - await tap('DrawerWallet'); |
610 | | - await sleep(500); |
611 | | -} |
612 | | - |
613 | 609 | export async function getSeed(): Promise<string> { |
614 | 610 | await openSettings('security'); |
615 | 611 | await tap('BackupWallet'); |
@@ -1203,23 +1199,6 @@ export async function acknowledgeExternalSuccess() { |
1203 | 1199 | await sleep(300); |
1204 | 1200 | } |
1205 | 1201 |
|
1206 | | -/** |
1207 | | - * Triggers the timed backup sheet by navigating to settings and back. |
1208 | | - * Since timed sheets are sometimes triggered by user behavior (when user goes back to home screen), |
1209 | | - * we need to trigger them manually. |
1210 | | - * |
1211 | | - * @example |
1212 | | - * // Trigger backup sheet before testing dismissal |
1213 | | - * await doTriggerTimedSheet(); |
1214 | | - */ |
1215 | | -export async function doTriggerTimedSheet() { |
1216 | | - await sleep(700); // wait for any previous animations to finish |
1217 | | - await tap('HeaderMenu'); |
1218 | | - await tap('DrawerSettings'); |
1219 | | - await sleep(500); // wait for the app to settle |
1220 | | - await doNavigationClose(); |
1221 | | -} |
1222 | | - |
1223 | 1202 | export async function dismissBackgroundPaymentsTimedSheet({ |
1224 | 1203 | triggerTimedSheet = false, |
1225 | 1204 | }: { triggerTimedSheet?: boolean } = {}) { |
|
0 commit comments