You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue when attempting to use filterLog to filter out logs based on severity. This is being used in addition to collectType. I have the Types being filtered, but within that I only want to collect and print logs with a Severity of either 'error' or 'warning'.
Here is the solution that I thought would work for this:
this yields the result of: (even though there is a 'cy:xhr' with a severity of 'warning' being generated)
This solution correctly filters out logs with the severity of 'error' but does not filter out the severity of 'warning' for a 'cy:xhr' type. The tests being run to simulate this are generating a 'cy:xhr' warning every time, and without the filters here is a snapshot of that output:
It looks like the severity on that 'cy:xhr' is set to 'warning', so I am not sure why it is not being filtered out in the above solution. Because I am interested in getting info on XHR requests that fail - I don't care about the one's that have a severity of 'success' as there is a LOT of them.
Do you see anything that I am doing incorrectly - or know what might be causing this to happen?
Thank you so much!!
The text was updated successfully, but these errors were encountered:
adamsjr8576
changed the title
filterLog not filtering out Severity of 'warning' for Type of 'cy:chr'
filterLog not filtering out Severity of 'warning' for Type of 'cy:xhr'
Mar 10, 2021
Hello Again!
I'm encountering an issue when attempting to use filterLog to filter out logs based on severity. This is being used in addition to collectType. I have the Types being filtered, but within that I only want to collect and print logs with a Severity of either 'error' or 'warning'.
Here is the solution that I thought would work for this:
this yields the result of: (even though there is a 'cy:xhr' with a severity of 'warning' being generated)
This solution correctly filters out logs with the severity of 'error' but does not filter out the severity of 'warning' for a 'cy:xhr' type. The tests being run to simulate this are generating a 'cy:xhr' warning every time, and without the filters here is a snapshot of that output:
It looks like the severity on that 'cy:xhr' is set to 'warning', so I am not sure why it is not being filtered out in the above solution. Because I am interested in getting info on XHR requests that fail - I don't care about the one's that have a severity of 'success' as there is a LOT of them.
Do you see anything that I am doing incorrectly - or know what might be causing this to happen?
Thank you so much!!
The text was updated successfully, but these errors were encountered: