Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

240
Visualizações
How to run 2 different beforeEach() for 2 different folder separately in cypress

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 runenter image description here them accordingly as in the screenshot. Please advise how can I manage the file configuration.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda