@@ -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