Skip to content

Commit

Permalink
Cypress: Retry mechanism for e2e tests (#3536)
Browse files Browse the repository at this point in the history
* Cypress: Retry mechanism for e2e testing

* force failure on application.cy.ts

* retries=2 (which means 3 tries)

* fix application.cy.ts test

* lint fixes

* fix it Typescripter way

* Update frontend/src/__tests__/cypress/cypress.config.ts

Co-authored-by: Christian Vogt <[email protected]>

---------

Co-authored-by: Christian Vogt <[email protected]>
  • Loading branch information
FedeAlonso and christianvogt authored Dec 3, 2024
1 parent 6a6600c commit e4bac88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/__tests__/cypress/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ export default defineConfig({
await mergeFiles(outputFile, inputFiles);
});

return config;
// Apply retries only for tests in the "e2e" folder
return {
...config,
retries: !env.CY_MOCK && !env.CY_RECORD ? 2 : config.retries,
};
},
},
});

0 comments on commit e4bac88

Please sign in to comment.