Skip to content

Commit e3399e2

Browse files
authored
Merge pull request #94 from synonymdev/fix/transfer-activities
verify transfer activities in activity list
2 parents 639beb2 + 9edd24b commit e3399e2

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

test/helpers/actions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ export async function getTextUnder(containerId: string, index: Index = 'last'):
268268
export async function tap(testId: string) {
269269
const el = await elementById(testId);
270270
await el.waitForDisplayed();
271-
await sleep(100); // Allow time for the element to settle
271+
await sleep(150); // Allow time for the element to settle
272272
await el.click();
273-
await sleep(50);
273+
await sleep(100);
274274
}
275275

276276
export async function multiTap(testId: string, count: number) {
@@ -567,7 +567,7 @@ export async function restoreWallet(
567567
await tap('GetStartedButton');
568568
await sleep(1000);
569569
await handleAndroidAlert();
570-
570+
571571
if (expectQuickPayTimedSheet) {
572572
await dismissQuickPayIntro();
573573
}
@@ -846,6 +846,7 @@ export async function acknowledgeHighBalanceWarning({
846846
await doTriggerTimedSheet();
847847
}
848848
await elementById('HighBalanceSheetDescription').waitForDisplayed();
849+
await sleep(700); // wait for the app to settle
849850
await tap('HighBalanceSheetContinue');
850851
await elementById('HighBalanceSheetDescription').waitForDisplayed({ reverse: true });
851852
await sleep(500);

test/specs/transfer.e2e.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,34 @@ describe('@transfer - Transfer', () => {
239239
// check activities
240240
await sleep(1000);
241241
await swipeFullScreen('up');
242+
await swipeFullScreen('up');
242243
await elementById('ActivityShort-0').waitForDisplayed();
243244
await expectTextWithin('ActivityShort-0', 'Transfer');
244245
await elementById('ActivityShort-1').waitForDisplayed();
245246
await expectTextWithin('ActivityShort-1', 'Transfer');
246247

248+
await tap('ActivityShowAll');
249+
250+
// All transactions
251+
await expectTextWithin('Activity-1', '-');
252+
await expectTextWithin('Activity-2', '-');
253+
await expectTextWithin('Activity-3', '+');
254+
255+
// Sent, 0 transactions
256+
await tap('Tab-sent');
257+
await elementById('Activity-1').waitForDisplayed({ reverse: true });
258+
259+
// Received, 1 transaction
260+
await tap('Tab-received');
261+
await expectTextWithin('Activity-1', '+');
262+
await elementById('Activity-2').waitForDisplayed({ reverse: true });
263+
264+
// Other, 2 transfer transactions
265+
await tap('Tab-other');
266+
await expectTextWithin('Activity-1', '-');
267+
await expectTextWithin('Activity-2', '-');
268+
await elementById('Activity-3').waitForDisplayed({ reverse: true });
269+
247270
// TODO: enable when boost backup is operational
248271
// https://github.com/synonymdev/bitkit-android/issues/321
249272
//const seed = await getSeed();

0 commit comments

Comments
 (0)