Failure messages
A failure lists what was on the map, why it did not match, and attaches an annotated screenshot.
expect(map).toHaveFeature({"layer":"alerts","where":{"severity":"critical"}})Expected: at least one visible feature matching, within 7000msReceived: 0 match(es)What is on the map: view: {"center":{"lng":34.78,"lat":32.08},"zoom":12, ...} layer "alerts": 3 feature(s) rendered in viewport - alerts#3 {"id":3,"name":"Noise complaint","severity":"low"} @(363.5,428.7) - alerts#2 {"id":2,"name":"Road closure","severity":"medium"} @(538.3,256.9) - alerts#1 {"id":1,"name":"Gas leak","severity":"high"} @(421.8,325.6) "severity" wanted "critical"; rendered values: "low", "medium", "high"A failure also attaches map screenshot — <call>: the map with every candidate pixel drawn on it (green clickable, red under another feature, orange under DOM, grey not on the feature, blue the asked location). Every successful action attaches pixel — <call>: which pixel it used and what it skipped first. { failureScreenshots: false } turns the screenshot off.
It also distinguishes: layer does not exist · layer hidden (visibility "none", or the zoom outside its minzoom–maxzoom) · feature exists in the source but is off-screen · occluded (names the occluder) · ambiguous (lists the matches). The same text is attached to the HTML report / trace as map state — ….