Skip to content

"beforeEach" hook failure #18

Open
@munderseth

Description

When a Suite uses the before/beforeEach and after/afterEach and the hook fails any remaining tests are skipped.

Using the following example:

describe('TEST1', () => {
  before(()=> {
    cy.visit('/hmm');
  });
  it('case1', () => { });
  it('case2', () => { });
  it('case3', () => { });
});

The correct test counts:

  • tests: 3
  • failures: 1
  • skipped: 2

The reporter counts:

  • tests: 1
  • failures: 1
  • skipped: 0

Also, the screenshot png file name is mangled for the failure: TEST1 -- case1 -- before all hook (failed).png. But the test name provided to the reporter is: TEST1 "before all" hook for "case1".

There is a test "placeholder" - test.desc-fixture-hook-failure.js

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions