@@ -59,7 +59,7 @@ describe('@boost - Boost', () => {
5959
6060 // old tx
6161 await tap ( 'ActivityShort-0' ) ;
62- await expectText ( '100 000' ) ;
62+ await expectText ( '100 000' , { strategy : 'contains' } ) ;
6363 await tap ( 'ActivityTxDetails' ) ;
6464 const origTxId = await getTextUnder ( 'TXID' ) ;
6565 console . info ( { oldTxId : origTxId } ) ;
@@ -77,13 +77,25 @@ describe('@boost - Boost', () => {
7777 // check Activity
7878 await elementById ( 'BoostingIcon' ) . waitForDisplayed ( ) ;
7979 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
80- await expect ( elementById ( 'ActivityShort-1' ) ) . toBeDisplayed ( ) ;
81- await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
80+
81+ // no additional boost tx item on iOS, there is one on Android
82+ const showsBoostTxItem = driver . isAndroid ;
83+ if ( showsBoostTxItem ) {
84+ await expect ( elementById ( 'ActivityShort-1' ) ) . toBeDisplayed ( ) ;
85+ await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
86+ } else {
87+ await expect ( elementById ( 'ActivityShort-1' ) ) . not . toBeDisplayed ( ) ;
88+ await expect ( elementById ( 'ActivityShort-2' ) ) . not . toBeDisplayed ( ) ;
89+ }
8290
8391 // orig tx still there
8492 await swipeFullScreen ( 'up' ) ;
85- await tap ( 'ActivityShort-1' ) ;
86- await expectText ( '100 000' ) ;
93+ if ( showsBoostTxItem ) {
94+ await tap ( 'ActivityShort-1' ) ;
95+ } else {
96+ await tap ( 'ActivityShort-0' ) ;
97+ }
98+ await expectText ( '100 000' , { strategy : 'contains' } ) ;
8799 await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
88100 await elementById ( 'StatusBoosting' ) . waitForDisplayed ( ) ;
89101 await tap ( 'ActivityTxDetails' ) ;
@@ -95,15 +107,17 @@ describe('@boost - Boost', () => {
95107 console . info ( { parentTxId } ) ;
96108 await doNavigationClose ( ) ;
97109
98- // new tx
99- await tap ( 'ActivityShort-0' ) ;
100- await tap ( 'ActivityTxDetails' ) ;
101- const boostTxId = await getTextUnder ( 'TXID' ) ;
102- console . info ( { newTxId : boostTxId } ) ;
103- await expect ( origTxId !== boostTxId ) . toBe ( true ) ;
104- // TODO: not implemented yet
105- // await expect(boostTxId === parentTxId).toBe(true);
106- await doNavigationClose ( ) ;
110+ if ( showsBoostTxItem ) {
111+ // new tx
112+ await tap ( 'ActivityShort-0' ) ;
113+ await tap ( 'ActivityTxDetails' ) ;
114+ const boostTxId = await getTextUnder ( 'TXID' ) ;
115+ console . info ( { newTxId : boostTxId } ) ;
116+ await expect ( origTxId !== boostTxId ) . toBe ( true ) ;
117+ // TODO: not implemented yet
118+ // await expect(boostTxId === parentTxId).toBe(true);
119+ await doNavigationClose ( ) ;
120+ }
107121
108122 // --- skip due to: https://github.com/synonymdev/bitkit-android/issues/321 --- //
109123
@@ -119,8 +133,13 @@ describe('@boost - Boost', () => {
119133 // check activity after restore
120134 await swipeFullScreen ( 'up' ) ;
121135 await elementById ( 'BoostingIcon' ) . waitForDisplayed ( ) ;
122- await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
123- await tap ( 'ActivityShort-1' ) ;
136+ if ( showsBoostTxItem ) {
137+ await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
138+ await tap ( 'ActivityShort-1' ) ;
139+ } else {
140+ await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
141+ await tap ( 'ActivityShort-0' ) ;
142+ }
124143 await elementById ( 'BoostedButton' ) . waitForDisplayed ( ) ;
125144 await elementById ( 'StatusBoosting' ) . waitForDisplayed ( ) ;
126145
@@ -135,14 +154,18 @@ describe('@boost - Boost', () => {
135154 await attemptRefreshOnHomeScreen ( ) ;
136155 await swipeFullScreen ( 'up' ) ;
137156 await elementById ( 'ActivityShort-0' ) . waitForDisplayed ( ) ;
138- await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
157+ if ( showsBoostTxItem ) {
158+ await elementById ( 'ActivityShort-1' ) . waitForDisplayed ( ) ;
159+ }
139160 // TEMP: refresh until proper events available
140161
141162 await tap ( 'ActivityShort-0' ) ;
142163 await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
143164 await doNavigationClose ( ) ;
144- await tap ( 'ActivityShort-1' ) ;
145- await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
165+ if ( showsBoostTxItem ) {
166+ await tap ( 'ActivityShort-1' ) ;
167+ await elementById ( 'StatusConfirmed' ) . waitForDisplayed ( ) ;
168+ }
146169 } ) ;
147170
148171 ciIt ( '@boost_2 - Can do RBF' , async ( ) => {
0 commit comments