Skip to content

Commit 42b2b55

Browse files
test(e2e): bump EVENT_DETAILS priority + mock /prices in trending (MMQA-1800)
Two more endpoints surfaced on the previous CI run: - POLYMARKET_EVENT_DETAILS_MOCKS lacked an explicit priority. Tied at default priority with the proxy fallback handler in MockServerE2E, the wildcard *.polymarket.com allowlist had been hiding cases where the fallback won. Bump to PRIORITY.BASE so events/{id} interception is reliable. Fixes events/60362 (predict-claim-positions) and events/79682 (predict-open-position). - trending-api-mocks: add a POST /clob.polymarket.com/prices mock returning {} so the prediction detail render in trending-feed.spec doesn't leak. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1e823d2 commit 42b2b55

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

tests/api-mocking/mock-responses/polymarket/polymarket-mocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export const POLYMARKET_EVENT_DETAILS_MOCKS = async (mockServer: Mockttp) => {
213213
const url = new URL(request.url).searchParams.get('url');
214214
return Boolean(url?.includes('gamma-api.polymarket.com/events/'));
215215
})
216+
.asPriority(PRIORITY.BASE)
216217
.thenCallback((request) => {
217218
const url = new URL(request.url).searchParams.get('url');
218219
const eventIdMatch = url?.match(/\/events\/([0-9]+)$/);

tests/api-mocking/mock-responses/trending-api-mocks.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,5 +303,13 @@ export const TRENDING_API_MOCKS: MockEventsObject = {
303303
},
304304
priority: 1000,
305305
},
306+
{
307+
// CLOB prices fetched on prediction detail render. Empty object is
308+
// safe for trending-feed which only renders the prediction row.
309+
urlEndpoint: /https:\/\/clob\.polymarket\.com\/prices.*/,
310+
responseCode: 200,
311+
response: {},
312+
priority: 1000,
313+
},
306314
],
307315
};

0 commit comments

Comments
 (0)