MCPcopy
hub / github.com/BlueWallet/BlueWallet / goBack

Function goBack

tests/e2e/helperz.js:360–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358}
359
360export async function goBack() {
361 if (device.getPlatform() !== 'ios') {
362 await device.pressBack();
363 return;
364 }
365
366 const callsite = captureCallsite(goBack);
367
368 // Try each back/close affordance in order; retry the full set up to 10 times.
369 const candidates = [by.id('BackButton'), by.id('NavigationCloseButton'), by.label('Back'), by.text('Close')];
370
371 for (let attempt = 0; attempt < 10; attempt++) {
372 for (const matcher of candidates) {
373 try {
374 await element(matcher).atIndex(0).tap();
375 return;
376 } catch (_) {
377 /* try next */
378 }
379 }
380 await sleep(500);
381 }
382
383 rethrowWithCallsite(new Error('goBack: no back/close affordance tappable after 10 attempts.'), callsite);
384}
385
386export async function typeTextIntoAlertInput(text) {
387 if (device.getPlatform() === 'android') {

Callers 11

bluewallet.spec.jsFile · 0.90
handleBackButtonFunction · 0.85
ScanLNDInvoiceFunction · 0.85
LNDCreateInvoiceFunction · 0.85
LNDViewInvoiceFunction · 0.85
TransactionStatusFunction · 0.85
ConfirmFunction · 0.85
createWalletFunction · 0.85
ManageWalletsFunction · 0.85

Calls 4

captureCallsiteFunction · 0.85
rethrowWithCallsiteFunction · 0.85
sleepFunction · 0.70
textMethod · 0.45

Tested by

no test coverage detected