Skip to content

Commit 44d4df1

Browse files
committed
SpendingBalanceReadyToast + lnurl adjustments
1 parent d96a7c8 commit 44d4df1

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

test/helpers/actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ export async function receiveOnchainFunds(
671671
}
672672

673673
export type ToastId =
674+
| 'SpendingBalanceReadyToast'
674675
| 'BalanceUnitSwitchedToast'
675676
| 'BalanceHiddenToast'
676677
| 'RgsUpdatedToast'

test/specs/lightning.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import {
2626
dismissBackgroundPaymentsTimedSheet,
2727
acknowledgeReceivedPayment,
2828
waitForBackup,
29+
waitForToast,
2930
} from '../helpers/actions';
3031
import { reinstallApp } from '../helpers/setup';
3132
import { bitcoinURL, lndConfig } from '../helpers/constants';
@@ -99,8 +100,7 @@ describe('@lightning - Lightning', () => {
99100
await waitForActiveChannel(lnd, ldkNodeId);
100101

101102
// Toast message
102-
await expectText('Spending Balance Ready');
103-
await expectText('Spending Balance Ready', { visible: false });
103+
await waitForToast('SpendingBalanceReadyToast');
104104

105105
// check channel status
106106
await checkChannelStatus();

test/specs/lnurl.e2e.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import {
2121
expectText,
2222
dismissQuickPayIntro,
2323
doNavigationClose,
24+
waitForToast,
25+
dismissBackgroundPaymentsTimedSheet,
2426
} from '../helpers/actions';
2527
import { reinstallApp } from '../helpers/setup';
2628
import { ciIt } from '../helpers/suite';
@@ -128,6 +130,7 @@ describe('@lnurl - LNURL', () => {
128130

129131
const channelRequestPromise = waitForEvent(lnurlServer, 'channelRequest:action');
130132
await elementById('ConnectButton').waitForDisplayed();
133+
// await sleep(100000);
131134
await tap('ConnectButton');
132135
await channelRequestPromise;
133136

@@ -142,10 +145,14 @@ describe('@lnurl - LNURL', () => {
142145
await waitForActiveChannel(lnd as any, ldkNodeID);
143146

144147
// Success toast/flow
145-
await dismissQuickPayIntro();
148+
if (driver.isIOS) await waitForToast('SpendingBalanceReadyToast')
149+
if (driver.isAndroid) await dismissQuickPayIntro();
146150
await elementById('ExternalSuccess').waitForDisplayed({ timeout: 30_000 });
147151
await tap('ExternalSuccess-button');
148-
152+
if (driver.isIOS) {
153+
await dismissBackgroundPaymentsTimedSheet();
154+
await dismissQuickPayIntro({ triggerTimedSheet: driver.isIOS });
155+
}
149156
await expectTextWithin('ActivitySpending', '20 001');
150157

151158
// lnurl-pay (min != max) with comment

test/specs/send.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
mineBlocks,
2121
dismissQuickPayIntro,
2222
doNavigationClose,
23+
waitForToast,
2324
} from '../helpers/actions';
2425
import { bitcoinURL, lndConfig } from '../helpers/constants';
2526
import { reinstallApp } from '../helpers/setup';
@@ -161,7 +162,7 @@ describe('@send - Send', () => {
161162
await waitForActiveChannel(lnd, ldkNodeId);
162163

163164
// Toast message
164-
await expectText('Spending Balance Ready');
165+
await waitForToast('SpendingBalanceReadyToast');
165166

166167
// check channel status
167168
await checkChannelStatus();

test/specs/transfer.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
enterAddress,
2020
dismissQuickPayIntro,
2121
doNavigationClose,
22+
waitForToast,
2223
} from '../helpers/actions';
2324
import {
2425
checkChannelStatus,
@@ -331,7 +332,7 @@ describe('@transfer - Transfer', () => {
331332

332333
await mineBlocks(rpc, 6);
333334
await electrum?.waitForSync();
334-
await expectText('Spending Balance Ready');
335+
await waitForToast('SpendingBalanceReadyToast');
335336
await dismissQuickPayIntro();
336337
await waitForActiveChannel(lnd, ldkNodeId);
337338

0 commit comments

Comments
 (0)