Skip to content

Commit eb7442a

Browse files
committed
adjust adding tag on send
1 parent 6ecf4f3 commit eb7442a

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

test/helpers/actions.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,15 @@ export async function typeText(testId: string, text: string) {
419419
await el.setValue(text);
420420
}
421421

422+
export async function addSendTag(tag: string) {
423+
if (driver.isIOS) {
424+
await tap('SendConfirmToggleDetails');
425+
}
426+
await tap('TagsAddSend');
427+
await typeText('TagInputSend', tag);
428+
await tap('SendTagsSubmit');
429+
}
430+
422431
export async function enterAmount(amountSats: number) {
423432
for (const digit of `${amountSats}`.split('')) {
424433
await tap(`N${digit}`);
@@ -1389,7 +1398,7 @@ export async function typeAddressAndVerifyContinue({
13891398

13901399
export async function enterAddress(
13911400
address: string,
1392-
{ acceptCameraPermission = true, addressTimeout = 30_000 } = {},
1401+
{ acceptCameraPermission = true, addressTimeout = 30_000 } = {}
13931402
) {
13941403
await tap('Send');
13951404
await sleep(700);

test/specs/lightning.e2e.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {
2222
doNavigationClose,
2323
dismissBackgroundPaymentsTimedSheet,
2424
acknowledgeReceivedPayment,
25+
addSendTag,
2526
waitForBackup,
2627
waitForToast,
2728
} from '../helpers/actions';
@@ -174,9 +175,7 @@ describe('@lightning - Lightning', () => {
174175
await expect(reviewAmt).toHaveText('1 000');
175176
await console.info('I cannot edit the amount on Review screen');
176177
await tap('ReviewAmount-primary');
177-
await tap('TagsAddSend');
178-
await typeText('TagInputSend', 'stag');
179-
await tap('SendTagsSubmit');
178+
await addSendTag('stag');
180179
await sleep(500); // wait for keyboard to close
181180
await dragOnElement('GRAB', 'right', 0.95); // Swipe to confirm
182181
await elementById('SendSuccess').waitForDisplayed();

test/specs/onchain.e2e.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
handleOver50PercentAlert,
2222
handleOver100Alert,
2323
acknowledgeReceivedPayment,
24+
addSendTag,
2425
enterAmount,
2526
formatSats,
2627
expectTotalBalance,
@@ -151,10 +152,7 @@ describe('@onchain - Onchain', () => {
151152
await tap('ContinueAmount');
152153

153154
// Review & Send
154-
await elementById('TagsAddSend').waitForDisplayed();
155-
await tap('TagsAddSend');
156-
await typeText('TagInputSend', 'stag');
157-
await elementByText('Add', 'exact').click();
155+
await addSendTag('stag');
158156
await dragOnElement('GRAB', 'right', 0.95);
159157

160158
await sleep(1000);

0 commit comments

Comments
 (0)