Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0c33bf9
test: init
LeVinhGithub Apr 22, 2026
42083b4
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 23, 2026
9ae07ca
test: fix failed test
LeVinhGithub Apr 23, 2026
a67c7ad
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 23, 2026
0638fc0
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 23, 2026
bde2af0
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 23, 2026
79739e3
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 23, 2026
d990c22
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 24, 2026
c564cee
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 24, 2026
e7bf47b
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 24, 2026
b32bccf
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 26, 2026
e7fb32c
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 30, 2026
7081936
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub Apr 30, 2026
f0f5dbf
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 1, 2026
97489b9
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 1, 2026
c7adb61
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 5, 2026
fc5449d
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 5, 2026
042c317
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 5, 2026
a6e3726
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 6, 2026
ded27c1
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 6, 2026
b4deae7
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 6, 2026
5057f1e
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 6, 2026
b5d0149
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 6, 2026
f4aa883
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 7, 2026
f452736
Merge branch 'main' into harry/MMQA-1711
LeVinhGithub May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions tests/api-mocking/mock-responses/feature-flags-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,6 @@ export const remoteFeatureFlagPredictEnabled = (enabled = true) => ({
enabled: false,
minimumVersion: '7.60.0',
},
// Exclude 'nba' — NBA markets render PredictGameDetailsContent which uses a different cash-out testID not yet supported by E2E page objects
predictLiveSports: {
versions: {
'7.67.0': { enabled: true, leagues: ['nfl'] },
'7.70.0': { enabled: true, leagues: ['nfl'] },
},
},
});

export const remoteFeatureFlagHomepageSectionsV1Enabled = (enabled = true) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export const CONDITIONAL_TOKENS_CONTRACT_ADDRESS =
export const POLYGON_EIP7702_CONTRACT_ADDRESS =
'0x63c0c19a282a1B52b07dD5a65b58948A07DAE32B';

// Predict position ID for Spurs vs. Pelicans
export const SPURS_PELICANS_POSITION_ID =
'110743925263777693447488608878982152642205002490046349037358337248548507433643';

