Skip to content

Commit

Permalink
chore(e2e): do not always slow down cypress videos
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasduteil committed Mar 5, 2025
1 parent 210ae7b commit d5bd85f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cypress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ By default, the Docker Compose file is configured to launch enough test clients
To help support and the team better visualise the different ProConnect Identity paths, it is possible to film the paths via Cypress. The command to run is as follows:
```bash
CYPRESS_RECORD=true npx dotenvx run -- npx cypress run --headed --spec "cypress/e2e/join_and_moderation/index.cy.ts"
CYPRESS_RECORD=true CYPRESS_RECORD_FOR_HUMANS=true npx dotenvx run -- npx cypress run --headed --spec "cypress/e2e/join_and_moderation/index.cy.ts"
```
The videos are listed on the following documentation page: https://documentation.beta.numerique.gouv.fr/doc/videos-des-differents-parcours-A3UJiqFLZn
Expand Down
6 changes: 3 additions & 3 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import "cypress-maildev";

import "./commands";

const RECORD = Cypress.env("RECORD") === true;
const RECORD_FOR_HUMANS = Cypress.env("RECORD_FOR_HUMANS") === true;

if (RECORD) {
if (RECORD_FOR_HUMANS) {
["visit", "click", "trigger", "type", "clear", "reload", "select"].forEach(
(command) => {
Cypress.Commands.overwrite(
Expand All @@ -18,7 +18,7 @@ if (RECORD) {
() => {
resolve(origVal);
},
RECORD ? 2000 : 0,
RECORD_FOR_HUMANS ? 2000 : 0,
);
});
},
Expand Down

0 comments on commit d5bd85f

Please sign in to comment.