-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
A fail in the after each hook covers the fail in a test run #3918
Comments
Yes, this is a bug that we actually JUST encountered ourselves. The work is already in progress for fixing this. Thanks for opening an issue! |
Hi, Especially in combination with this issue it makes it a little painful to debug test cases: #2831 |
Hi Everyone. I am also experiencing this issue. Is there any update on this issue? Maybe a workaround? |
Have the same problem. IT was failed, then after each failed and then all other tests skipped, because fail was in after each block (in fact in test, not in after each) Will be cool, if anyone offer a workaround. |
Same here. my after block cleans up, but when it doesn't execute, it causes my next tests to fail because the browser wasn't cleaned up. PLZ halp :) |
Also experiencing this. How come it hasn't been prioritized yet? |
Also I'm facing same issue. |
It has been a while, do we know if this is going to be worked on yet? |
@bkucera any updates on this issue? |
This doesn't happen in all cases of failures, but the below example shows the Click fail in afterEach / it failure for visibilitydescribe('Tests', () => {
afterEach(() => {
// ❗️ does not exist, purposely fails
cy.get('.foo').click()
})
it('test', () => {
// ❗️ does not exist, purposely fails
cy.contains('it test').should('be.visible')
})
}) During
|
The problem is click actions do not work in the 'after' section when you have a failure in the 'it' section. So in your example, if you have a legit click action in the 'afterEach', with a good actionable element, does it work? |
yes, somewhat related but not the exact issue if the fact that |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
This still hasn't been addressed? This is making it nearly impossible for me to debug a CI-only issue. |
@pixelpax are you seeing this issue on the latest version of Cypress? |
Current behavior:
When a test case fails and the following after each hook also fails, only the error from the after each hook is printed in the cypress dashboard, but only the fail screenshot of the test case is included.
Example
This screenshot is attached to my failed test:
The same fail has the following console output, which is obviously incorrect:
Desired behavior:
When a test case fails and the following after all hook also fails, there should be fail messages, one for the test case and one for the after all hook. There should also be a screenshot for both fails attached.
Steps to reproduce:
Versions
The text was updated successfully, but these errors were encountered: