|
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 |
|
@@ -595,12 +597,6 @@ export async function handleAndroidAlert( |
595 | 597 | } |
596 | 598 | } |
597 | 599 |
|
598 | | -export async function doNavigationClose() { |
599 | | - await tap('HeaderMenu'); |
600 | | - await tap('DrawerWallet'); |
601 | | - await sleep(500); |
602 | | -} |
603 | | - |
604 | 600 | export async function getSeed(): Promise<string> { |
605 | 601 | await openSettings('security'); |
606 | 602 | await tap('BackupWallet'); |
@@ -1194,23 +1190,6 @@ export async function acknowledgeExternalSuccess() { |
1194 | 1190 | await sleep(300); |
1195 | 1191 | } |
1196 | 1192 |
|
1197 | | -/** |
1198 | | - * Triggers the timed backup sheet by navigating to settings and back. |
1199 | | - * Since timed sheets are sometimes triggered by user behavior (when user goes back to home screen), |
1200 | | - * we need to trigger them manually. |
1201 | | - * |
1202 | | - * @example |
1203 | | - * // Trigger backup sheet before testing dismissal |
1204 | | - * await doTriggerTimedSheet(); |
1205 | | - */ |
1206 | | -export async function doTriggerTimedSheet() { |
1207 | | - await sleep(700); // wait for any previous animations to finish |
1208 | | - await tap('HeaderMenu'); |
1209 | | - await tap('DrawerSettings'); |
1210 | | - await sleep(500); // wait for the app to settle |
1211 | | - await doNavigationClose(); |
1212 | | -} |
1213 | | - |
1214 | 1193 | export async function dismissBackgroundPaymentsTimedSheet({ |
1215 | 1194 | triggerTimedSheet = false, |
1216 | 1195 | }: { triggerTimedSheet?: boolean } = {}) { |
|
0 commit comments