New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cy:xhr logs show "undefined" in Cypress 13 #209
Labels
bug
Something isn't working
Comments
They probably made some breaking change. Contribution is welcome. |
Working on a PR for this, the logs are under an extra key "props" so I think this will be a breaking change for Cypress 13: {
"displayName": "xhr",
"name": "request",
"type": "parent",
"event": true,
"url": "https://createiq.local/api/v1/user/context",
"method": "GET",
"timeout": 0,
"message": "[data-qa=\"email\"]",
"id": "log-https://createiq.local-199",
"state": "passed",
"instrument": "command",
"hookId": "r3",
"testId": "r3",
"testCurrentRetry": 0,
"viewportWidth": 1366,
"viewportHeight": 768,
"wallClockStartedAt": "2023-09-07T10:23:09.340Z",
"createdAtTimestamp": 1694082189340.3,
"updatedAtTimestamp": 1694082192165.5,
"group": "log-https://createiq.local-23",
"groupLevel": 3,
"chainerId": "ch-https://createiq.local-77",
"ended": true,
"snapshot": false,
"consoleProps": {
"name": "request",
"type": "event",
"props": {
"Resource Type": "xhr",
"Method": "GET",
"URL": "https://createiq.local/api/v1/user/context",
"Request went to origin?": "yes",
"Request Headers": {
"sec-ch-ua": "\"Chromium\";v=\"116\", \"Not)A;Brand\";v=\"24\", \"Google Chrome\";v=\"116\"",
"Accept": "application/json, text/plain, */*",
"Referer": "https://createiq.local/redesign/active",
"sec-ch-ua-mobile": "?0",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
"sec-ch-ua-platform": "\"macOS\""
},
"Response Status Code": 401,
"Response Headers": {
"date": "Thu, 07 Sep 2023 10:23:06 GMT",
"x-content-type-options": "nosniff",
"x-permitted-cross-domain-policies": "master-only",
"Transfer-Encoding": "chunked",
"Connection": "keep-alive",
"x-xss-protection": "1; mode=block",
"x-request-id": "018a6f2ac7f298acd32fbd5b65d1d632",
"pragma": "no-cache",
"referrer-policy": "strict-origin-when-cross-origin",
"server": "nginx",
"Vary": "Origin, Accept-Encoding",
"content-type": "application/json",
"cache-control": "no-cache, no-store, must-revalidate, max-age=0, s-maxage=0",
"permissions-policy": "camera=(), microphone=(), geolocation=(), browsing-topics=()",
"Keep-Alive": "timeout=5",
"expires": "0"
}
}
},
"renderProps": {
"indicator": "bad",
"message": "GET 401 /api/v1/user/context",
"wentToOrigin": true,
"interceptions": []
}
} |
matmannion
added a commit
to matmannion/cypress-terminal-report
that referenced
this issue
Sep 7, 2023
I wonder if we use consoleProps in other commands logs as well. |
I had a look through but couldn't see any usage outside of XHR and fetch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Behaviour with Cypress 12, XHR logs show only failed requests:
Behaviour with Cypress 13:
Setup:
The text was updated successfully, but these errors were encountered: