Skip to content

test(e2e): add 12 compliance path E2E scenarios#2987

Draft
LucasCharrier wants to merge 1 commit intofeat/conformite-parcoursfrom
feat/compliance-e2e
Draft

test(e2e): add 12 compliance path E2E scenarios#2987
LucasCharrier wants to merge 1 commit intofeat/conformite-parcoursfrom
feat/compliance-e2e

Conversation

@LucasCharrier
Copy link
Contributor

Summary

  • 12 parcours E2E couvrant tout le flux de conformité (serial mode)
  • Helper setupComplianceState() pour seeder l'état DB par scénario via beforeAll
  • Fixture dummy.pdf minimal pour les tests d'upload
  • Fix global-setup.ts : reset des catégories salariales initiales + hasCse=true pour les tests de déclaration
  • Fix declaration.e2e.ts : déplacement du test "previous button" avant le submit

Dépend de

#2986 — feat(compliance): implement full compliance path flow

Parcours couverts

Path Scénario
1 Pas d'écart + CSE → /avis-cse
2 Pas d'écart + sans CSE → /confirmation
3 Écart + justify + CSE → /avis-cse
4 Écart + joint_evaluation + CSE → /avis-cse
5 Écart + joint_evaluation + sans CSE → /confirmation
6 Corrective action + pas d'écart correction + CSE → /avis-cse
7 Corrective action + pas d'écart correction + sans CSE → /confirmation
8 Corrective action + écart correction → 2e tour visible
9 2e tour + justify → /avis-cse
10 2e tour + joint_evaluation + CSE → /avis-cse
11 2e tour + joint_evaluation + sans CSE → /confirmation
12 complianceCompletedAt défini → redirection immédiate

Test plan

  • pnpm test:e2e passe en entier (nécessite pnpm dev sur port 3000)
  • Vérifier que declaration.e2e.ts ne régresse pas

- Add compliance.e2e.ts covering all 12 compliance flow paths
- Add helpers/compliance.ts for DB seeding per scenario
- Add fixtures/dummy.pdf for upload tests
- Fix global-setup.ts to reset compliance state and initial employee categories
- Fix declaration.e2e.ts test ordering (previous button before submit)
@revu-bot revu-bot bot requested a review from revu-bot March 12, 2026 17:11
Copy link
Collaborator

@revu-bot revu-bot left a comment

Choose a reason for hiding this comment

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

An internal error occurred. Please check the logs for details.

Revu logs

@LucasCharrier LucasCharrier marked this pull request as draft March 12, 2026 17:12
@tokenbureau
Copy link

tokenbureau bot commented Mar 12, 2026

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.

2 participants