Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: mock api entreprise + fix delay type #5512

Closed
wants to merge 1 commit into from

Conversation

Viczei
Copy link
Contributor

@Viczei Viczei commented Dec 21, 2023

fix #5513

@Viczei Viczei requested review from m-maillot and maxgfr December 21, 2023 14:27
@Viczei Viczei self-assigned this Dec 21, 2023
Copy link

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link
Member

@maxgfr maxgfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incroyable les mocks, c'est coool

Est-ce que ça fonctionne quand même sans le delay ?

Car en soit, si le delay: 0 règle tout, je suis pas sûr que ça vaille le coup de mocker.... car en soit on perd de la logique de validation (même si c'est pas notre code)

Comment on lines +6 to +13
Cypress.Commands.overwrite(
"type",
(originalFn, subject, text, options = {}) => {
options.delay = 0;
//@ts-ignore
return originalFn(subject, text, options);
}
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je suis pas trop chaud d'override la logique par défaut

url: "https://code-du-travail-numerique-preprod.dev.fabrique.social.gouv.fr/api/enterprises?q=CARREFOUR%20BANQUE*",
},
mockCarrefourBanque
).as("getEnterpriseCarrefourBanque");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça sert à quoi le as d'ailleurs, je suis pas sûr qu'on en ait besoin

@Viczei Viczei closed this Jan 18, 2024
@carolineBda carolineBda deleted the fix-cypress-api-entreprise branch September 17, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faire passer les tests e2e sur la recherche entreprise
2 participants