@@ -17,6 +17,7 @@ import {
1717 waitForPeerConnection ,
1818 getSeed ,
1919 restoreWallet ,
20+ waitForBackup ,
2021} from './helpers' ;
2122
2223d = checkComplete ( [ 'transfer-1' , 'transfer-2' ] ) ? describe . skip : describe ;
@@ -104,7 +105,7 @@ d('Transfer', () => {
104105 await expect ( element ( by . text ( '100 000' ) ) ) . toBeVisible ( ) ;
105106 await element ( by . id ( 'SpendingAdvancedDefault' ) ) . tap ( ) ;
106107 await element ( by . id ( 'SpendingAdvancedNumberField' ) ) . tap ( ) ;
107- let { label } = await element (
108+ const { label } = await element (
108109 by . id ( 'SpendingAdvancedNumberField' ) ,
109110 ) . getAttributes ( ) ;
110111 const lspBalance = Number . parseInt ( label , 10 ) ;
@@ -211,13 +212,14 @@ d('Transfer', () => {
211212 await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
212213
213214 const seed = await getSeed ( ) ;
215+ await waitForBackup ( ) ;
214216 await restoreWallet ( seed ) ;
215217
216218 // check transfer card
217219 await expect ( element ( by . id ( 'Suggestion-lightningSettingUp' ) ) ) . toBeVisible ( ) ;
218220
219221 // check activity after restore
220- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
222+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
221223 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
222224 await expect ( element ( by . id ( 'StatusTransfer' ) ) ) . toBeVisible ( ) ;
223225
@@ -234,10 +236,11 @@ d('Transfer', () => {
234236 . withTimeout ( 30000 ) ;
235237
236238 // reset & restore again
239+ await waitForBackup ( ) ;
237240 await restoreWallet ( seed ) ;
238241
239242 // check activity after restore
240- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
243+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
241244 await expect ( element ( by . id ( 'BoostingIcon' ) ) ) . toBeVisible ( ) ;
242245 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
243246 await expect ( element ( by . id ( 'StatusBoosting' ) ) ) . toBeVisible ( ) ;
@@ -275,9 +278,7 @@ d('Transfer', () => {
275278 await waitFor ( element ( by . id ( 'LDKNodeID' ) ) )
276279 . toBeVisible ( )
277280 . withTimeout ( 60000 ) ;
278- let { label : ldkNodeId } = await element (
279- by . id ( 'LDKNodeID' ) ,
280- ) . getAttributes ( ) ;
281+ const { label : ldkNodeId } = await element ( by . id ( 'LDKNodeID' ) ) . getAttributes ( ) ;
281282 await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
282283
283284 // Get LND node id
@@ -331,12 +332,10 @@ d('Transfer', () => {
331332 await expect ( element ( by . id ( 'Suggestion-lightningSettingUp' ) ) ) . toBeVisible ( ) ;
332333
333334 // check activity
334- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
335+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
335336 await expect ( element ( by . text ( 'From Savings (±30m)' ) ) ) . toBeVisible ( ) ;
336337 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
337338 await expect ( element ( by . text ( 'Transfer (±30m)' ) ) ) . toBeVisible ( ) ;
338- await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
339- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'top' , NaN , 0.85 ) ;
340339
341340 // Mine 3 blocks
342341 await rpc . generateToAddress ( 3 , await rpc . getNewAddress ( ) ) ;
@@ -361,7 +360,7 @@ d('Transfer', () => {
361360 await expect (
362361 element ( by . id ( 'MoneyText' ) . withAncestor ( by . id ( 'TotalSize' ) ) ) ,
363362 ) . toHaveText ( '20 000' ) ;
364- await element ( by . id ( 'ChannelScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.1 ) ;
363+ await element ( by . id ( 'ChannelScrollView' ) ) . scrollTo ( 'bottom' , Number . NaN , 0.1 ) ;
365364 await expect ( element ( by . id ( 'IsUsableYes' ) ) ) . toBeVisible ( ) ;
366365 await element ( by . id ( 'NavigationClose' ) ) . atIndex ( 0 ) . tap ( ) ;
367366
0 commit comments