guys. I have 2 folders under the Integration folder (API & UI - where I keep my API and UI spec.js - test case) and also have index.js (under support) where I keep my beforeEach().
Currently, when I run any test case from API or UI both beforeEach() runs in 1 time. But I want to run
them accordingly as in the screenshot. Please advise how can I manage the file configuration.
What a purpose of save beforeEach() block into the /support/index.js ? As I understand correct behavior for tests based on cypress - you can put beforeEach() into your spec file and the code in will run before each scenario in spec file.
Copy the beforeEach() and put into your spec files.
Here the example of cypress developers: https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/testing-dom__select2/cypress/integration/spec.js