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

188
Visualizações
Test file re-running in Cypress framework

I have several feature files in a Cypress test framework.

Here is the final step in Test File 2:

Then('I store that Order ID in a JSON file', () => {
    cy.get('.dx-font-l').then(orderId => {
        cy.writeFile("cypress/fixtures/purchase.json", {
            orderId: orderId.text()
        });
    })
});

And here is the first step definition in Test File 3 (the next feature file executed):

Given('I navigate to the store website', () => {
    cy.visit(Cypress.env('storeUrl'));
});

As-is:

  • When Test File 2 above completes, Test File 3 begins to load, but then another test file that I ran at the beginning is re-run rather than Test File 3.

If, I remove the below code from Test File 2, all 3 files pass as expected.

cy.get('.dx-font-l').then(orderId => {
    cy.writeFile("cypress/fixtures/purchase.json", {
        orderId: orderId.text()
    });
})

Can someone please tell me why this block of code is causing this behavior? I expect that it shouldn't.

about 4 years ago · Juan Pablo Isaza
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