Skip to content
Open
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
18 changes: 11 additions & 7 deletions test/specs/send.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,18 @@ describe('@send - Send', () => {
await typeAddressAndVerifyContinue({ address: unified1 });
}

// verify amount is set correctly
// a payable amount opens the review screen directly
await tap('AddressContinue');
await verifyAmountToSend(10_000);
await elementById('ContinueAmount').waitForEnabled();
const unified1ReviewAmt = await elementByIdWithin('ReviewAmount-primary', 'MoneyText');
await unified1ReviewAmt.waitForDisplayed();
await expect(unified1ReviewAmt).toHaveText('10 000');
await tap('NavigationBack');
if (driver.isAndroid) {
// Android replaces the review screen with Amount, so the amount can still be edited
await verifyAmountToSend(10_000);
await elementById('ContinueAmount').waitForEnabled();
await tap('NavigationBack');
}

// check validation for unified invoice when balance is too low (200_000 sats)
const unified2 = 'bitcoin:bcrt1q07x3wl76zdxvdsz3qzzkvxrjg3n6t4tz2vnsx8?amount=0.002';
Expand Down Expand Up @@ -360,10 +367,7 @@ describe('@send - Send', () => {
console.info({ unified2 });
await sleep(1000);
await enterAddress(unified2, { acceptCameraPermission: false });
// should only allow spending from savings
await elementById('AssetButton-savings').waitForDisplayed();
await sleep(500);
await tap('ContinueAmount');
// lightning cannot pay it, so the onchain amount opens the review screen directly
await reviewAmt.waitForDisplayed();
await expect(reviewAmt).toHaveText('20 000');
await dragOnElement('GRAB', 'right', 0.95);
Expand Down