#4999 - Listing des actions à effectué pour les bilans - Ne pas inclure les bilans créés il y a moins de 2 jours#5202
Hidden character warning
Conversation
|
📌 Deploy a review app for this PR: ➡️ Click here to deploy review app When clicking the link above:
|
Signed-off-by: Benjamin Bohec <bbohec.pro@gmail.com>
9e4a740 to
e33eec7
Compare
| uow = createInMemoryUow(); | ||
| timeGateway = new CustomTimeGateway(now); | ||
| const uowPerformer = new InMemoryUowPerformer(uow); | ||
| useCase = makeGetConventionsWithUnfinalizedAssessment({ |
There was a problem hiding this comment.
| useCase = makeGetConventionsWithUnfinalizedAssessment({ | |
| getConventionsWithUnfinalizedAssessment = makeGetConventionsWithUnfinalizedAssessment({ |
Au vu du refacto, même si c'est long je suis partisant du nommage des useCase
| it("passes pagination produced by getPaginationParamsForWeb", async () => { | ||
| const currentUser = new ConnectedUserBuilder() | ||
| .withId(agencyUserId) | ||
| it("throws when user have not the right agency role", async () => { |
There was a problem hiding this comment.
| it("throws when user have not the right agency role", async () => { | |
| it("throws when user does not have the right agency role", async () => { |
| isNotifiedByEmail: true, | ||
| }, | ||
| ]) | ||
| it("throws when user have no agency rights", async () => { |
There was a problem hiding this comment.
| it("throws when user have no agency rights", async () => { | |
| it("throws when user has no agency rights", async () => { |
| currentUserWithToReviewAgencyRight, | ||
| ), | ||
| errors.agencies.noAgencyRights(currentUserWithToReviewAgencyRight.id), | ||
| ); |
There was a problem hiding this comment.
Plusieurs tests supprimés dans ce refacto
à mon gout il faudrait à minima garder les tests sur la pagination, et aussi un test avec 2 agences = droits pour vérifier que les conventions de toutes les agences sont bien récupérées
| @@ -79,66 +78,7 @@ describe("GetConventionsForAgencyUser", () => { | |||
| uow.conventionRepository.setConventions(conventions); | |||
| }); | |||
|
|
|||
There was a problem hiding this comment.
Pourquoi supprimer ces tests ? Le use case n'a pas été touché
| expectToEqual(result.data, []); | ||
| }); | ||
|
|
||
| it("include assessments created juste before two days ago", async () => { |
There was a problem hiding this comment.
| it("include assessments created juste before two days ago", async () => { | |
| it("include assessments created just before two days ago", async () => { |
| @@ -403,25 +403,6 @@ describe("authenticatedConventionRoutes", () => { | |||
| }, | |||
| }, | |||
| }); | |||
There was a problem hiding this comment.
idem à mes commentaires plus bas, je ne comprends pas le retrait de la pagination et des tests
Checklist avant RfR
État de la PR
#ID_ISSUE - Message clair et en français, compréhensible par quelqu'un du métier/document-issue)Revue du code (self-review)
console.log,TODOou code de debug restantPoints d'attention pour le reviewer