From e9f17b1997869e6acf3d440807d492f704768d06 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 5 Mar 2026 15:47:54 +0100 Subject: [PATCH 01/12] init adjustments for home redesign --- test/helpers/actions.ts | 18 +++++++----------- test/specs/onboarding.e2e.ts | 9 +-------- test/specs/onchain.e2e.ts | 21 +++++++++------------ test/specs/settings.e2e.ts | 2 +- 4 files changed, 18 insertions(+), 32 deletions(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index ba496f8..bedaf11 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -295,7 +295,7 @@ export async function getTotalBalance(): Promise { return Number(digits); } -export type BalanceCondition = 'eq' | 'gt' | 'gte' | 'lt' | 'lte'; +export type BalanceCondition = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'neq'; function checkBalanceCondition(value: number, expected: number, condition: BalanceCondition): boolean { switch (condition) { @@ -309,6 +309,8 @@ function checkBalanceCondition(value: number, expected: number, condition: Balan return value < expected; case 'lte': return value <= expected; + case 'neq': + return value !== expected; } } @@ -632,14 +634,7 @@ export async function completeOnboarding({ isFirstTime = true } = {}) { } // Wait for wallet to be created - for (let i = 1; i <= 3; i++) { - try { - await tap('WalletOnboardingClose'); - break; - } catch { - if (i === 3) throw new Error('Tapping "WalletOnboardingClose" timeout'); - } - } + await elementById('TotalBalance').waitForDisplayed(); } export async function restoreWallet( @@ -1118,8 +1113,9 @@ export async function receiveOnchainFunds({ await mineBlocks(blocksToMine); - const moneyText = await elementByIdWithin('TotalBalance-primary', 'MoneyText'); - await expect(moneyText).toHaveText(formattedSats); + await expectTotalBalance(sats); + await expectSavingsBalance(sats); + await expectSpendingBalance(0); await dismissBackupTimedSheet({ triggerTimedSheet: true }); if (expectHighBalanceWarning) { diff --git a/test/specs/onboarding.e2e.ts b/test/specs/onboarding.e2e.ts index cd8910d..934777c 100644 --- a/test/specs/onboarding.e2e.ts +++ b/test/specs/onboarding.e2e.ts @@ -73,14 +73,7 @@ describe('@onboarding - Onboarding', () => { await handleAndroidAlert(); // Wait for wallet to be created - for (let i = 1; i <= 3; i++) { - try { - await tap('WalletOnboardingClose'); - break; - } catch { - if (i === 3) throw new Error('Tapping "WalletOnboardingClose" timeout'); - } - } + await elementById('TotalBalance').waitForDisplayed(); const seed = await getSeed(); diff --git a/test/specs/onchain.e2e.ts b/test/specs/onchain.e2e.ts index 160a6e1..2487313 100644 --- a/test/specs/onchain.e2e.ts +++ b/test/specs/onchain.e2e.ts @@ -24,6 +24,9 @@ import { acknowledgeReceivedPayment, enterAmount, formatSats, + expectTotalBalance, + expectSpendingBalance, + expectSavingsBalance, } from '../helpers/actions'; import { ciIt } from '../helpers/suite'; import { @@ -70,11 +73,11 @@ describe('@onchain - Onchain', () => { await mineBlocks(1); await electrum?.waitForSync(); - const moneyTextAfter = (await elementsById('MoneyText'))[1]; - await expect(moneyTextAfter).not.toHaveText('100 000 000'); + await expectTotalBalance(satsToReceive, { condition: 'lt' }); + await expectSavingsBalance(satsToReceive, { condition: 'lt' }); + await expectSpendingBalance(0); // review activity list - await swipeFullScreen('up'); const sentShort = 'ActivityShort-0'; const receiveShort = 'ActivityShort-1'; await elementById(sentShort).waitForDisplayed(); @@ -85,7 +88,6 @@ describe('@onchain - Onchain', () => { await expectTextWithin(receiveShort, 'Received'); await expectTextWithin(receiveShort, formatSats(satsToReceive)); - await swipeFullScreen('up'); await tap('ActivityShowAll'); const sentDetail = 'Activity-1'; const receiveDetail = 'Activity-2'; @@ -163,17 +165,14 @@ describe('@onchain - Onchain', () => { await mineBlocks(1); - const totalBalance = await elementByIdWithin('TotalBalance-primary', 'MoneyText'); - await expect(totalBalance).toHaveText('0'); + await expectTotalBalance(0); + await expectSavingsBalance(0); + await expectSpendingBalance(0); // Check Activity - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await elementById('ActivityShort-1').waitForDisplayed(); await elementById('ActivityShort-2').waitForDisplayed(); - - await swipeFullScreen('up'); - await sleep(1000); // wait for the app to settle await tap('ActivityShowAll'); // All 3 transactions should be present await elementById('Activity-1').waitForDisplayed(); @@ -296,7 +295,6 @@ describe('@onchain - Onchain', () => { await expect(totalBalanceAfter).toHaveText('0'); // review activity list - await swipeFullScreen('up'); const sentShort = 'ActivityShort-0'; const receiveShort = 'ActivityShort-1'; await elementById(sentShort).waitForDisplayed(); @@ -307,7 +305,6 @@ describe('@onchain - Onchain', () => { await expectTextWithin(receiveShort, 'Received'); await expectTextWithin(receiveShort, '100 000 000'); - await swipeFullScreen('up'); await tap('ActivityShowAll'); const sentDetail = 'Activity-1'; const receiveDetail = 'Activity-2'; diff --git a/test/specs/settings.e2e.ts b/test/specs/settings.e2e.ts index fa02bac..6322399 100644 --- a/test/specs/settings.e2e.ts +++ b/test/specs/settings.e2e.ts @@ -493,7 +493,7 @@ describe('@settings - Settings', () => { try { await elementById('Suggestions').waitForDisplayed(); } catch { - await tap('WalletOnboardingClose'); + await swipeFullScreen('up'); await elementById('Suggestions').waitForDisplayed(); } From 29ad2bdc4ee462a22974695c987cec1d6c4a7562 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Thu, 5 Mar 2026 16:17:18 +0100 Subject: [PATCH 02/12] Loose swipes before activities check --- test/specs/boost.e2e.ts | 5 ----- test/specs/lightning.e2e.ts | 8 -------- test/specs/lnurl.e2e.ts | 10 ---------- test/specs/migration.e2e.ts | 2 -- test/specs/multiaddress.e2e.ts | 2 -- test/specs/send.e2e.ts | 2 -- test/specs/transfer.e2e.ts | 4 ---- 7 files changed, 33 deletions(-) diff --git a/test/specs/boost.e2e.ts b/test/specs/boost.e2e.ts index 7fb276e..b1113dd 100644 --- a/test/specs/boost.e2e.ts +++ b/test/specs/boost.e2e.ts @@ -44,7 +44,6 @@ describe('@boost - Boost', () => { await receiveOnchainFunds({ sats: 100_000, blocksToMine: 0 }); // check Activity - await swipeFullScreen('up'); await expectTextWithin('ActivityShort-0', '100 000'); await expectTextWithin('ActivityShort-0', '+'); @@ -77,7 +76,6 @@ describe('@boost - Boost', () => { await expectTextWithin('ActivityShort-1', '+'); // orig tx still there - await swipeFullScreen('up'); await tap('ActivityShort-1'); await expectText('100 000', { strategy: 'contains' }); await elementById('BoostedButton').waitForDisplayed(); @@ -106,7 +104,6 @@ describe('@boost - Boost', () => { await restoreWallet(seed); // check activity after restore - await swipeFullScreen('up'); await elementById('BoostingIcon').waitForDisplayed(); await elementById('ActivityShort-1').waitForDisplayed(); await tap('ActivityShort-1'); @@ -148,7 +145,6 @@ describe('@boost - Boost', () => { await expect(moneyText).not.toHaveText('100 000'); // check Activity - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '-'); await elementById('ActivityShort-1').waitForDisplayed(); @@ -212,7 +208,6 @@ describe('@boost - Boost', () => { await restoreWallet(seed); // check activity after restore - await swipeFullScreen('up'); (await elementByIdWithin('ActivityShort-0', 'BoostingIcon')).waitForDisplayed(); await tap('ActivityShort-0'); await elementById('BoostedButton').waitForDisplayed(); diff --git a/test/specs/lightning.e2e.ts b/test/specs/lightning.e2e.ts index 3671f15..54a9593 100644 --- a/test/specs/lightning.e2e.ts +++ b/test/specs/lightning.e2e.ts @@ -2,7 +2,6 @@ import initElectrum from '../helpers/electrum'; import { completeOnboarding, receiveOnchainFunds, - expectText, enterAddress, multiTap, tap, @@ -186,8 +185,6 @@ describe('@lightning - Lightning', () => { await expectTextWithin('ActivitySpending', '9 000'); // check tx history - await swipeFullScreen('up'); - await swipeFullScreen('up'); await expectTextWithin('ActivityShort-0', '1 000'); await expectTextWithin('ActivityShort-1', '111'); await expectTextWithin('ActivityShort-2', '111'); @@ -200,8 +197,6 @@ describe('@lightning - Lightning', () => { // check activity filters & tags await sleep(500); // wait for the app to settle - await swipeFullScreen('up'); - await swipeFullScreen('up'); await tap('ActivityShowAll'); // All transactions @@ -257,8 +252,6 @@ describe('@lightning - Lightning', () => { await expectTextWithin('ActivitySpending', '9 000'); // check tx history - await swipeFullScreen('up'); - await swipeFullScreen('up'); await expectTextWithin('ActivityShort-0', '1 000'); await expectTextWithin('ActivityShort-1', '111'); await expectTextWithin('ActivityShort-2', '111'); @@ -295,7 +288,6 @@ describe('@lightning - Lightning', () => { } await doNavigationClose(); - await swipeFullScreen('up'); await expectTextWithin('ActivityShort-0', '9 000'); }); }); diff --git a/test/specs/lnurl.e2e.ts b/test/specs/lnurl.e2e.ts index 1ba6586..d0f1304 100644 --- a/test/specs/lnurl.e2e.ts +++ b/test/specs/lnurl.e2e.ts @@ -185,8 +185,6 @@ describe('@lnurl - LNURL', () => { await elementById('SendSuccess').waitForDisplayed(); await tap('Close'); await expectTextWithin('ActivitySpending', '19 851'); // 20 001 - 150 - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '150'); await expectTextWithin('ActivityShort-0', '-'); @@ -224,8 +222,6 @@ describe('@lnurl - LNURL', () => { await elementById('SendSuccess').waitForDisplayed(); await tap('Close'); await expectTextWithin('ActivitySpending', '19 629'); // 19 851 - 222 = 19 629 - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '222'); await expectTextWithin('ActivityShort-0', '-'); @@ -255,8 +251,6 @@ describe('@lnurl - LNURL', () => { await elementById('SendSuccess').waitForDisplayed(); await tap('Close'); await expectTextWithin('ActivitySpending', '19 308'); // 19 629 - 321 = 19 308 - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '321'); await expectTextWithin('ActivityShort-0', '-'); @@ -283,8 +277,6 @@ describe('@lnurl - LNURL', () => { await tap('WithdrawConfirmButton'); await acknowledgeReceivedPayment(); await expectTextWithin('ActivitySpending', '19 410'); // 19 308 + 102 = 19 410 - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '102'); await expectTextWithin('ActivityShort-0', '+'); @@ -308,8 +300,6 @@ describe('@lnurl - LNURL', () => { await tap('WithdrawConfirmButton'); await acknowledgeReceivedPayment(); await expectTextWithin('ActivitySpending', '19 713'); // 19 410 + 303 = 19 713 - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', '303'); await expectTextWithin('ActivityShort-0', '+'); diff --git a/test/specs/migration.e2e.ts b/test/specs/migration.e2e.ts index e8c6b7d..30692a0 100644 --- a/test/specs/migration.e2e.ts +++ b/test/specs/migration.e2e.ts @@ -1001,8 +1001,6 @@ async function verifyMigration(expectedBalance: number): Promise { console.info('→ Balance migrated successfully'); // Go to activity list to verify transactions exist - await swipeFullScreen('up'); - await swipeFullScreen('up'); await tap('ActivityShowAll'); // All transactions (Transfer, Sent, Received = 3 items) diff --git a/test/specs/multiaddress.e2e.ts b/test/specs/multiaddress.e2e.ts index e15a357..e921b6c 100644 --- a/test/specs/multiaddress.e2e.ts +++ b/test/specs/multiaddress.e2e.ts @@ -193,8 +193,6 @@ describe('@multi_address - Multi address', () => { await tap('Close'); await sleep(1000); - await swipeFullScreen('up'); - await swipeFullScreen('up'); await tap('ActivityShort-0'); await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); const oldFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); diff --git a/test/specs/send.e2e.ts b/test/specs/send.e2e.ts index 768457f..08293ba 100644 --- a/test/specs/send.e2e.ts +++ b/test/specs/send.e2e.ts @@ -518,8 +518,6 @@ describe('@send - Send', () => { // sanity check activities displayed await sleep(1000); - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await elementById('ActivityShort-1').waitForDisplayed(); await elementById('ActivityShort-2').waitForDisplayed(); diff --git a/test/specs/transfer.e2e.ts b/test/specs/transfer.e2e.ts index 0809eab..9e7e82e 100644 --- a/test/specs/transfer.e2e.ts +++ b/test/specs/transfer.e2e.ts @@ -229,8 +229,6 @@ describe('@transfer - Transfer', () => { // check activities await sleep(1000); - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', 'Transfer'); await elementById('ActivityShort-1').waitForDisplayed(); @@ -332,8 +330,6 @@ describe('@transfer - Transfer', () => { const quickPayDismissed = driver.isAndroid ? await tryDismissQuickPayIntroIfVisible() : false; // check activity - await swipeFullScreen('up'); - await swipeFullScreen('up'); await elementById('ActivityShort-0').waitForDisplayed(); await expectTextWithin('ActivityShort-0', 'Transfer'); await elementById('ActivityShort-1').waitForDisplayed(); From 2a9241ff16622b066cf1c74224a63a1d076761e2 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Fri, 6 Mar 2026 11:46:49 +0100 Subject: [PATCH 03/12] updates --- test/helpers/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index bedaf11..c1599ab 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -634,7 +634,7 @@ export async function completeOnboarding({ isFirstTime = true } = {}) { } // Wait for wallet to be created - await elementById('TotalBalance').waitForDisplayed(); + await elementById('TotalBalance-primary').waitForDisplayed( { timeout: 60_000 } ); } export async function restoreWallet( From 52bfe66f9054f615cc663eb902c071dafbb02e31 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Mon, 9 Mar 2026 15:31:08 +0100 Subject: [PATCH 04/12] adjust backup test --- test/helpers/actions.ts | 8 +++++--- test/specs/backup.e2e.ts | 8 +++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index c1599ab..17a1e35 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -1400,17 +1400,19 @@ export async function enterAddressViaScanPrompt( } export async function deleteAllDefaultWidgets() { + await swipeFullScreen('up'); + await swipeFullScreen('up'); await tap('WidgetsEdit'); - for (const w of ['Bitcoin Price', 'Bitcoin Blocks', 'Bitcoin Headlines']) { + for (const w of ['Bitcoin Price', 'Bitcoin Blocks', 'Bitkit Suggestions']) { tap(w + '_WidgetActionDelete'); await elementByText('Yes, Delete').waitForDisplayed(); await elementByText('Yes, Delete').click(); await elementById(w).waitForDisplayed({ reverse: true, timeout: 5000 }); - await sleep(500); + await sleep(1000); } await tap('WidgetsEdit'); await elementById('PriceWidget').waitForDisplayed({ reverse: true }); - await elementById('NewsWidget').waitForDisplayed({ reverse: true }); + await elementById('SuggestionsWidget').waitForDisplayed({ reverse: true }); await elementById('BlocksWidget').waitForDisplayed({ reverse: true }); } diff --git a/test/specs/backup.e2e.ts b/test/specs/backup.e2e.ts index 2d5c9ca..e78aec2 100644 --- a/test/specs/backup.e2e.ts +++ b/test/specs/backup.e2e.ts @@ -12,6 +12,7 @@ import { receiveOnchainFunds, restoreWallet, sleep, + swipeFullScreen, tap, typeText, waitForBackup, @@ -90,7 +91,8 @@ describe('@backup - Backup', () => { await tap('WidgetSave'); } await elementById('PriceWidget').waitForDisplayed(); - + await elementById('SuggestionsWidget').waitForDisplayed({ reverse: true }); + await elementById('BlocksWidget').waitForDisplayed({ reverse: true }); // - backup seed and restore wallet // const seed = await getSeed(); await waitForBackup(); @@ -102,7 +104,11 @@ describe('@backup - Backup', () => { const moneyFiatSymbol = await elementByIdWithin('TotalBalance', 'MoneyFiatSymbol'); await expect(moneyFiatSymbol).toHaveText('£'); // check widget + await swipeFullScreen('up'); await elementById('PriceWidget').waitForDisplayed(); + await elementById('SuggestionsWidget').waitForDisplayed({ reverse: true }); + await elementById('BlocksWidget').waitForDisplayed({ reverse: true }); + await swipeFullScreen('down'); // check metadata await tap('ActivitySavings'); await tap('Activity-1'); From 00d0dc0400827e30bf9a1d6a46f1de1aab282744 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Mon, 9 Mar 2026 15:38:48 +0100 Subject: [PATCH 05/12] widgets update --- test/specs/widgets.e2e.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/specs/widgets.e2e.ts b/test/specs/widgets.e2e.ts index c817cfc..1ad9a95 100644 --- a/test/specs/widgets.e2e.ts +++ b/test/specs/widgets.e2e.ts @@ -84,7 +84,6 @@ describe('@widgets - Widgets', () => { await elementById('WidgetSave').waitForDisplayed(); await sleep(1000); // Wait for the UI to settle await tap('WidgetSave'); - await elementById('ActivitySpending').waitForDisplayed(); await sleep(1000); // Wait for the UI to settle // After saving, widget should remain visible… From 72d16d890748425be545b5175ff2853bd96e7112 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Mon, 9 Mar 2026 17:40:00 +0100 Subject: [PATCH 06/12] transfer and format --- test/helpers/actions.ts | 46 +++++--- test/helpers/constants.ts | 9 +- test/specs/mainnet/channel-order.e2e.ts | 27 +++-- test/specs/mainnet/cjit.e2e.ts | 22 ++-- test/specs/multiaddress.e2e.ts | 146 +++++++++++++----------- test/specs/onchain.e2e.ts | 2 - test/specs/transfer.e2e.ts | 64 +++++------ wdio.conf.ts | 2 +- 8 files changed, 175 insertions(+), 143 deletions(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index 17a1e35..ce80872 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -134,7 +134,11 @@ export async function elementsByText(text: string, timeout = 8000): Promise { export type BalanceCondition = 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'neq'; -function checkBalanceCondition(value: number, expected: number, condition: BalanceCondition): boolean { +function checkBalanceCondition( + value: number, + expected: number, + condition: BalanceCondition +): boolean { switch (condition) { case 'eq': return value === expected; @@ -365,9 +373,9 @@ export async function expectTotalBalance( return expectBalanceWithWait(getTotalBalance, 'total', expected, options); } -export async function tap(testId: string) { +export async function tap(testId: string, { timeout = 30_000 }: { timeout?: number } = {}) { const el = await elementById(testId); - await el.waitForDisplayed(); + await el.waitForDisplayed({ timeout }); await sleep(150); // Allow time for the element to settle await el.click(); await sleep(100); @@ -634,7 +642,7 @@ export async function completeOnboarding({ isFirstTime = true } = {}) { } // Wait for wallet to be created - await elementById('TotalBalance-primary').waitForDisplayed( { timeout: 60_000 } ); + await elementById('TotalBalance-primary').waitForDisplayed({ timeout: 60_000 }); } export async function restoreWallet( @@ -747,7 +755,11 @@ export async function waitForAnyText(texts: string[], timeout: number) { await browser.waitUntil( async () => { for (const text of texts) { - if (await elementByText(text, 'contains').isDisplayed().catch(() => false)) { + if ( + await elementByText(text, 'contains') + .isDisplayed() + .catch(() => false) + ) { return true; } } @@ -765,7 +777,11 @@ export async function waitForTextToDisappear(texts: string[], timeout: number) { await browser.waitUntil( async () => { for (const text of texts) { - if (await elementByText(text, 'contains').isDisplayed().catch(() => false)) { + if ( + await elementByText(text, 'contains') + .isDisplayed() + .catch(() => false) + ) { return false; } } @@ -904,7 +920,9 @@ export async function transferSavingsToSpending({ await tap('TransferToSpending'); await sleep(800); - const hasSpendingIntro = await elementById('SpendingIntro-button').isDisplayed().catch(() => false); + const hasSpendingIntro = await elementById('SpendingIntro-button') + .isDisplayed() + .catch(() => false); if (hasSpendingIntro) { await tap('SpendingIntro-button'); await sleep(800); @@ -959,7 +977,6 @@ export async function transferSavingsToSpending({ await expectTextWithin('Activity-1', 'Transfer', { timeout: 60_000 }); await expectTextWithin('Activity-1', '-'); await tap('NavigationBack'); - } else { await dismissBackgroundPaymentsTimedSheet({ triggerTimedSheet: false }); await dismissQuickPayIntro({ triggerTimedSheet: true }); @@ -968,7 +985,6 @@ export async function transferSavingsToSpending({ } export async function transferSpendingToSavings() { - await tap('ActivitySpending'); await tap('TransferToSavings'); await sleep(800); @@ -1102,8 +1118,6 @@ export async function receiveOnchainFunds({ blocksToMine?: number; expectHighBalanceWarning?: boolean; } = {}) { - const formattedSats = formatSats(sats); - // receive some first const address = await getReceiveAddress(); await swipeFullScreen('down'); @@ -1148,7 +1162,11 @@ export type ToastId = export async function waitForToast( toastId: ToastId, - { waitToDisappear = false, dismiss = true , timeout = 30_000 }: { waitToDisappear?: boolean; dismiss?: boolean; timeout?: number } = {} + { + waitToDisappear = false, + dismiss = true, + timeout = 30_000, + }: { waitToDisappear?: boolean; dismiss?: boolean; timeout?: number } = {} ) { await elementById(toastId).waitForDisplayed({ timeout }); if (waitToDisappear) { @@ -1162,7 +1180,7 @@ export async function waitForToast( /** Acknowledges the received payment notification by tapping the button. */ -export async function acknowledgeReceivedPayment( { timeout = 20_000 }: { timeout?: number } = {}) { +export async function acknowledgeReceivedPayment({ timeout = 20_000 }: { timeout?: number } = {}) { await elementById('ReceivedTransaction').waitForDisplayed({ timeout }); await sleep(500); await tap('ReceivedTransactionButton'); diff --git a/test/helpers/constants.ts b/test/helpers/constants.ts index 5fa82c9..db7246f 100644 --- a/test/helpers/constants.ts +++ b/test/helpers/constants.ts @@ -33,12 +33,13 @@ export function getBackend(): Backend { export const electrumHost = getBackend() === 'regtest' - ? process.env.ELECTRUM_HOST ?? 'electrs.bitkit.stag0.blocktank.to' + ? (process.env.ELECTRUM_HOST ?? 'electrs.bitkit.stag0.blocktank.to') : getBackend() === 'mainnet' - ? process.env.ELECTRUM_HOST ?? 'electrum.bitkit.to' - : process.env.ELECTRUM_HOST ?? '127.0.0.1'; + ? (process.env.ELECTRUM_HOST ?? 'electrum.bitkit.to') + : (process.env.ELECTRUM_HOST ?? '127.0.0.1'); export const electrumPort = Number.parseInt( - process.env.ELECTRUM_PORT ?? (getBackend() === 'regtest' ? '9999' : getBackend() === 'mainnet' ? '50001' : '60001'), + process.env.ELECTRUM_PORT ?? + (getBackend() === 'regtest' ? '9999' : getBackend() === 'mainnet' ? '50001' : '60001'), 10 ); diff --git a/test/specs/mainnet/channel-order.e2e.ts b/test/specs/mainnet/channel-order.e2e.ts index fcfecd3..f6e0f51 100644 --- a/test/specs/mainnet/channel-order.e2e.ts +++ b/test/specs/mainnet/channel-order.e2e.ts @@ -11,7 +11,10 @@ import { ciIt } from '../../helpers/suite'; const channelOrderSeed = process.env.CHANNEL_ORDER_SEED ?? process.env.CJIT_SEED; const transferAmountSats = Number.parseInt(process.env.CHANNEL_ORDER_AMOUNT_SATS ?? '20000', 10); const minimumFeeSats = Number.parseInt(process.env.CHANNEL_ORDER_MIN_FEE_SATS ?? '100', 10); -const minimumReceivingCapacitySats = Number.parseInt(process.env.CHANNEL_ORDER_MIN_RECEIVING_SATS ?? '100000', 10); +const minimumReceivingCapacitySats = Number.parseInt( + process.env.CHANNEL_ORDER_MIN_RECEIVING_SATS ?? '100000', + 10 +); function parseSats(value: string): number { const digits = value.replace(/[^\d]/g, ''); @@ -58,7 +61,7 @@ async function getMoneyTextValues(minCount: number): Promise { timeout: 15_000, interval: 300, timeoutMsg: `Timed out waiting for at least ${minCount} MoneyText values`, - }, + } ); const moneyValues = await elementsById('MoneyText'); @@ -84,14 +87,18 @@ describe('@channel_order_mainnet - Channel order smoke', () => { } walletSeed = channelOrderSeed; if (!Number.isInteger(transferAmountSats) || transferAmountSats <= 0) { - throw new Error(`Invalid CHANNEL_ORDER_AMOUNT_SATS value: ${process.env.CHANNEL_ORDER_AMOUNT_SATS}`); + throw new Error( + `Invalid CHANNEL_ORDER_AMOUNT_SATS value: ${process.env.CHANNEL_ORDER_AMOUNT_SATS}` + ); } if (!Number.isInteger(minimumFeeSats) || minimumFeeSats <= 0) { - throw new Error(`Invalid CHANNEL_ORDER_MIN_FEE_SATS value: ${process.env.CHANNEL_ORDER_MIN_FEE_SATS}`); + throw new Error( + `Invalid CHANNEL_ORDER_MIN_FEE_SATS value: ${process.env.CHANNEL_ORDER_MIN_FEE_SATS}` + ); } if (!Number.isInteger(minimumReceivingCapacitySats) || minimumReceivingCapacitySats <= 0) { throw new Error( - `Invalid CHANNEL_ORDER_MIN_RECEIVING_SATS value: ${process.env.CHANNEL_ORDER_MIN_RECEIVING_SATS}`, + `Invalid CHANNEL_ORDER_MIN_RECEIVING_SATS value: ${process.env.CHANNEL_ORDER_MIN_RECEIVING_SATS}` ); } }); @@ -122,7 +129,9 @@ describe('@channel_order_mainnet - Channel order smoke', () => { } if (toSpendingAmountSats !== transferAmountSats) { - throw new Error(`To spending amount ${toSpendingAmountSats} should equal ${transferAmountSats}`); + throw new Error( + `To spending amount ${toSpendingAmountSats} should equal ${transferAmountSats}` + ); } if (!(totalSats > transferAmountSats)) { @@ -135,12 +144,14 @@ describe('@channel_order_mainnet - Channel order smoke', () => { const [spendingLiquiditySats, receivingLiquiditySats] = liquidityValues; if (spendingLiquiditySats !== transferAmountSats) { - throw new Error(`Spending liquidity ${spendingLiquiditySats} should equal ${transferAmountSats}`); + throw new Error( + `Spending liquidity ${spendingLiquiditySats} should equal ${transferAmountSats}` + ); } if (!(receivingLiquiditySats > minimumReceivingCapacitySats)) { throw new Error( - `Receiving liquidity ${receivingLiquiditySats} should be greater than ${minimumReceivingCapacitySats}`, + `Receiving liquidity ${receivingLiquiditySats} should be greater than ${minimumReceivingCapacitySats}` ); } }); diff --git a/test/specs/mainnet/cjit.e2e.ts b/test/specs/mainnet/cjit.e2e.ts index 9568736..7ff76e3 100644 --- a/test/specs/mainnet/cjit.e2e.ts +++ b/test/specs/mainnet/cjit.e2e.ts @@ -21,7 +21,7 @@ function parseNumber(value: string): number { function parseCjitFees(value: string): { networkFee: number; serviceProviderFee: number } { const labeledMatch = value.match( - /\$([0-9]+(?:\.[0-9]+)?) network fee and \$([0-9]+(?:\.[0-9]+)?) service provider fee/i, + /\$([0-9]+(?:\.[0-9]+)?) network fee and \$([0-9]+(?:\.[0-9]+)?) service provider fee/i ); if (labeledMatch) { return { @@ -72,7 +72,9 @@ async function setupWallet(): Promise { describe('@cjit_mainnet - CJIT smoke', () => { before(async () => { if (!Number.isInteger(expectedMinimumAmountSats) || expectedMinimumAmountSats <= 0) { - throw new Error(`Invalid CJIT_MIN_EXPECTED_SATS value: ${process.env.CJIT_MIN_EXPECTED_SATS}`); + throw new Error( + `Invalid CJIT_MIN_EXPECTED_SATS value: ${process.env.CJIT_MIN_EXPECTED_SATS}` + ); } await reinstallApp(); }); @@ -88,7 +90,7 @@ describe('@cjit_mainnet - CJIT smoke', () => { const minAmountSats = await waitForNonZeroMinimumAmount(); if (minAmountSats <= expectedMinimumAmountSats) { throw new Error( - `Minimum receive amount ${minAmountSats} should be greater than ${expectedMinimumAmountSats}`, + `Minimum receive amount ${minAmountSats} should be greater than ${expectedMinimumAmountSats}` ); } @@ -98,16 +100,23 @@ describe('@cjit_mainnet - CJIT smoke', () => { const reviewAmountText = await getTextUnder('-primary'); const reviewAmountSats = parseNumber(reviewAmountText); if (reviewAmountSats !== minAmountSats) { - throw new Error(`Review amount ${reviewAmountSats} should equal minimum receive amount ${minAmountSats}`); + throw new Error( + `Review amount ${reviewAmountSats} should equal minimum receive amount ${minAmountSats}` + ); } - const serviceProviderFeeText = await elementByText('service provider fee', 'contains').getText(); + const serviceProviderFeeText = await elementByText( + 'service provider fee', + 'contains' + ).getText(); const { networkFee, serviceProviderFee } = parseCjitFees(serviceProviderFeeText); if (!(networkFee > 0)) { throw new Error(`Network fee should be greater than 0. Found: "${serviceProviderFeeText}"`); } if (!(serviceProviderFee > 0)) { - throw new Error(`Service provider fee should be greater than 0. Found: "${serviceProviderFeeText}"`); + throw new Error( + `Service provider fee should be greater than 0. Found: "${serviceProviderFeeText}"` + ); } await elementByText('Continue').click(); @@ -115,4 +124,3 @@ describe('@cjit_mainnet - CJIT smoke', () => { await sleep(2000); }); }); - diff --git a/test/specs/multiaddress.e2e.ts b/test/specs/multiaddress.e2e.ts index e921b6c..f0f9a6e 100644 --- a/test/specs/multiaddress.e2e.ts +++ b/test/specs/multiaddress.e2e.ts @@ -45,7 +45,12 @@ import { waitForPeerConnection, } from '../helpers/lnd'; import { lndConfig } from '../helpers/constants'; -import { ensureLocalFunds, getBitcoinRpc, getExternalAddress, mineBlocks } from '../helpers/regtest'; +import { + ensureLocalFunds, + getBitcoinRpc, + getExternalAddress, + mineBlocks, +} from '../helpers/regtest'; describe('@multi_address - Multi address', () => { let electrum: Awaited> | undefined; @@ -170,76 +175,79 @@ describe('@multi_address - Multi address', () => { } ); - ciIt('@multi_address_3 - Receive to each type, send almost max, verify change to primary, then RBF', async () => { - const addressTypes: addressTypePreference[] = ['p2pkh', 'p2sh-p2wpkh', 'p2wpkh', 'p2tr']; - const satsPerAddressType = 10_000; - const sendAmountSats = 37_000; - await switchAndFundEachAddressType({ - addressTypes, - satsPerAddressType, - waitForSync: async () => { - await electrum?.waitForSync(); - }, - }); + ciIt( + '@multi_address_3 - Receive to each type, send almost max, verify change to primary, then RBF', + async () => { + const addressTypes: addressTypePreference[] = ['p2pkh', 'p2sh-p2wpkh', 'p2wpkh', 'p2tr']; + const satsPerAddressType = 10_000; + const sendAmountSats = 37_000; + await switchAndFundEachAddressType({ + addressTypes, + satsPerAddressType, + waitForSync: async () => { + await electrum?.waitForSync(); + }, + }); - const coreAddress = await getExternalAddress(); - await enterAddress(coreAddress); - await enterAmount(sendAmountSats); - await expectText(formatSats(sendAmountSats)); - await tap('ContinueAmount'); - await dragOnElement('GRAB', 'right', 0.95); - await handleOver50PercentAlert().catch(async () => {}); - await elementById('SendSuccess').waitForDisplayed(); - await tap('Close'); + const coreAddress = await getExternalAddress(); + await enterAddress(coreAddress); + await enterAmount(sendAmountSats); + await expectText(formatSats(sendAmountSats)); + await tap('ContinueAmount'); + await dragOnElement('GRAB', 'right', 0.95); + await handleOver50PercentAlert().catch(async () => {}); + await elementById('SendSuccess').waitForDisplayed(); + await tap('Close'); - await sleep(1000); - await tap('ActivityShort-0'); - await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); - const oldFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); - await tap('ActivityTxDetails'); - const oldTxId = await getTextUnder('TXID'); - await tap('NavigationBack'); - - await tap('BoostButton'); - await elementById('RBFBoost').waitForDisplayed(); - await tap('CustomFeeButton'); - await tap('Plus'); - await tap('Minus'); - await tap('RecommendedFeeButton'); - await dragOnElement('GRAB', 'right', 0.95); - await waitForToast('BoostSuccessToast'); - - await tap('ActivityShort-0'); - await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); - const newFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); - await tap('ActivityTxDetails'); - const newTxId = await getTextUnder('TXID'); - await expect(Number(oldFee.replace(' ', '')) < Number(newFee.replace(' ', ''))).toBe(true); - await expect(oldTxId !== newTxId).toBe(true); - await elementById('RBFBoosted').waitForDisplayed(); - await doNavigationClose(); - - await sleep(1000); - await swipeFullScreen('down'); - await swipeFullScreen('down'); + await sleep(1000); + await tap('ActivityShort-0'); + await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); + const oldFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); + await tap('ActivityTxDetails'); + const oldTxId = await getTextUnder('TXID'); + await tap('NavigationBack'); + + await tap('BoostButton'); + await elementById('RBFBoost').waitForDisplayed(); + await tap('CustomFeeButton'); + await tap('Plus'); + await tap('Minus'); + await tap('RecommendedFeeButton'); + await dragOnElement('GRAB', 'right', 0.95); + await waitForToast('BoostSuccessToast'); + + await tap('ActivityShort-0'); + await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); + const newFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); + await tap('ActivityTxDetails'); + const newTxId = await getTextUnder('TXID'); + await expect(Number(oldFee.replace(' ', '')) < Number(newFee.replace(' ', ''))).toBe(true); + await expect(oldTxId !== newTxId).toBe(true); + await elementById('RBFBoosted').waitForDisplayed(); + await doNavigationClose(); - await mineBlocks(1); - await electrum?.waitForSync(); - const remainingTotal = await getTotalBalance(); - await expect(remainingTotal).toBeGreaterThan(0); - - // verify change is in taproot address - await tap('HeaderMenu'); - await tap('DrawerSettings'); - await sleep(1000); - await tap('AdvancedSettings'); - await sleep(1000); - await tap('AddressViewer'); - await sleep(1000); - await elementByText('Taproot').click(); - await elementByText('Change Addresses').click(); - await expectText(formatSats(remainingTotal)); - }); + await sleep(1000); + await swipeFullScreen('down'); + await swipeFullScreen('down'); + + await mineBlocks(1); + await electrum?.waitForSync(); + const remainingTotal = await getTotalBalance(); + await expect(remainingTotal).toBeGreaterThan(0); + + // verify change is in taproot address + await tap('HeaderMenu'); + await tap('DrawerSettings'); + await sleep(1000); + await tap('AdvancedSettings'); + await sleep(1000); + await tap('AddressViewer'); + await sleep(1000); + await elementByText('Taproot').click(); + await elementByText('Change Addresses').click(); + await expectText(formatSats(remainingTotal)); + } + ); ciIt( '@multi_address_4 - Receive to each type, open external channel with max, keep Legacy untouched', @@ -274,7 +282,7 @@ describe('@multi_address - Multi address', () => { await waitForToast('SpendingBalanceReadyToast'); if (driver.isIOS) { await dismissBackgroundPaymentsTimedSheet({ triggerTimedSheet: true }); - await dismissQuickPayIntro({ triggerTimedSheet: true }) + await dismissQuickPayIntro({ triggerTimedSheet: true }); } else { await dismissQuickPayIntro({ triggerTimedSheet: true }); } diff --git a/test/specs/onchain.e2e.ts b/test/specs/onchain.e2e.ts index 2487313..1fbb17c 100644 --- a/test/specs/onchain.e2e.ts +++ b/test/specs/onchain.e2e.ts @@ -6,7 +6,6 @@ import { elementById, elementByIdWithin, elementByText, - elementsById, expectTextWithin, doNavigationClose, getReceiveAddress, @@ -321,5 +320,4 @@ describe('@onchain - Onchain', () => { // await elementByText('OUTPUT').waitForDisplayed(); // await elementByText('OUTPUT (2)').waitForDisplayed({ reverse: true }); }); - }); diff --git a/test/specs/transfer.e2e.ts b/test/specs/transfer.e2e.ts index 9e7e82e..fa31723 100644 --- a/test/specs/transfer.e2e.ts +++ b/test/specs/transfer.e2e.ts @@ -78,16 +78,18 @@ describe('@transfer - Transfer', () => { await elementByText('EUR (€)').click(); await doNavigationClose(); - if (driver.isAndroid) await launchFreshApp(); + await sleep(1000); + await swipeFullScreen('up'); + await sleep(1000); await tap('Suggestion-lightning'); await tap('TransferIntro-button'); await tap('FundTransfer'); await tap('SpendingIntro-button'); - await sleep(3000); // let the animation finish + await sleep(2000); // let the animation finish // can continue with default client balance (0) await tap('SpendingAmountContinue'); - await sleep(100); + await sleep(700); await tap('SpendingConfirmAdvanced'); await tap('SpendingAdvancedMin'); await expectText('100 000', { strategy: 'contains' }); @@ -99,15 +101,23 @@ describe('@transfer - Transfer', () => { await expect(eurBalance).toBeLessThan(460); await tap('SpendingAdvancedNumberField'); // change back to sats await tap('SpendingAdvancedContinue'); + await sleep(500); await tap('NavigationBack'); + await sleep(1000); // can continue with max client balance - await tap('SpendingAmountMax'); + await tap('SpendingAmountMax').catch(async () => { + console.info('→ SpendingAmountMax not found, navigating back and trying again...'); + await tap('NavigationBack'); + await sleep(500); + await tap('SpendingAmountMax'); + }); await elementById('SpendingAmountContinue').waitForEnabled(); await sleep(500); await tap('SpendingAmountContinue'); await elementById('SpendingConfirmAdvanced').waitForDisplayed(); await tap('NavigationBack'); + await sleep(1000); // can continue with 25% client balance await elementById('SpendingAmountQuarter').waitForEnabled(); @@ -118,7 +128,9 @@ describe('@transfer - Transfer', () => { await elementById('SpendingConfirmAdvanced').waitForDisplayed(); await tap('NavigationBack'); await tap('NavigationBack'); + await sleep(1000); await tap('SpendingIntro-button'); + await sleep(500); // can change client balance await tap('N2'); @@ -134,15 +146,19 @@ describe('@transfer - Transfer', () => { await tap('TransferSuccess-button'); // verify transfer activity on savings + await sleep(1000); + await swipeFullScreen('down'); + await expectText('TRANSFER IN PROGRESS'); await tap('ActivitySavings'); await elementById('Activity-1').waitForDisplayed(); await elementById('Activity-2').waitForDisplayed(); await expectTextWithin('Activity-1', 'Transfer', { timeout: 60_000 }); await expectTextWithin('Activity-1', '-'); await tap('NavigationBack'); + await sleep(1000); // transfer in progress - //await elementById('Suggestion-lightning_setting_up').waitForDisplayed(); + await expectText('TRANSFER IN PROGRESS'); // Get another channel with custom receiving capacity await tap('ActivitySavings'); @@ -213,14 +229,17 @@ describe('@transfer - Transfer', () => { await expectTextWithin('Activity-2', 'Transfer', { timeout: 60_000 }); await expectTextWithin('Activity-2', '-'); await tap('NavigationBack'); + await sleep(1000); + // transfer in progress - //await elementById('Suggestion-lightning_setting_up').waitForDisplayed(); + await expectText('TRANSFER IN PROGRESS'); // check channel status await tap('HeaderMenu'); await tap('DrawerSettings'); await tap('AdvancedSettings'); await tap('Channels'); + await sleep(1000); const channels = await elementsById('Channel'); channels[driver.isAndroid ? 1 : 0].click(); await expectTextWithin('TotalSize', '₿ 250 000'); @@ -255,38 +274,6 @@ describe('@transfer - Transfer', () => { await expectTextWithin('Activity-1', '-'); await expectTextWithin('Activity-2', '-'); await elementById('Activity-3').waitForDisplayed({ reverse: true }); - - // TODO: enable when boost backup is operational - // https://github.com/synonymdev/bitkit-android/issues/321 - //const seed = await getSeed(); - //await waitForBackup(); - //await restoreWallet(seed); - - // check transfer card - //await elementById('Suggestion-lightning_setting_up').waitForDisplayed(); - - // check activity after restore - //await swipeFullScreen('up'); - //await tap('ActivityShort-1'); - //await elementById('StatusTransfer').waitForDisplayed(); - - // boost the transfer - //await tap('BoostButton'); - //await elementById('CPFPBoost').waitForDisplayed(); - //await dragOnElement('GRAB', 'right', 0.95); // Swipe to confirm - - // check Activity - //await elementById('BoostingIcon').waitForDisplayed(); - - // reset & restore again - // await waitForBackup(); - // await restoreWallet(seed); - - // // check activity after restore - // await swipeFullScreen('up'); - // await elementById('BoostingIcon').waitForDisplayed(); - // await tap('ActivityShort-1'); - // await elementById('StatusBoosting').waitForDisplayed(); } ); @@ -381,6 +368,7 @@ describe('@transfer - Transfer', () => { await elementById('TransferSuccess').waitForDisplayed(); await tap('TransferSuccess-button'); if (driver.isAndroid) await tap('NavigationBack'); + await sleep(1000); // check channel is closed await tap('HeaderMenu'); diff --git a/wdio.conf.ts b/wdio.conf.ts index eb78d01..6ab7aec 100644 --- a/wdio.conf.ts +++ b/wdio.conf.ts @@ -75,7 +75,7 @@ export const config: WebdriverIO.Config = { 'appium:autoGrantPermissions': true, // 'appium:waitForIdleTimeout': 1000, } - : { + : { platformName: 'iOS', 'appium:automationName': 'XCUITest', 'appium:udid': process.env.SIMULATOR_UDID || 'auto', From 6b9567fd6e32a0d6fc0e097f8398dc7588f2d5ae Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Mon, 9 Mar 2026 17:49:16 +0100 Subject: [PATCH 07/12] multi-address --- test/specs/multiaddress.e2e.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/specs/multiaddress.e2e.ts b/test/specs/multiaddress.e2e.ts index f0f9a6e..8012ab6 100644 --- a/test/specs/multiaddress.e2e.ts +++ b/test/specs/multiaddress.e2e.ts @@ -180,7 +180,7 @@ describe('@multi_address - Multi address', () => { async () => { const addressTypes: addressTypePreference[] = ['p2pkh', 'p2sh-p2wpkh', 'p2wpkh', 'p2tr']; const satsPerAddressType = 10_000; - const sendAmountSats = 37_000; + const sendAmountSats = 36_000; await switchAndFundEachAddressType({ addressTypes, satsPerAddressType, From d36da69b831a71799229dbb4e83ea233519ce570 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 11 Mar 2026 12:29:08 +0100 Subject: [PATCH 08/12] settings 12 --- test/specs/settings.e2e.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/specs/settings.e2e.ts b/test/specs/settings.e2e.ts index 6322399..1fa2118 100644 --- a/test/specs/settings.e2e.ts +++ b/test/specs/settings.e2e.ts @@ -490,12 +490,10 @@ describe('@settings - Settings', () => { }); ciIt('@settings_12 - Can reset suggestions', async () => { - try { - await elementById('Suggestions').waitForDisplayed(); - } catch { - await swipeFullScreen('up'); - await elementById('Suggestions').waitForDisplayed(); - } + + await elementById('TotalBalance-primary').waitForDisplayed(); + await swipeFullScreen('up'); + await elementById('SuggestionsWidget').waitForDisplayed(); // hide lightningTodo suggestion card await (await elementByIdWithin('Suggestion-lightning', 'SuggestionDismiss')).click(); @@ -510,6 +508,9 @@ describe('@settings - Settings', () => { // lightning should be visible again await sleep(1000); + // if (driver.isIOS) { + // await swipeFullScreen('up'); + // } await elementById('Suggestion-lightning').waitForDisplayed(); }); }); From 237897abb61e29d9ec2747d8f49c5e5ea9915e9c Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 11 Mar 2026 13:21:25 +0100 Subject: [PATCH 09/12] adjust expectation --- test/helpers/actions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index ce80872..fc69752 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -881,8 +881,7 @@ export async function switchAndFundEachAddressType({ ); } } - const moneyText = await elementByIdWithin('TotalBalance-primary', 'MoneyText'); - await expect(moneyText).toHaveText(formatSats(satsPerAddressType * (i + 1))); + await expectTotalBalance(satsPerAddressType * (i + 1)); fundedAddresses.push({ type: addressType, address }); From ee8c98e9396d2aa641783d7cc9e16e075e85ae4c Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 11 Mar 2026 14:01:13 +0100 Subject: [PATCH 10/12] stability --- test/helpers/actions.ts | 2 +- test/specs/transfer.e2e.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index fc69752..2cafe2b 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -376,7 +376,7 @@ export async function expectTotalBalance( export async function tap(testId: string, { timeout = 30_000 }: { timeout?: number } = {}) { const el = await elementById(testId); await el.waitForDisplayed({ timeout }); - await sleep(150); // Allow time for the element to settle + await sleep(200); // Allow time for the element to settle await el.click(); await sleep(100); } diff --git a/test/specs/transfer.e2e.ts b/test/specs/transfer.e2e.ts index fa31723..c3fb858 100644 --- a/test/specs/transfer.e2e.ts +++ b/test/specs/transfer.e2e.ts @@ -88,6 +88,7 @@ describe('@transfer - Transfer', () => { await sleep(2000); // let the animation finish // can continue with default client balance (0) + await elementById('SpendingAmountContinue').waitForEnabled(); await tap('SpendingAmountContinue'); await sleep(700); await tap('SpendingConfirmAdvanced'); From a59e959f781ee5a2174195717de083d09a3b129a Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 11 Mar 2026 14:18:47 +0100 Subject: [PATCH 11/12] stabilize multi-address --- test/specs/multiaddress.e2e.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/specs/multiaddress.e2e.ts b/test/specs/multiaddress.e2e.ts index 8012ab6..410c9c4 100644 --- a/test/specs/multiaddress.e2e.ts +++ b/test/specs/multiaddress.e2e.ts @@ -199,7 +199,7 @@ describe('@multi_address - Multi address', () => { await elementById('SendSuccess').waitForDisplayed(); await tap('Close'); - await sleep(1000); + await expectTextWithin('ActivityShort-0', 'Sent'); await tap('ActivityShort-0'); await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); const oldFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); @@ -216,6 +216,8 @@ describe('@multi_address - Multi address', () => { await dragOnElement('GRAB', 'right', 0.95); await waitForToast('BoostSuccessToast'); + await sleep(1000); + await elementById('ActivityShort-0').waitForDisplayed(); await tap('ActivityShort-0'); await expectTextWithin('ActivityAmount', formatSats(sendAmountSats)); const newFee = await (await elementByIdWithin('ActivityFee', 'MoneyText')).getText(); From 6b14b436b4483f875f1c6081b60ae4c7a5de2bd5 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Fri, 13 Mar 2026 13:47:05 +0100 Subject: [PATCH 12/12] migration adjustment --- test/specs/migration.e2e.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/specs/migration.e2e.ts b/test/specs/migration.e2e.ts index 30692a0..8a4cbd8 100644 --- a/test/specs/migration.e2e.ts +++ b/test/specs/migration.e2e.ts @@ -1001,6 +1001,7 @@ async function verifyMigration(expectedBalance: number): Promise { console.info('→ Balance migrated successfully'); // Go to activity list to verify transactions exist + await swipeFullScreen('up'); await tap('ActivityShowAll'); // All transactions (Transfer, Sent, Received = 3 items)