Skip to content

Commit 4f95c12

Browse files
committed
test: e2e slashtags
1 parent ae14f89 commit 4f95c12

40 files changed

+369
-63
lines changed

.env.development.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ ELECTRUM_REGTEST_PROTO=tcp
4242
WALLET_DEFAULT_SELECTED_NETWORK=bitcoin
4343

4444
DISABLE_PERIODIC_REMINDERS=false
45-
DISABLE_LOOP_ANIMATION=false
45+
DISABLE_ANIMATION=false

.env.test.template

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# middleware for redux-flipper plugin
2-
ENABLE_REDUX_FLIPPER=true
2+
ENABLE_REDUX_FLIPPER=false
33

44
# middleware for redux-logger
5-
ENABLE_REDUX_LOGGER=true
5+
ENABLE_REDUX_LOGGER=false
66

77
# middleware for immutable-state-invariant (disable if things are slow in development)
8-
ENABLE_REDUX_IMMUTABLE_CHECK=true
8+
ENABLE_REDUX_IMMUTABLE_CHECK=false
99

1010
# react-native-mmkv-flipper-plugin
1111
ENABLE_MMKV_FLIPPER=false
@@ -22,8 +22,8 @@ BACKUPS_SERVER_SLASHTAG=slash:3phbmj4jkzs7b6e6t1h8jwy1u6o9w9y39nscsc6r1q89t1mxcs
2222

2323
# Slashtags
2424
DISABLE_SLASHTAGS=false
25-
SLASHTAGS_SEEDER_BASE_URL=
26-
SLASHTAGS_SEEDER_TOPIC=
25+
SLASHTAGS_SEEDER_BASE_URL=https://blocktank.synonym.to
26+
SLASHTAGS_SEEDER_TOPIC=3b9f8ccd062ca9fc0b7dd407b4cd287ca6e2d8b32f046d7958fa7bea4d78fd75
2727

2828
# Blocktank
2929
BLOCKTANK_HOST=https://api.stag.blocktank.to
@@ -42,4 +42,4 @@ ELECTRUM_REGTEST_PROTO=tcp
4242
WALLET_DEFAULT_SELECTED_NETWORK=bitcoinRegtest
4343

4444
DISABLE_PERIODIC_REMINDERS=true
45-
DISABLE_LOOP_ANIMATION=true
45+
DISABLE_ANIMATION=true

e2e/backup.e2e.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Backup', () => {
5050
// - backup seed
5151
// - restore wallet
5252
// - check if everything was restored
53-
if (checkComplete('b1')) {
53+
if (checkComplete('backup-1')) {
5454
return;
5555
}
5656
// recieve bitcoin
@@ -189,6 +189,6 @@ describe('Backup', () => {
189189
await expect(element(by.id('PriceWidget'))).toBeVisible();
190190
await expect(element(by.id('HeadlinesWidget'))).toBeVisible();
191191

192-
markComplete('b1');
192+
markComplete('backup-1');
193193
});
194194
});

