File tree Expand file tree Collapse file tree 1 file changed +3
-22
lines changed
Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Original file line number Diff line number Diff line change 11import { execSync } from 'node:child_process' ;
2- import { elementsById , sleep , tap } from './actions' ;
2+ import { sleep } from './actions' ;
33import { getAppId , getAppPath } from './constants' ;
44
5- export async function launchFreshApp ( { tryHandleAlert = true } = { } ) {
5+ export async function launchFreshApp ( ) {
66 const appId = getAppId ( ) ;
77
88 await driver . terminateApp ( appId ) ;
99 await driver . activateApp ( appId ) ;
10- // workaround to get rid of "Bitkit is running in background" alert
11- if ( tryHandleAlert ) {
12- await sleep ( 1000 ) ;
13- try {
14- await tapBalanceToReset ( ) ;
15- } catch {
16- await tapBalanceToReset ( ) ;
17- }
18- }
19- await sleep ( 500 ) ;
20- }
21-
22- async function tapBalanceToReset ( ) {
23- await tap ( 'TotalBalance' ) ;
24- const moneyFiatSymbols = await elementsById ( 'MoneyFiatSymbol' ) ;
25- moneyFiatSymbols [ 0 ] . waitForDisplayed ( ) ;
26- moneyFiatSymbols [ 1 ] . waitForDisplayed ( ) ;
27- if ( ( await moneyFiatSymbols [ 1 ] . getText ( ) ) !== '₿' ) {
28- await tap ( 'TotalBalance' ) ;
29- }
10+ await sleep ( 3000 ) ;
3011}
3112
3213/**
You can’t perform that action at this time.
0 commit comments