Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/helpers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ export async function acceptAppNotificationAlert(
export async function doNavigationClose() {
await tap('HeaderMenu');
await tap('DrawerWallet');
await sleep(500);
}

export async function getSeed(): Promise<string> {
Expand Down Expand Up @@ -671,6 +672,8 @@ export async function receiveOnchainFunds(
}

export type ToastId =
| 'BoostSuccessToast'
| 'BoostFailureToast'
| 'LnurlPayAmountTooLowToast'
| 'SpendingBalanceReadyToast'
| 'BalanceUnitSwitchedToast'
Expand Down
5 changes: 4 additions & 1 deletion test/specs/boost.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
waitForBackup,
restoreWallet,
enterAddress,
waitForToast,
} from '../helpers/actions';
import { bitcoinURL } from '../helpers/constants';
import initElectrum from '../helpers/electrum';
Expand Down Expand Up @@ -74,6 +75,7 @@ describe('@boost - Boost', () => {
await tap('Minus');
await tap('RecommendedFeeButton');
await dragOnElement('GRAB', 'right', 0.95); // Swipe to confirm
await waitForToast('BoostSuccessToast');

// check Activity
await elementById('BoostingIcon').waitForDisplayed();
Expand Down Expand Up @@ -189,7 +191,8 @@ describe('@boost - Boost', () => {
await tap('Minus');
await tap('RecommendedFeeButton');
await dragOnElement('GRAB', 'right', 0.95); // Swipe to confirm

await waitForToast('BoostSuccessToast');

// check Activity
await elementById('BoostingIcon').waitForDisplayed();
await elementById('ActivityShort-0').waitForDisplayed();
Expand Down
17 changes: 8 additions & 9 deletions test/specs/lnurl.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,32 +151,31 @@ describe('@lnurl - LNURL', () => {
await expectTextWithin('ActivitySpending', '20 001');

// lnurl-pay (min != max) with comment
const msats = 100000; // msats
const sats = (msats / 1000).toString();
const payRequest1 = await lnurlServer.generateNewUrl('payRequest', {
minSendable: msats, // msats
maxSendable: 200000, // msats
minSendable: 149500, // msats
maxSendable: 200999, // msats
metadata: '[["text/plain","lnurl-node1"]]',
commentAllowed: 12,
});
console.log('payRequest1', payRequest1);

await enterAddressViaScanPrompt(payRequest1.encoded, { acceptCameraPermission: false });
await expectTextWithin('SendNumberField', '0');
// Check amounts 99 - 201 not allowed
// Check that 149 sats is below minimum and 201 sats is above maximum (both rejected)
await tap('N2');
await tap('N0');
await tap('N1');
await expectTextWithin('SendNumberField', '201');
await elementById('ContinueAmount').waitForEnabled({ reverse: true });
await multiTap('NRemove', 3); // remove "201"
await multiTap('N9', 2);

await expectTextWithin('SendNumberField', '99');
await tap('N1');
await tap('N4');
await tap('N9');
await expectTextWithin('SendNumberField', '149');
await tap('ContinueAmount');
await waitForToast('LnurlPayAmountTooLowToast');

await multiTap('NRemove', 2); // remove "99"
await multiTap('NRemove', 3); // remove "149"
// go with 150
await tap('N1');
await tap('N5');
Expand Down