@@ -15,7 +15,6 @@ import {
1515 elementByIdWithin ,
1616 getTextUnder ,
1717 mineBlocks ,
18- attemptRefreshOnHomeScreen ,
1918 doNavigationClose ,
2019 getSeed ,
2120 waitForBackup ,
@@ -80,25 +79,16 @@ describe('@boost - Boost', () => {
8079 // check Activity
8180 await elementById ( 'BoostingIcon' ) . waitForDisplayed ( ) ;
8281 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
83-
84- // no additional boost tx item on iOS, there is one on Android
85- // https://github.com/synonymdev/bitkit-android/issues/463
86- const showsBoostTxItem = driver . isAndroid ;
87- if ( showsBoostTxItem ) {
88- await expect ( elementById ( 'ActivityShort-1' ) ) . toBeDisplayed ( ) ;
89- await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
90- } else {
91- await expect ( elementById ( 'ActivityShort-1' ) ) . not . toBeDisplayed ( ) ;
92- await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
93- }
82+ await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
83+ await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
84+ await expectTextWithin ( 'ActivityShort-0' , '-' ) ;
85+ await expectTextWithin ( 'ActivityShort-0' , 'Boost Fee' ) ;
86+ await expectTextWithin ( 'ActivityShort-1' , '100 000' ) ;
87+ await expectTextWithin ( 'ActivityShort-1' , '+' ) ;
9488
9589 // orig tx still there
9690 await swipeFullScreen ( 'up' ) ;
97- if ( showsBoostTxItem ) {
98- await tap ( 'ActivityShort-1' ) ;
99- } else {
100- await tap ( 'ActivityShort-0' ) ;
101- }
91+ await tap ( 'ActivityShort-1' ) ;
10292 await expectText ( '100 000' , { strategy : 'contains' } ) ;
10393 await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
10494 await elementById ( 'StatusBoosting' ) . waitForDisplayed ( ) ;
@@ -111,17 +101,14 @@ describe('@boost - Boost', () => {
111101 console . info ( { parentTxId } ) ;
112102 await doNavigationClose ( ) ;
113103
114- if ( showsBoostTxItem ) {
115- // new tx
116- await tap ( 'ActivityShort-0' ) ;
117- await tap ( 'ActivityTxDetails' ) ;
118- const boostTxId = await getTextUnder ( 'TXID' ) ;
119- console . info ( { newTxId : boostTxId } ) ;
120- await expect ( origTxId !== boostTxId ) . toBe ( true ) ;
121- // TODO: not implemented yet
122- // await expect(boostTxId === parentTxId).toBe(true);
123- await doNavigationClose ( ) ;
124- }
104+ // new tx: Boost Fee
105+ await tap ( 'ActivityShort-0' ) ;
106+ await tap ( 'ActivityTxDetails' ) ;
107+ const boostTxId = await getTextUnder ( 'TXID' ) ;
108+ console . info ( { newTxId : boostTxId } ) ;
109+ await expect ( origTxId !== boostTxId ) . toBe ( true ) ;
110+ await expect ( boostTxId === parentTxId ) . toBe ( true ) ;
111+ await doNavigationClose ( ) ;
125112
126113 // wipe & restore
127114 const seed = await getSeed ( ) ;
@@ -131,39 +118,25 @@ describe('@boost - Boost', () => {
131118 // check activity after restore
132119 await swipeFullScreen ( 'up' ) ;
133120 await elementById ( 'BoostingIcon' ) . waitForDisplayed ( ) ;
134- if ( showsBoostTxItem ) {
135- await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
136- await tap ( 'ActivityShort-1' ) ;
137- } else {
138- await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
139- await tap ( 'ActivityShort-0' ) ;
140- }
121+ await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
122+ await tap ( 'ActivityShort-1' ) ;
141123 await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
142124 await elementById ( 'StatusBoosting' ) . waitForDisplayed ( ) ;
143125
144126 // mine new block
145127 await mineBlocks ( rpc , 1 ) ;
146-
147- // check activity item after mine
148- // TEMP: refresh until proper events available
149128 await doNavigationClose ( ) ;
150129 await sleep ( 500 ) ;
151- await swipeFullScreen ( 'down' ) ;
152- await attemptRefreshOnHomeScreen ( ) ;
153- await swipeFullScreen ( 'up' ) ;
130+
131+ // check activity item after mine
154132 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
155- if ( showsBoostTxItem ) {
156- await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
157- }
158- // TEMP: refresh until proper events available
133+ await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
159134
160135 await tap ( 'ActivityShort-0' ) ;
161136 await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
162137 await doNavigationClose ( ) ;
163- if ( showsBoostTxItem ) {
164- await tap ( 'ActivityShort-1' ) ;
165- await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
166- }
138+ await tap ( 'ActivityShort-1' ) ;
139+ await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
167140 } ) ;
168141
169142 ciIt ( '@boost_2 - Can do RBF' , async ( ) => {
@@ -233,11 +206,10 @@ describe('@boost - Boost', () => {
233206 await elementById ( 'BoostingIcon' ) . waitForDisplayed ( ) ;
234207 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
235208 await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
236- await elementById ( 'ActivityShort-2' ) . waitForDisplayed ( ) ;
209+ await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
237210 await expectTextWithin ( 'ActivityShort-0' , '-' ) ;
238- await expectTextWithin ( 'ActivityShort-1' , '-' ) ;
239- await expectTextWithin ( 'ActivityShort-2' , '100 000' ) ;
240- await expectTextWithin ( 'ActivityShort-2' , '+' ) ;
211+ await expectTextWithin ( 'ActivityShort-1' , '100 000' ) ;
212+ await expectTextWithin ( 'ActivityShort-1' , '+' ) ;
241213
242214 // new tx
243215 await tap ( 'ActivityShort-0' ) ;
@@ -262,32 +234,20 @@ describe('@boost - Boost', () => {
262234 // check activity after restore
263235 await swipeFullScreen ( 'up' ) ;
264236 ( await elementByIdWithin ( 'ActivityShort-0' , 'BoostingIcon' ) ) . waitForDisplayed ( ) ;
265- ( await elementByIdWithin ( 'ActivityShort-1' , 'BoostingIcon' ) ) . waitForDisplayed ( ) ;
266237 await tap ( 'ActivityShort-0' ) ;
267238 await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
268239 await elementById ( 'StatusBoosting' ) . waitForDisplayed ( ) ;
269240 await doNavigationClose ( ) ;
270- await tap ( 'ActivityShort-1' ) ;
271- await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
272- await elementById ( 'StatusRemoved' ) . waitForDisplayed ( ) ;
273241
274242 // mine new block
275243 await mineBlocks ( rpc , 1 ) ;
276-
277- // check activity item after mine
278- // TEMP: refresh until proper events available
279244 await doNavigationClose ( ) ;
280245 await sleep ( 500 ) ;
281- await swipeFullScreen ( 'down' ) ;
282- await attemptRefreshOnHomeScreen ( ) ;
283- await swipeFullScreen ( 'up' ) ;
284- // TEMP: refresh until proper events available
246+
247+ // check activity item after mine
285248 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
286249 await tap ( 'ActivityShort-0' ) ;
287250 await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
288251 await doNavigationClose ( ) ;
289- ( await elementByIdWithin ( 'ActivityShort-1' , 'BoostingIcon' ) ) . waitForDisplayed ( ) ;
290- await tap ( 'ActivityShort-1' ) ;
291- await elementById ( 'StatusRemoved' ) . waitForDisplayed ( ) ;
292252 } ) ;
293253} ) ;
0 commit comments