Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
17 changes: 17 additions & 0 deletions tests/api-mocking/mock-responses/defaults/polymarket-apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ export const POLYMARKET_API_MOCKS = {
responseCode: 200,
response: { events: [] },
},
{
urlEndpoint: /^https:\/\/gamma-api\.polymarket\.com\/events\/\d+(\?.*)?$/,
responseCode: 200,
response: {
id: '1',
slug: 'mock-prediction-event',
title: 'Mock prediction event',
description: 'E2E mock event',
icon: 'https://polymarket.com/icon.png',
closed: false,
series: [],
markets: [],
tags: [],
liquidity: 0,
volume: 0,
},
},
Comment thread
cortisiko marked this conversation as resolved.
// gamma-api: markets list
{
urlEndpoint: /^https:\/\/gamma-api\.polymarket\.com\/markets(\?.*)?$/,
Expand Down
5 changes: 3 additions & 2 deletions tests/api-mocking/mock-responses/trending-api-mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ export const TRENDING_API_MOCKS: MockEventsObject = {
{
// Event details fetched when user taps a prediction row in the trending feed.
// Returns the same Bitcoin event payload as /events/pagination so the detail
// screen renders without crashing.
urlEndpoint: /https:\/\/gamma-api\.polymarket\.com\/events\/1(\?.*)?$/,
// screen renders without crashing. Matches any numeric event id (highlights,
// prefetch) — not only id "1".
urlEndpoint: /https:\/\/gamma-api\.polymarket\.com\/events\/\d+(\?.*)?$/,
responseCode: 200,
response: {
id: '1',
Expand Down
Loading