e2e/newWallet.e2e.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('New Wallet', () => {
1010
// });
1111

1212
it('should create new wallet', async () => {
13-
if (checkComplete('n1')) {
13+
if (checkComplete('newwallet-1')) {
1414
return;
1515
}
1616

@@ -26,6 +26,6 @@ describe('New Wallet', () => {
2626

2727
// wat for wallet to be created
2828
await waitFor(element(by.id('ToGetStartedClose'))).toBeVisible();
29-
markComplete('n1');
29+
markComplete('newwallet-1');
3030
});
3131
});

e2e/onchain.e2e.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Onchain', () => {
5353
// - TODO: coin selectiom
5454

5555
it('Can receive 2 transactions and send them all at once', async () => {
56-
if (checkComplete('o1')) {
56+
if (checkComplete('onchain-1')) {
5757
return;
5858
}
5959

@@ -222,11 +222,11 @@ describe('Onchain', () => {
222222
await element(by.id('CalendarApplyButton')).tap();
223223
await expect(element(by.id('Activity-3'))).toExist();
224224

225-
markComplete('o1');
225+
markComplete('onchain-1');
226226
});
227227

228228
it('Avoids creating a dust output and instead adds it to the fee', async () => {
229-
if (checkComplete('o2')) {
229+
if (checkComplete('onchain-2')) {
230230
return;
231231
}
232232

@@ -300,7 +300,7 @@ describe('Onchain', () => {
300300
// only 1 output -> no dust
301301
await expect(element(by.text('1 OUTPUT'))).toBeVisible();
302302

303-
markComplete('o2');
303+
markComplete('onchain-2');
304304
});
305305
});
306306
});

e2e/settings.e2e.js

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('Settings', () => {
1919

2020
describe('General', () => {
2121
it('Can switch local currency', async () => {
22-
if (checkComplete('s1')) {
22+
if (checkComplete('settings-1')) {
2323
return;
2424
}
2525

@@ -46,11 +46,11 @@ describe('Settings', () => {
4646
// switch back to sats
4747
await element(by.id('TotalBalance')).tap();
4848
await element(by.id('TotalBalance')).tap();
49-
markComplete('s1');
49+
markComplete('settings-1');
5050
});
5151

5252
it('Can switch Bitcoin Unit', async () => {
53-
if (checkComplete('s2')) {
53+
if (checkComplete('settings-2')) {
5454
return;
5555
}
5656

@@ -69,11 +69,11 @@ describe('Settings', () => {
6969
await expect(
7070
element(by.id('Value').withAncestor(by.id('BitcoinUnitSettings'))),
7171
).toHaveText('Satoshis');
72-
markComplete('s2');
72+
markComplete('settings-2');
7373
});
7474

7575
it('Can switch transaction speed', async () => {
76-
if (checkComplete('s3')) {
76+
if (checkComplete('settings-3')) {
7777
return;
7878
}
7979

@@ -103,11 +103,11 @@ describe('Settings', () => {
103103
await expect(
104104
element(by.id('Value').withAncestor(by.id('TransactionSpeedSettings'))),
105105
).toHaveText('Normal');
106-
markComplete('s3');
106+
markComplete('settings-3');
107107
});
108108

109109
it('Can change hide and reset Suggestions', async () => {
110-
if (checkComplete('s4')) {
110+
if (checkComplete('settings-4')) {
111111
return;
112112
}
113113

@@ -142,7 +142,7 @@ describe('Settings', () => {
142142

143143
// backupSeedPhrase should be visible again
144144
await expect(element(by.id('Suggestion-backupSeedPhrase'))).toBeVisible();
145-
markComplete('s4');
145+
markComplete('settings-4');
146146
});
147147
});
148148

@@ -156,7 +156,7 @@ describe('Settings', () => {
156156
// - login with PIN
157157
// - disable PIN
158158
// - enter wrong PIN 10 times and reset the app
159-
if (checkComplete('s5')) {
159+
if (checkComplete('settings-5')) {
160160
return;
161161
}
162162

@@ -270,13 +270,13 @@ describe('Settings', () => {
270270
// await device.launchApp({ newInstance: true });
271271
// await waitFor(element(by.id('Check1'))).toBeVisible();
272272

273-
markComplete('s5');
273+
markComplete('settings-5');
274274
});
275275
});
276276

277277
describe('Backup or restore', () => {
278278
it('Can show backup and validate it', async () => {
279-
if (checkComplete('s6')) {
279+
if (checkComplete('settings-6')) {
280280
return;
281281
}
282282

@@ -306,13 +306,13 @@ describe('Settings', () => {
306306
await element(by.id('OK')).tap();
307307
await element(by.id('OK')).tap();
308308
await sleep(1000);
309-
markComplete('s6');
309+
markComplete('settings-6');
310310
});
311311
});
312312

313313
describe('Advanced', () => {
314314
it('Can switch address types', async () => {
315-
if (checkComplete('s7')) {
315+
if (checkComplete('settings-7')) {
316316
return;
317317
}
318318
// wallet be in regtest mode by default
@@ -333,6 +333,7 @@ describe('Settings', () => {
333333
await element(by.id('Settings')).tap();
334334
await element(by.id('AdvancedSettings')).tap();
335335
await element(by.id('AddressViewer')).tap();
336+
await sleep(1000);
336337
await waitFor(element(by.id('Address-0')))
337338
.toBeVisible()
338339
.withTimeout(30000);
@@ -357,6 +358,7 @@ describe('Settings', () => {
357358

358359
// check address in Address Viewer
359360
await element(by.id('AddressViewer')).tap();
361+
await sleep(1000);
360362
await waitFor(element(by.id('Address-0')))
361363
.toBeVisible()
362364
.withTimeout(30000);
@@ -392,11 +394,11 @@ describe('Settings', () => {
392394
await element(by.id('p2wpkh')).tap();
393395
await element(by.id('NavigationClose')).tap();
394396
await sleep(1000);
395-
markComplete('s7');
397+
markComplete('settings-7');
396398
});
397399

398400
it('Can open LN settings screens', async () => {
399-
if (checkComplete('s8')) {
401+
if (checkComplete('settings-8')) {
400402
return;
401403
}
402404

@@ -414,18 +416,20 @@ describe('Settings', () => {
414416
await element(by.id('NavigationBack')).tap();
415417

416418
await element(by.id('LightningNodeInfo')).tap();
417-
await expect(element(by.id('LDKNodeID'))).toBeVisible();
419+
await waitFor(element(by.id('LDKNodeID')))
420+
.toBeVisible()
421+
.withTimeout(30000);
418422
await element(by.id('NavigationBack')).tap();
419423
await element(by.id('NavigationBack')).tap();
420424
if (!__DEV__) {
421425
await element(by.id('DevOptions')).multiTap(5); // disable dev mode
422426
}
423427
await sleep(1000);
424-
markComplete('s8');
428+
markComplete('settings-8');
425429
});
426430

427431
it('Can enter wrong Electrum server and get an error message', async () => {
428-
if (checkComplete('s9')) {
432+
if (checkComplete('settings-9')) {
429433
return;
430434
}
431435

@@ -448,13 +452,13 @@ describe('Settings', () => {
448452
await element(by.id('ConnectToHost')).tap();
449453
await waitFor(element(by.id('Connected'))).toBeVisible();
450454
await sleep(1000);
451-
markComplete('s9');
455+
markComplete('settings-9');
452456
});
453457
});
454458

455459
describe('Dev Settings', () => {
456460
it('Shows the crash error screen when triggering render error', async () => {
457-
if (checkComplete('s10')) {
461+
if (checkComplete('settings-10')) {
458462
return;
459463
}
460464

@@ -467,7 +471,7 @@ describe('Settings', () => {
467471

468472
// Error screen will not be rendered in development mode
469473
if (__DEV__) {
470-
markComplete('s10');
474+
markComplete('settings-10');
471475
return;
472476
}
473477

@@ -476,7 +480,7 @@ describe('Settings', () => {
476480
await expect(element(by.id('ErrorClose'))).toBeVisible();
477481
await expect(element(by.id('ErrorReport'))).toBeVisible();
478482

479-
markComplete('s10');
483+
markComplete('settings-10');
480484
});
481485
});
482486
});

0 commit comments

Comments
 (0)