-
Notifications
You must be signed in to change notification settings - Fork 56
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
[FEATURE] ajoute le fitre lacune dans la route /assessment-results
(pix-16350)
#11392
[FEATURE] ajoute le fitre lacune dans la route /assessment-results
(pix-16350)
#11392
Conversation
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
7b2b79f
to
cdfb648
Compare
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.
Tech Ok 👍 , rien de bien bloquant en commentaires
@@ -32,7 +32,8 @@ function _getParticipantsResultList(campaignId, stageCollection, filters) { | |||
.with('campaign_participation_summaries', (qb) => _getParticipations(qb, campaignId, stageCollection, filters)) | |||
.select('*') | |||
.from('campaign_participation_summaries') | |||
.modify(_filterByBadgeAcquisitionsOut, filters) | |||
.modify(_filterByacquiredBadges, filters) |
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.
.modify(_filterByacquiredBadges, filters) | |
.modify(_filterByAcquiredBadges, filters) |
...aign/infrastructure/repositories/campaign-assessment-participation-result-list-repository.js
Outdated
Show resolved
Hide resolved
...infrastructure/repositories/campaign-assessment-participation-result-list-repository_test.js
Outdated
Show resolved
Hide resolved
...infrastructure/repositories/campaign-assessment-participation-result-list-repository_test.js
Outdated
Show resolved
Hide resolved
const participantExternalIds = participations.map((result) => result.participantExternalId); | ||
|
||
// then | ||
expect(participantExternalIds).to.exactlyContain([]); |
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 participantExternalIds = participations.map((result) => result.participantExternalId); | |
// then | |
expect(participantExternalIds).to.exactlyContain([]); | |
// then | |
expect(participations).to.be.empty |
// when | ||
const { participations } = await campaignAssessmentParticipationResultListRepository.findPaginatedByCampaignId({ | ||
campaignId: campaign.id, | ||
filters: { badges: [badge1.id], unacquiredBadges: [badge1.id] }, |
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.
suggestion : Si je me réfère au 'it' c'est unacquiredBadges: [badge2.id]
ou alors je comprends pas le test 🤔
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.
l'intitulé du it
n'est pas bon. Le but est d'expliciter le cas ou l'on passe le même id dans badges/unacquiredBadges
@@ -64,4 +64,52 @@ describe('Unit | Application | Controller | Campaign Results', function () { | |||
expect(errorCatched).to.be.instanceof(UserNotAuthorizedToAccessEntityError); | |||
}); | |||
}); | |||
|
|||
describe('#findAssessmentParticipationResults', function () { |
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.
nitpick : A sortir de ce commit ?
Func OK : on a bien les deux participations avec un tableau vide chacun pour les data des badges 🦦 |
); | ||
} | ||
} | ||
|
||
export { |
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.
suggestion : pour rendre l'erreur plus explicite (parce qu'en soi, c'est possible de filtrer à la fois sur acquired et unacquired, juste pas avec le même id), préciser "Filtering on both acquired and unacquired for the same badge is impossible"
afb19b3
to
375a8df
Compare
375a8df
to
96318d9
Compare
🥞 Problème
Dans le cadre de l'amélioration de la page résultat, on aimerait permettre de filtrer les participations qui n'ont pas obtenu un certain badge
🥓 Proposition
Ajouter un filtre supplémentaire
unacquiredBadges
pour filter les participations qui n'ont pas acquis un badge🧃 Remarques
😋 Pour tester
faire un curl
et valider qu'on a bien les 2 participations sans badge