@@ -14,14 +14,14 @@ import {
1414 POLYMARKET_REMOVE_CLAIMED_POSITIONS_MOCKS ,
1515 POLYMARKET_TRANSACTION_SENTINEL_MOCKS ,
1616 POLYMARKET_UPDATE_USDC_BALANCE_MOCKS ,
17+ POLYMARKET_ADD_CLAIMED_POSITIONS_TO_ACTIVITY_MOCKS ,
1718} from '../../api-mocking/mock-responses/polymarket/polymarket-mocks' ;
1819import { Mockttp } from 'mockttp' ;
1920import { setupRemoteFeatureFlagsMock } from '../../api-mocking/helpers/remoteFeatureFlagsHelper' ;
2021import PredictClaimPage from '../../pages/Predict/PredictClaimPage' ;
2122import TabBarComponent from '../../pages/wallet/TabBarComponent' ;
2223import ActivitiesView from '../../pages/Transactions/ActivitiesView' ;
2324import PredictActivityDetails from '../../pages/Transactions/predictionsActivityDetails' ;
24- // import WalletActionsBottomSheet from '../../pages/wallet/WalletActionsBottomSheet';
2525import {
2626 POLYMARKET_RESOLVED_LOST_POSITIONS_RESPONSE ,
2727 POLYMARKET_WINNING_POSITIONS_RESPONSE ,
@@ -60,7 +60,7 @@ describe(SmokePredictions('Predictions'), () => {
6060 await PredictHelpers . setPortugalLocation ( ) ;
6161 await loginToApp ( ) ;
6262
63- // Claim button is animated - disabling sync to prevent test hang
63+ // Claim button is animated - disabling sync on iOS to prevent test hang
6464 await device . disableSynchronization ( ) ;
6565
6666 await WalletView . tapOnPredictionsTab ( ) ;
@@ -72,15 +72,18 @@ describe(SmokePredictions('Predictions'), () => {
7272 await WalletView . tapClaimButton ( ) ;
7373 await Assertions . expectElementToBeVisible ( PredictClaimPage . container ) ;
7474
75- // Set up mocks to remove claimed positions after tapping claim button
76- await POLYMARKET_REMOVE_CLAIMED_POSITIONS_MOCKS ( mockServer ) ;
77- await POLYMARKET_UPDATE_USDC_BALANCE_MOCKS ( mockServer , 'claim' ) ;
78-
7975 await PredictClaimPage . tapClaimConfirmButton ( ) ;
80- await device . enableSynchronization ( ) ;
76+
77+ await POLYMARKET_UPDATE_USDC_BALANCE_MOCKS ( mockServer , 'claim' ) ;
78+ await POLYMARKET_REMOVE_CLAIMED_POSITIONS_MOCKS ( mockServer ) ;
79+ await POLYMARKET_ADD_CLAIMED_POSITIONS_TO_ACTIVITY_MOCKS ( mockServer ) ;
8180
8281 await Assertions . expectElementToBeVisible ( WalletView . container ) ;
82+ await device . enableSynchronization ( ) ;
8383
84+ await Assertions . expectElementToNotBeVisible ( WalletView . claimButton , {
85+ description : 'Claim button should not be visible' ,
86+ } ) ;
8487 /*
8588 Verify that all resolved positions (lost positions + winning positions) are removed after claiming
8689 Resolved positions include both:
@@ -98,10 +101,6 @@ describe(SmokePredictions('Predictions'), () => {
98101 } ) ;
99102 }
100103
101- await Assertions . expectElementToNotBeVisible ( WalletView . claimButton , {
102- description : 'Claim button should not be visible' ,
103- } ) ;
104-
105104 await TabBarComponent . tapActivity ( ) ;
106105
107106 await ActivitiesView . tapOnPredictionsTab ( ) ;
@@ -123,9 +122,11 @@ describe(SmokePredictions('Predictions'), () => {
123122 }
124123
125124 await TabBarComponent . tapWallet ( ) ;
126- // await TabBarComponent.tapActions();
127- // await WalletActionsBottomSheet.tapPredictButton();
128- // await Assertions.expectTextDisplayed('$48.16');
125+
126+ // Verify balance on iOS only. Android balances take a while to refresh.
127+ if ( device . getPlatform ( ) === 'ios' ) {
128+ await Assertions . expectTextDisplayed ( '$48.16' ) ;
129+ }
129130 } ,
130131 ) ;
131132 } ) ;
0 commit comments