From 8385f602d6950c7cd221a897ca6dff6e162fd2c6 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 11 Jun 2026 12:23:09 +0200 Subject: [PATCH 1/2] test: adjust for SendAmountExceededToast for iOS --- test/specs/lnurl.e2e.ts | 27 ++++++++++++--------------- test/specs/send.e2e.ts | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/test/specs/lnurl.e2e.ts b/test/specs/lnurl.e2e.ts index 14c3164..7ee65a7 100644 --- a/test/specs/lnurl.e2e.ts +++ b/test/specs/lnurl.e2e.ts @@ -24,6 +24,7 @@ import { enterAddressViaScanPrompt, acknowledgeReceivedPayment, acknowledgeExternalSuccess, + enterAmount, } from '../helpers/actions'; import { reinstallApp } from '../helpers/setup'; import { ciIt } from '../helpers/suite'; @@ -177,27 +178,25 @@ describe('@lnurl - LNURL', () => { await enterAddressViaScanPrompt(payRequest1.encoded, { acceptCameraPermission: false }); await expectTextWithin('SendNumberField', '0'); // Check that 149 sats is below minimum and 201 sats is above maximum (both rejected) - await tap('N2'); - await tap('N0'); - await tap('N1'); - if (driver.isAndroid) { + try { + await enterAmount(201); + await waitForToast('SendAmountExceededToast'); + } catch { + console.warn('SendAmountExceededToast not triggered, trying again...'); + // tap on 1 fast to trigger the toast + await elementById('N1').click(); await waitForToast('SendAmountExceededToast'); - } else { - await elementById('ContinueAmount').waitForEnabled({ reverse: true }); } + await multiTap('NRemove', 3); // remove "201" - await tap('N1'); - await tap('N4'); - await tap('N9'); + await enterAmount(149); await expectTextWithin('SendNumberField', '149'); await tap('ContinueAmount'); await waitForToast('LnurlPayAmountTooLowToast'); await multiTap('NRemove', 3); // remove "149" // go with 150 - await tap('N1'); - await tap('N5'); - await tap('N0'); + await enterAmount(150); await expectTextWithin('SendNumberField', '150'); await elementById('ContinueAmount').waitForEnabled(); await tap('ContinueAmount'); @@ -264,9 +263,7 @@ describe('@lnurl - LNURL', () => { await enterAddress(payRequest3.encoded, { acceptCameraPermission: false }); await expectTextWithin('SendNumberField', '0'); // go with 321 - await tap('N3'); - await tap('N2'); - await tap('N1'); + await enterAmount(321); await elementById('ContinueAmount').waitForDisplayed(); await tap('ContinueAmount'); await dragOnElement('GRAB', 'right', 0.95); diff --git a/test/specs/send.e2e.ts b/test/specs/send.e2e.ts index c7efd67..a5ddb87 100644 --- a/test/specs/send.e2e.ts +++ b/test/specs/send.e2e.ts @@ -146,10 +146,12 @@ describe('@send - Send', () => { // type amount over balance and verify you cannot continue await tap('AddressContinue'); await enterAmount(amount + 1); - if (driver.isAndroid) { + try { + await waitForToast('SendAmountExceededToast'); + } catch { + console.warn('SendAmountExceededToast not triggered, trying again...'); + await elementById('N1').click(); await waitForToast('SendAmountExceededToast'); - } else { - await elementById('ContinueAmount').waitForEnabled({ reverse: true }); } await tap('NavigationBack'); @@ -267,7 +269,13 @@ describe('@send - Send', () => { console.info({ invoice0 }); await enterAddress(invoice0); await enterAmount(10_000 + 1); - await elementById('ContinueAmount').waitForEnabled({ reverse: true }); + try { + await waitForToast('SendAmountExceededToast'); + } catch { + console.warn('SendAmountExceededToast not triggered, trying again...'); + await elementById('N1').click(); + await waitForToast('SendAmountExceededToast'); + } await swipeFullScreen('down'); // send to onchain address From 9bd2c5ca8a09bfd989f57ce5fd2ee89b7e8b46f9 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 11 Jun 2026 16:15:52 +0200 Subject: [PATCH 2/2] no dismiss SendAmountExceededToast on iOS --- test/specs/lnurl.e2e.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/specs/lnurl.e2e.ts b/test/specs/lnurl.e2e.ts index 7ee65a7..ea4bdeb 100644 --- a/test/specs/lnurl.e2e.ts +++ b/test/specs/lnurl.e2e.ts @@ -180,12 +180,12 @@ describe('@lnurl - LNURL', () => { // Check that 149 sats is below minimum and 201 sats is above maximum (both rejected) try { await enterAmount(201); - await waitForToast('SendAmountExceededToast'); + await waitForToast('SendAmountExceededToast', { dismiss: driver.isAndroid }); } catch { console.warn('SendAmountExceededToast not triggered, trying again...'); // tap on 1 fast to trigger the toast await elementById('N1').click(); - await waitForToast('SendAmountExceededToast'); + await waitForToast('SendAmountExceededToast', { dismiss: driver.isAndroid }); } await multiTap('NRemove', 3); // remove "201"