-
Notifications
You must be signed in to change notification settings - Fork 21
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(e2e): test la validité de l'html de toutes les pages contributions et convention-collectives #5686
Conversation
…ns et convention-collectives
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. |
@@ -10,13 +11,17 @@ module.exports = defineConfig({ | |||
baseUrl: process.env.TEST_BASEURL ?? "http://localhost:3000", | |||
specPattern: process.env.ALL_TEST | |||
? "cypress/integration/**/*.spec.{js,jsx,ts,tsx}" | |||
: "cypress/integration/light/*.spec.{js,jsx,ts,tsx}", | |||
: "cypress/integration/heavy/validate-html.spec.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | ||
}); | ||
|
||
const FILE_SIZE = Math.floor(urlsContributions.length / 2) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je créé 2 fichiers avec chacun la moitié des urls pour les runner dans 2 tests séparés sinon c'est vraiment trop long
@@ -0,0 +1 @@ | |||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je mis des fichiers vides juste pour que les spec compilent : https://github.com/SocialGouv/code-du-travail-numerique/pull/5686/files#diff-badd624695551201f1f0a4378401ea7a81af085fe3009e4d61d8c20b4f8ddfa1R3
const urls: string[] = ["/convention-collective", "/contribution"]; | ||
|
||
const response = await fetch( | ||
"https://code-du-travail-numerique-preprod.ovh.fabrique.social.gouv.fr/api/plan-du-site" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ici si je mets ${SITE_URL}/api/plan-du-site
j'ai une erreur parce que cette variable n'est pas rensigné
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essaye : process.env.TEST_BASEURL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai cette erreur sur process
:
TS2591: Cannot find name process. Do you need to install type definitions for node? Try npm i --save-dev @types/node and then add node to the types field in your tsconfig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Top ! On teste bien tout
Si on peut créer l'échantillon gratuit sur la partie light
console.log( | ||
"Urls à valider sauvegardées dans le fichier ./cypress/support/urls-to-validate.json" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
à clean
console.log( | ||
`Urls des contributions à valider sauvegardées dans les fichier "./cypress/support/urls-contributions-to-validate-1.json" et "./cypress/support/urls-contributions-to-validate-2.json"` | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ici aussi
const urls: string[] = ["/convention-collective", "/contribution"]; | ||
|
||
const response = await fetch( | ||
"https://code-du-travail-numerique-preprod.ovh.fabrique.social.gouv.fr/api/plan-du-site" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Essaye : process.env.TEST_BASEURL
🎉 Deployment for commit d7fa391 : IngressesDocker images
|
Fix #5955
Voici un run de la suite heavy :
https://github.com/SocialGouv/code-du-travail-numerique/actions/runs/9659634198/job/26643852561?pr=5686