Skip to content

Commit 4f6fd9f

Browse files
committed
extract acknowledgeExternalSuccess()
1 parent 0285ba1 commit 4f6fd9f

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

test/helpers/actions.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,15 @@ export async function acknowledgeReceivedPayment() {
711711
await sleep(300);
712712
}
713713

714+
/** Acknowledges the external success notification by tapping the button.
715+
*/
716+
export async function acknowledgeExternalSuccess() {
717+
await elementById('ExternalSuccess').waitForDisplayed();
718+
await sleep(500);
719+
await tap('ExternalSuccess-button');
720+
await sleep(300);
721+
}
722+
714723
/**
715724
* Triggers the timed backup sheet by navigating to settings and back.
716725
* Since timed sheets are sometimes triggered by user behavior (when user goes back to home screen),

test/specs/lnurl.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
dismissBackgroundPaymentsTimedSheet,
2525
enterAddressViaScanPrompt,
2626
acknowledgeReceivedPayment,
27+
acknowledgeExternalSuccess,
2728
} from '../helpers/actions';
2829
import { reinstallApp } from '../helpers/setup';
2930
import { ciIt } from '../helpers/suite';
@@ -142,8 +143,7 @@ describe('@lnurl - LNURL', () => {
142143
// Success toast/flow
143144
if (driver.isIOS) await waitForToast('SpendingBalanceReadyToast');
144145
if (driver.isAndroid) await dismissQuickPayIntro();
145-
await elementById('ExternalSuccess').waitForDisplayed({ timeout: 30_000 });
146-
await tap('ExternalSuccess-button');
146+
await acknowledgeExternalSuccess();
147147
if (driver.isIOS) {
148148
await dismissBackgroundPaymentsTimedSheet();
149149
await dismissQuickPayIntro({ triggerTimedSheet: driver.isIOS });

test/specs/transfer.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
doNavigationClose,
2222
waitForToast,
2323
getTextUnder,
24+
acknowledgeExternalSuccess,
2425
} from '../helpers/actions';
2526
import {
2627
checkChannelStatus,
@@ -311,8 +312,7 @@ describe('@transfer - Transfer', () => {
311312
await dragOnElement('GRAB', 'right', 0.95);
312313
console.info('channel opening...');
313314
await sleep(1000);
314-
await elementById('ExternalSuccess').waitForDisplayed();
315-
await tap('ExternalSuccess-button');
315+
await acknowledgeExternalSuccess();
316316
await tap('NavigationBack');
317317
await doNavigationClose();
318318

0 commit comments

Comments
 (0)