If there are lot of commands (or a meaningful change) in afterEach callback, the screenshot on failure produces an image that does not show the failure. For example
describe('something', () => {
afterEach(() => {
cy.visit('/else')
cy.wait(100)
cy.wait(100)
cy.wait(100)
cy.wait(100)
// more calls like this
})
it('works', () => {
cy.visit('/something')
cy.contains('does not exist')
})
})
In the above test I would like to see page "/something" during the failure cy.contains
but instead I see screenshot of /else and the command log might be scrolled way down
due to lots of cy.wait calls; hiding the red failure log.
It would be nice to have the screenshot taken right on failure, not at the end, despite #194 (which still applies)
If there are lot of commands (or a meaningful change) in
afterEachcallback, the screenshot on failure produces an image that does not show the failure. For exampleIn the above test I would like to see page "/something" during the failure
cy.containsbut instead I see screenshot of
/elseand the command log might be scrolled way downdue to lots of
cy.waitcalls; hiding the red failure log.It would be nice to have the screenshot taken right on failure, not at the end, despite #194 (which still applies)