Commit 1e823d2
test(e2e): mock prices-history + tighten Polymarket defaults (MMQA-1800)
CI surfaced two pre-existing leaks the *.polymarket.com wildcard had
been masking. Both are fixed here so the wildcard removal can ship.
- POLYMARKET_COMPLETE_MOCKS: add prices-history mock returning
{ history: [] }. Predict happy-path specs (open-position, cash-out,
claim-positions, geo-restriction) were making live calls to
clob.polymarket.com/prices-history; the chart consumer in
PolymarketProvider treats a non-array history as empty so this
empty payload is safe.
- trending-api-mocks: add events/1 (rich Bitcoin event payload
matching the existing pagination response) and prices-history
(empty history). trending-feed.spec.ts taps prediction row 1, which
navigates to a detail screen that calls these endpoints; without
the mocks the detail screen renders empty and the wallet's React
tree throws.
- defaults/polymarket-apis: drop the events/{id} and
events?parent_event_id matchers. They were too aggressive — empty
payloads cause the wallet to crash in detail screens. Detail-level
calls should be covered by the spec's testSpecificMock, not by
generic defaults.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5c9abbe commit 1e823d2
3 files changed
Lines changed: 65 additions & 13 deletions
File tree
- tests/api-mocking/mock-responses
- defaults
- polymarket
Lines changed: 0 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 41 | | |
55 | 42 | | |
56 | 43 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
659 | 677 | | |
660 | 678 | | |
661 | 679 | | |
| |||
2184 | 2202 | | |
2185 | 2203 | | |
2186 | 2204 | | |
| 2205 | + | |
2187 | 2206 | | |
2188 | 2207 | | |
2189 | 2208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
164 | 210 | | |
165 | 211 | | |
166 | 212 | | |
| |||
0 commit comments