assert_chaos_handled
Injects a chaos HTTP error into matching requests and returns a verdict: whether the app shows a fallback UI without unhandled exceptions. Use to verify app resilience to network failures.
Instructions
Injects a chaos HTTP status into all matching requests, then returns a structured verdict: did the app show a fallback UI, were there unhandled JS exceptions, and did it survive? Use to answer: is the app chaos-resilient — does it show a recovery UI without throwing exceptions?
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the page to test | |
| wait_ms | No | Milliseconds to wait after navigation before evaluating verdict (default: 2000) | |
| viewport | No | Viewport size (default: 1280×720) | |
| http_status | No | HTTP error status to return for all matching requests (default: 500) | |
| intercept_pattern | Yes | Glob pattern for requests to fail (e.g., '**/api/**') | |
| expected_fallback_selector | No | CSS selector for the fallback/error UI expected to appear (e.g., '.error-boundary'). chaos_survived is true only when this is found AND there are no unhandled exceptions. |