[TECH] Sortir la logique métier du usecase start-writing-campaign-assessments-results-to-stream.js (PIX-15822) #10890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🎄 Problème
Le usecase d'export en CSV des résultats de campagne type "assessment" fait trop de choses et ne respecte pas les principes de la Clean Architecture.
🎁 Proposition
Se baser sur la même génération que le usecase
start-writing-campaign-profiles-collection-results-to-stream.js
.Création d'un serializer CSV
CampaignAssessmentExport
, il prendra en charge :TODO :
Finir de tester la génération des différents headers.
Tester et Implémenter le parsing des lignes de participations en utilisant dans
CampaignAssessmentExport
le builder exportCampaignAssessmentResultLine
.Supprimer le test unitaire
start-writing-campaign-profiles-collection-results-to-stream_test.js
, le remplacer par un test d'intégration.Utiliser
CampaignAssessmentExport
dans le usecase et supprimer le code qui ne sert plusVérifier que les tests sont toujours vert.
🧦 Remarques
RAS
🎅 Pour tester
Exporter des résultats d'une campagne assessment et vérifier que ça fonctionne.