|
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 | 5 |
|
5 | 6 | export const sleep = (ms: number) => browser.pause(ms); |
6 | 7 |
|
@@ -610,9 +611,7 @@ export async function doNavigationClose() { |
610 | 611 | } |
611 | 612 |
|
612 | 613 | export async function getSeed(): Promise<string> { |
613 | | - await tap('HeaderMenu'); |
614 | | - await tap('DrawerSettings'); |
615 | | - await tap('BackupSettings'); |
| 614 | + await openSettings('security'); |
616 | 615 | await tap('BackupWallet'); |
617 | 616 |
|
618 | 617 | // get seed from SeedContainer |
@@ -810,9 +809,7 @@ async function assertAddressTypeSwitchFeedback() { |
810 | 809 | } |
811 | 810 |
|
812 | 811 | export async function switchPrimaryAddressType(nextType: addressTypePreference) { |
813 | | - await tap('HeaderMenu'); |
814 | | - await tap('DrawerSettings'); |
815 | | - await tap('AdvancedSettings'); |
| 812 | + await openSettings('advanced'); |
816 | 813 | await tap('AddressTypePreference'); |
817 | 814 | await tap(nextType); |
818 | 815 | await assertAddressTypeSwitchFeedback(); |
@@ -1165,6 +1162,8 @@ export type ToastId = |
1165 | 1162 | | 'TransactionRemovedToast' |
1166 | 1163 | | 'InvalidAddressToast' |
1167 | 1164 | | 'ExpiredLightningToast' |
| 1165 | + | 'DevModeEnabledToast' |
| 1166 | + | 'DevModeDisabledToast' |
1168 | 1167 | | 'InsufficientSpendingToast' |
1169 | 1168 | | 'InsufficientSavingsToast'; |
1170 | 1169 |
|
@@ -1363,9 +1362,7 @@ export async function acknowledgeHighBalanceWarning({ |
1363 | 1362 | // enable/disable widgets in settings |
1364 | 1363 | export async function toggleWidgets() { |
1365 | 1364 | await sleep(3000); |
1366 | | - await tap('HeaderMenu'); |
1367 | | - await tap('DrawerSettings'); |
1368 | | - await tap('GeneralSettings'); |
| 1365 | + await openSettings(); |
1369 | 1366 | await tap('WidgetsSettings'); |
1370 | 1367 | const widgets = await elementsByText('Widgets'); |
1371 | 1368 | await widgets[1].click(); |
@@ -1476,8 +1473,7 @@ export async function attemptRefreshOnHomeScreen() { |
1476 | 1473 | } |
1477 | 1474 |
|
1478 | 1475 | export async function waitForBackup() { |
1479 | | - await tap('HeaderMenu'); |
1480 | | - await tap('DrawerSettings'); |
| 1476 | + await openSettings('security'); |
1481 | 1477 | await tap('BackupSettings'); |
1482 | 1478 | await elementById('AllSynced').waitForDisplayed(); |
1483 | 1479 | await doNavigationClose(); |
|
0 commit comments