@@ -29,3 +29,32 @@ Feature: HTTP Errors
2929 And the event "response.headers.content-length" equals "37"
3030 # response.body is not reported for fetch requests
3131 # response.bodyLength is not reported for fetch requests
32+
33+ @skip
34+ Scenario : XML HTTP Request
35+ When I navigate to the test URL "/http_errors/xhr/index.html"
36+ And I wait to receive an error
37+ Then the error is a valid browser payload for the error reporting API
38+
39+ And I define "expected.context" as "GET <browser.hostname>"
40+ And I define "expected.exception.message" as "404: <browser.url>/reflect?status=404"
41+ And I define "expected.request.url" as "<browser.url>/reflect?status=404"
42+
43+ And the exception "errorClass" equals "HTTPError"
44+ And the error payload field "events.0.exceptions.0.message" equals the stored value "expected.exception.message"
45+ And the event "severity" equals "error"
46+ And the event "unhandled" is true
47+ And the event "severityReason.type" equals "httpError"
48+ And the error payload field "events.0.context" equals the stored value "expected.context"
49+
50+ And the error payload field "events.0.request.url" equals the stored value "expected.request.url"
51+ And the event "request.httpMethod" equals "GET"
52+ And the event "request.params.status" equals "404"
53+ And the event "request.body" equals ""
54+ And the event "request.bodyLength" equals 0
55+
56+ And the event "response.statusCode" equals 404
57+ And the event "response.headers.content-length" equals "37"
58+ And the event "response.body" equals ""
59+ And the event "response.bodyLength" equals 37
60+
0 commit comments