test: adds mock for CLOB auth in prediction#29663
Conversation
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokePredictions is the primary tag — the test is directly re-enabled and the mock infrastructure supporting it is updated. SmokeWalletPlatform is required per SmokePredictions tag description: "When selecting SmokePredictions, also select SmokeWalletPlatform (Trending section)." SmokeConfirmations is required per SmokePredictions tag description: "also select SmokeConfirmations (opening/closing positions are on-chain transactions)." No app source code was changed, only test infrastructure. Risk is medium because re-enabling a previously skipped test introduces execution risk if the mock fix is incomplete, but the changes are well-scoped and targeted. Performance Test Selection: |
|



Description
This PR enables back the predict test that was skipped and adds mocking for the CLOB auth endpoint.
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensys.slack.com/archives/C02U025CVU4/p1777884336901849
Manual testing steps
N/A
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk because changes are limited to E2E mocking and a previously skipped smoke test; main risk is increased test flakiness if the new CLOB auth mocks don’t match real request shapes.
Overview
Re-enables the Predictions smoke test for opening a position by ensuring the Polymarket order-placement flow no longer attempts live calls to
clob.polymarket.com.Adds
POLYMARKET_CLOB_AUTH_MOCKSto mock both CLOB API-key creation (forced400) and the derive-key fallback (200), and wires it intoPOLYMARKET_COMPLETE_MOCKS. Also removes the explicitclob.polymarket.comhost entry from the E2E allowlist.Reviewed by Cursor Bugbot for commit 28ea80b. Bugbot is set up for automated code reviews on this repo. Configure here.