Skip to content

Click and type events in after or afterEach hook don't work if one test fails #2831

@StanFisher

Description

@StanFisher

Current behavior:

Any click event in the after block fails if one of the tests in an it block fails.

Desired behavior:

Click events in the after block should succeed even if there are tests that fail.

Steps to reproduce:

I forked the cypress-tiny-test repository and set up a reproducible example in the latest commit.
https://github.com/StanFisher/cypress-test-tiny

Here's the commit containing the failing after block.
https://github.com/StanFisher/cypress-test-tiny/commit/c185242f3fdd30715d16fc44e393e092c30c4d58

Notice that if the failing test is changed to succeed, then the two click events in the after block succeed.

Versions

Cypress 3.1.2
macOS Mojave 10.14.1
Chrome 70.0.3538.102

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.prevent-stalemark an issue so it is ignored by stale[bot]topic: hooks ↪type: bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Generally Available

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions