Skip to content

test: MMQA - 1711 - [Mobile] Update Predict e2e tests to enable features that were disabled due to feature flag updates#29154

Merged
LeVinhGithub merged 25 commits into
mainfrom
harry/MMQA-1711
May 7, 2026
Merged

test: MMQA - 1711 - [Mobile] Update Predict e2e tests to enable features that were disabled due to feature flag updates#29154
LeVinhGithub merged 25 commits into
mainfrom
harry/MMQA-1711

Conversation

@LeVinhGithub
Copy link
Copy Markdown
Contributor

@LeVinhGithub LeVinhGithub commented Apr 22, 2026

Description

Brings Predict E2E test feature flag mocks into parity with production values.

Two remote feature flag overrides in predict smoke tests diverged from production after a feature flag registry sync (PR #28444). This PR aligns the mocks:

  • exploreSectionsOrder: Replaced the explicit section ordering arrays with {} in 4 predict smoke specs. On production this flag is empty; the app falls back to hardcoded defaults which produce the same layout. The Homepage component does not consume this flag at all — it only affects TrendingView/Explore, which these tests don't exercise.
  • predictLiveSports: Added 'nba' to the leagues list (now ['nfl', 'nba']) to match production. This causes NBA markets (Spurs vs. Pelicans) to render via PredictGameDetailsContent, which uses a different cash-out button test ID (predict-picks-cash-out-button-{positionId}). Updated the PredictDetailsPage page object with a new tapGameCashOutButton(positionId) method and updated predict-cash-out.spec.ts to use it.

Changelog

CHANGELOG entry: null

Related issues

Fixes: MMQA-1711

Manual testing steps

Feature: Predict E2E prod parity

Scenario: Cash out on NBA game market uses correct button

  • Given the predict smoke tests use production-parity feature flag mocks
  • When the predict-cash-out test runs against Spurs vs. Pelicans
  • Then the test taps the game-details cash-out button (PredictPickItem testID)
  • And the cash-out flow completes successfully

Scenario: Predict tests work without explicit exploreSectionsOrder

  • Given exploreSectionsOrder is set to {} in all predict smoke specs
  • When any predict smoke test runs (cash-out, open-position, geo-restriction, withdraw)
  • Then the Homepage renders with the default section order
  • And the test navigates to predictions by test ID without issue

Screenshots/Recordings

Before

N/A — test-only changes, no UI impact.

After

N/A — test-only changes, no UI impact.

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Test-only changes that adjust feature-flag mocks and E2E selectors; low product risk, but could affect Predict smoke test stability if testIDs/position IDs drift.

Overview
Aligns Predict E2E remote feature-flag mocks with current production defaults by removing the predictLiveSports override from remoteFeatureFlagPredictEnabled.

Updates Predict smoke specs to interact with the game-details UI: adds a shared SPURS_PELICANS_POSITION_ID, introduces PredictDetailsPage.tapGameCashOutButton(positionId) and tapGameBetYesButton(), and switches cash-out/position-opening tests to use the new testIDs for NBA/game markets.

Reviewed by Cursor Bugbot for commit f452736. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-qa QA team label Apr 22, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.88%. Comparing base (8437791) to head (c7adb61).
⚠️ Report is 70 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29154      +/-   ##
==========================================
+ Coverage   81.86%   81.88%   +0.01%     
==========================================
  Files        5255     5271      +16     
  Lines      138980   139465     +485     
  Branches    31518    31688     +170     
==========================================
+ Hits       113774   114198     +424     
- Misses      17465    17511      +46     
- Partials     7741     7756      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@LeVinhGithub LeVinhGithub changed the title test: init test: MMQA - 1711 - [Mobile] Update Predict e2e tests to enable features that were disabled due to feature flag updates Apr 23, 2026
@LeVinhGithub LeVinhGithub marked this pull request as ready for review April 23, 2026 10:27
@LeVinhGithub LeVinhGithub requested review from a team as code owners April 23, 2026 10:27
@github-actions github-actions Bot added the risk:high AI analysis: high risk label Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

AI PR Analysis

🚫 Merge safe: false | 🟠 Risk: high

Merge decision: AI analysis did not complete — manual review required before merging.

AI analysis did not complete. Manual review recommended.

View run

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c564cee. Configure here.

Comment thread tests/smoke/predict/predict-geo-restriction.spec.ts
Copy link
Copy Markdown
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LeVinhGithub the PR looks good, but there are failing tests. can you have a look when you get a chance ?

@LeVinhGithub LeVinhGithub requested a review from cortisiko May 5, 2026 14:10
@LeVinhGithub LeVinhGithub self-assigned this May 5, 2026
@LeVinhGithub LeVinhGithub enabled auto-merge May 6, 2026 07:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePredictions, SmokeWalletPlatform, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 6 changed files are exclusively within the E2E test infrastructure (tests/ directory) — no app source code was modified. The changes focus on:

  1. feature-flags-mocks.ts: Removed the predictLiveSports feature flag exclusion that was previously blocking NBA markets from E2E tests. This enables sports game markets (like NBA) to be tested.

  2. polymarket-constants.ts: Added SPURS_PELICANS_POSITION_ID constant for a specific Polymarket position ID used in the Spurs vs. Pelicans game test scenario.

  3. PredictDetailsPage.ts: Extended the page object with new methods to support game-type prediction markets: gameBetYesButton, getGameCashOutButton(positionId), tapGameCashOutButton(positionId), and tapGameBetYesButton(). These use new test IDs from PredictGameDetailsFooter, PredictActionButtons, PredictBetButtons, and PredictPickItem components.

  4. predict-cash-out.spec.ts: Updated to use tapGameCashOutButton(SPURS_PELICANS_POSITION_ID) instead of the generic tapCashOutButton(), supporting the game-specific cash-out flow.

  5. predict-geo-restriction.spec.ts: Same cash-out button update plus added analytics helpers for geo-blocked cashout expectations.

  6. predict-open-position.spec.ts: Updated to use tapGameBetYesButton() instead of tapOpenPositionValue(), and removed assertions about position tab visibility that no longer apply to the game market flow.

Tag selection rationale:

  • SmokePredictions: Directly required — all 3 predict smoke test specs are modified and need validation.
  • SmokeWalletPlatform: Required per SmokePredictions tag description: "Predictions is also a section inside the Trending tab (SmokeWalletPlatform); changes to Predictions views affect Trending. When selecting SmokePredictions, also select SmokeWalletPlatform."
  • SmokeConfirmations: Required per SmokePredictions tag description: "opening/closing positions are on-chain transactions. When selecting SmokePredictions, also select SmokeConfirmations."

Performance Test Selection:
All changes are exclusively within the E2E test infrastructure (tests/ directory). No app source code, components, controllers, or performance-sensitive code was modified. There is no performance impact from these changes.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

@LeVinhGithub LeVinhGithub added this pull request to the merge queue May 7, 2026
Merged via the queue into main with commit 7a4f526 May 7, 2026
174 of 178 checks passed
@LeVinhGithub LeVinhGithub deleted the harry/MMQA-1711 branch May 7, 2026 09:51
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.77.0 Issue or pull request that will be included in release 7.77.0 label May 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.77.0 Issue or pull request that will be included in release 7.77.0 risk:high AI analysis: high risk size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants