@@ -15,6 +15,7 @@ import {
1515 waitForPeerConnection ,
1616 getSeed ,
1717 restoreWallet ,
18+ waitForBackup ,
1819} from './helpers' ;
1920
2021d = checkComplete ( [ 'transfer-1' , 'transfer-2' ] ) ? describe . skip : describe ;
@@ -99,7 +100,7 @@ d('Transfer', () => {
99100 await expect ( element ( by . text ( '100 000' ) ) ) . toBeVisible ( ) ;
100101 await element ( by . id ( 'SpendingAdvancedDefault' ) ) . tap ( ) ;
101102 await element ( by . id ( 'SpendingAdvancedNumberField' ) ) . tap ( ) ;
102- let { label } = await element (
103+ const { label } = await element (
103104 by . id ( 'SpendingAdvancedNumberField' ) ,
104105 ) . getAttributes ( ) ;
105106 const lspBalance = Number . parseInt ( label , 10 ) ;
@@ -206,13 +207,14 @@ d('Transfer', () => {
206207 await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
207208
208209 const seed = await getSeed ( ) ;
210+ await waitForBackup ( ) ;
209211 await restoreWallet ( seed ) ;
210212
211213 // check transfer card
212214 await expect ( element ( by . id ( 'Suggestion-lightningSettingUp' ) ) ) . toBeVisible ( ) ;
213215
214216 // check activity after restore
215- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
217+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
216218 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
217219 await expect ( element ( by . id ( 'StatusTransfer' ) ) ) . toBeVisible ( ) ;
218220
@@ -229,10 +231,11 @@ d('Transfer', () => {
229231 . withTimeout ( 30000 ) ;
230232
231233 // reset & restore again
234+ await waitForBackup ( ) ;
232235 await restoreWallet ( seed ) ;
233236
234237 // check activity after restore
235- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
238+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
236239 await expect ( element ( by . id ( 'BoostingIcon' ) ) ) . toBeVisible ( ) ;
237240 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
238241 await expect ( element ( by . id ( 'StatusBoosting' ) ) ) . toBeVisible ( ) ;
@@ -270,9 +273,7 @@ d('Transfer', () => {
270273 await waitFor ( element ( by . id ( 'LDKNodeID' ) ) )
271274 . toBeVisible ( )
272275 . withTimeout ( 60000 ) ;
273- let { label : ldkNodeId } = await element (
274- by . id ( 'LDKNodeID' ) ,
275- ) . getAttributes ( ) ;
276+ const { label : ldkNodeId } = await element ( by . id ( 'LDKNodeID' ) ) . getAttributes ( ) ;
276277 await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
277278
278279 // Get LND node id
@@ -326,12 +327,10 @@ d('Transfer', () => {
326327 await expect ( element ( by . id ( 'Suggestion-lightningSettingUp' ) ) ) . toBeVisible ( ) ;
327328
328329 // check activity
329- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.85 ) ;
330+ await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'bottom' , 0 ) ;
330331 await expect ( element ( by . text ( 'From Savings (±30m)' ) ) ) . toBeVisible ( ) ;
331332 await element ( by . id ( 'ActivityShort-1' ) ) . tap ( ) ;
332333 await expect ( element ( by . text ( 'Transfer (±30m)' ) ) ) . toBeVisible ( ) ;
333- await element ( by . id ( 'NavigationClose' ) ) . tap ( ) ;
334- await element ( by . id ( 'WalletsScrollView' ) ) . scrollTo ( 'top' , NaN , 0.85 ) ;
335334
336335 // Mine 3 blocks
337336 await rpc . generateToAddress ( 3 , await rpc . getNewAddress ( ) ) ;
@@ -356,7 +355,7 @@ d('Transfer', () => {
356355 await expect (
357356 element ( by . id ( 'MoneyText' ) . withAncestor ( by . id ( 'TotalSize' ) ) ) ,
358357 ) . toHaveText ( '20 000' ) ;
359- await element ( by . id ( 'ChannelScrollView' ) ) . scrollTo ( 'bottom' , NaN , 0.1 ) ;
358+ await element ( by . id ( 'ChannelScrollView' ) ) . scrollTo ( 'bottom' , Number . NaN , 0.1 ) ;
360359 await expect ( element ( by . id ( 'IsUsableYes' ) ) ) . toBeVisible ( ) ;
361360 await element ( by . id ( 'NavigationClose' ) ) . atIndex ( 0 ) . tap ( ) ;
362361
0 commit comments