-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
stage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scopetype: bug
Description
Current behavior:
As one of cycpress-cucumber-preprocessor plugin users found out:
badeball/cypress-cucumber-preprocessor#139
the beforeEach defined in one file runs for every test.
Having one file:
beforeEach(() => {
cy.log("This should run only before the first one");
});
describe("abcd", () => {
it("dfsdfs", () => {});
});and another:
beforeEach(() => {
cy.log("This should run only before the second one");
});
describe("abc", () => {
it("dfsdf", () => {});
});I would expect them to stick to their unique beforeEaches, and that's how it works when running them separately, and when running them together using cypress run. With cypress open and the "run all specs" function - they both run both beforeEaches.
Desired behavior:
Consistency between runing specs separately and all together.
Steps to reproduce: (app code and test code)
reproduction here: https://github.com/TheBrainFamily/cypress-cucumber-example/tree/beforeEach
Versions
as in the repro - I used macos
benpolinsky, xeger, geoffreyhale, mzambrini, kbakk and 5 morexeger
Metadata
Metadata
Assignees
Labels
stage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scopetype: bug