// EIP-7702 format: 0xef01 (magic byte) + 00 (padding) + 20-byte contract address
// This format indicates an EOA is upgraded with EIP-7702
export const EIP7702_CODE_FORMAT = (contractAddress: string): string => {
Expand Down
35 changes: 35 additions & 0 deletions tests/page-objects/Predict/PredictDetailsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import {
PredictMarketDetailsSelectorsIDs,
PredictMarketDetailsSelectorsText,
} from '../../../app/components/UI/Predict/Predict.testIds';
import { PREDICT_PICK_ITEM_TEST_IDS } from '../../../app/components/UI/Predict/components/PredictPicks/PredictPickItem.testIds';
import {
PREDICT_GAME_DETAILS_FOOTER,
PREDICT_GAME_DETAILS_FOOTER_TEST_IDS,
} from '../../../app/components/UI/Predict/components/PredictGameDetailsFooter/PredictGameDetailsFooter.testIds';
import { PREDICT_ACTION_BUTTONS_TEST_IDS } from '../../../app/components/UI/Predict/components/PredictActionButtons/PredictActionButtons.testIds';
import { PREDICT_BET_BUTTONS_TEST_IDS } from '../../../app/components/UI/Predict/components/PredictActionButtons/PredictBetButtons.testIds';

class PredictDetailsPage {
get container(): EncapsulatedElementType {
Expand Down Expand Up @@ -208,6 +215,14 @@ class PredictDetailsPage {
});
}

get gameBetYesButton(): EncapsulatedElementType {
const testID = `${PREDICT_GAME_DETAILS_FOOTER}${PREDICT_GAME_DETAILS_FOOTER_TEST_IDS.ACTION_BUTTONS}${PREDICT_ACTION_BUTTONS_TEST_IDS.PREDICT_BET_BUTTON}${PREDICT_BET_BUTTONS_TEST_IDS.PREDICT_BET_BUTTON_YES}`;
return encapsulated({
detox: () => Matchers.getElementByID(testID),
appium: () => PlaywrightMatchers.getElementById(testID, { exact: true }),
});
}

async waitForScreenToDisplay(): Promise<void> {
await Assertions.expectElementToBeVisible(this.container, {
description: 'Predict market details screen',
Expand Down Expand Up @@ -246,12 +261,32 @@ class PredictDetailsPage {
});
}

getGameCashOutButton(positionId: string): EncapsulatedElementType {
const testID = `${PREDICT_PICK_ITEM_TEST_IDS.PREDICT_PICKS_CASH_OUT_BUTTON}-${positionId}`;
return encapsulated({
detox: () => Matchers.getElementByID(testID),
appium: () => PlaywrightMatchers.getElementById(testID, { exact: true }),
});
}

async tapGameCashOutButton(positionId: string): Promise<void> {
await UnifiedGestures.waitAndTap(this.getGameCashOutButton(positionId), {
description: 'Game details cash out button',
});
}

async tapOpenPositionValue(): Promise<void> {
await UnifiedGestures.waitAndTap(this.getOpenPositionValueButton(), {
description: 'Celtics outcome button',
});
}

async tapGameBetYesButton(): Promise<void> {
await UnifiedGestures.waitAndTap(this.gameBetYesButton, {
description: 'Game bet yes button',
});
}

async tapPositionAmount(amount: string): Promise<void> {
const digits = amount.split('');

Expand Down
5 changes: 4 additions & 1 deletion tests/smoke/predict/predict-cash-out.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import TabBarComponent from '../../page-objects/wallet/TabBarComponent';
import ActivitiesView from '../../page-objects/Transactions/ActivitiesView';
import PredictActivityDetails from '../../page-objects/Transactions/predictionsActivityDetails';
import { predictCashOutFlowAnalyticsExpectations } from '../../helpers/analytics/expectations/predict-cash-out.analytics';
import { SPURS_PELICANS_POSITION_ID } from '../../api-mocking/mock-responses/polymarket/polymarket-constants';

/*
Test Scenario: Cash out on open position - Spurs vs. Pelicans
Expand Down Expand Up @@ -68,7 +69,9 @@ describe(SmokePredictions('Predictions'), () => {
await Assertions.expectElementToBeVisible(PredictDetailsPage.container);
await POLYMARKET_POST_CASH_OUT_MOCKS(mockServer);

await PredictDetailsPage.tapCashOutButton();
await PredictDetailsPage.tapGameCashOutButton(
SPURS_PELICANS_POSITION_ID,
);
await Assertions.expectElementToBeVisible(PredictCashOutPage.container);

await Assertions.expectElementToBeVisible(
Expand Down
7 changes: 6 additions & 1 deletion tests/smoke/predict/predict-geo-restriction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import {
POLYMARKET_GEO_BLOCKED_MOCKS,
} from '../../api-mocking/mock-responses/polymarket/polymarket-mocks';
import PredictAddFunds from '../../page-objects/Predict/PredictAddFunds';
import { getEventsPayloads } from '../../helpers/analytics/helpers';
import SoftAssert from '../../framework/SoftAssert';
Comment thread
LeVinhGithub marked this conversation as resolved.
import { SPURS_PELICANS_POSITION_ID } from '../../api-mocking/mock-responses/polymarket/polymarket-constants';
import {
geoBlockedPredictActionExpectations,
geoBlockedCashoutExpectations,
Expand Down Expand Up @@ -119,7 +122,9 @@ describe(
await WalletView.scrollAndTapPredictionsPosition(
'Spurs vs. Pelicans',
);
await PredictDetailsPage.tapCashOutButton();
await PredictDetailsPage.tapGameCashOutButton(
SPURS_PELICANS_POSITION_ID,
);

await PredictUnavailableView.expectVisible();
await PredictUnavailableView.tapGotIt();
Expand Down
14 changes: 1 addition & 13 deletions tests/smoke/predict/predict-open-position.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe(SmokePredictions('Predictions'), () => {
positionDetails.category,
positionDetails.marketIndex,
);
await PredictDetailsPage.tapOpenPositionValue();
await PredictDetailsPage.tapGameBetYesButton();

await POLYMARKET_POST_OPEN_POSITION_MOCKS(mockServer);

Expand All @@ -89,18 +89,6 @@ describe(SmokePredictions('Predictions'), () => {

await PredictDetailsPage.tapOpenPosition();

await Assertions.expectElementToBeVisible(
PredictDetailsPage.positionsTab,
{
description:
'Position tab should appear after opening a new position',
},
);

await Assertions.expectTextDisplayed(positionDetails.name, {
description: 'Position card for Celtics vs. Nets should appear',
});

await PredictDetailsPage.tapBackButton();
await Assertions.expectTextDisplayed(positionDetails.newBalance, {
description: `USDC balance should display ${positionDetails.newBalance} after opening position`,
Expand Down
Loading