When a test fails in the "it" function the afterEach function is no longer able to type.
type should always function regardless of failures in test
https://github.com/Tarig0/cypress-test-tiny
This is very weird. Can confirm. The afterEach test code does run, yet the .type() functionality specifically does not appear to be working. The .type() only does not work if the test fails.
My example - to prove it was not some weird issue with google site -
context('Actions', () => {
beforeEach(() => {
cy.visit('http://example.cypress.io/commands/actions')
})
afterEach(() => {
cy.get('.action-email').clear()
.type('[email protected]').should('have.value', '[email protected]')
})
it('type into a DOM element', () => {
cy.get('.action-email').should('have.value', 'a')
}
})
Also, this error appears as if some subject has changed incorrectly.

Added another case to show that the element is being found and can be set by
.then(($el) => $el.val('speed'))
Having this problem with .click() as well, also only in an afterEach function when the previous test has failed.
I am also seeing this. .click() simply seems to stop working in afterEach if a test has failed.
This is kind of a showstopper, as it prevents cleanup after failing tests...
Going to close this in favor of #2831
Most helpful comment
Having this problem with
.click()as well, also only in an afterEach function when the previous test has failed.