Skip to content

Commit

Permalink
Update giver and last editor to User entity and update failing ITs an…
Browse files Browse the repository at this point in the history
…d test data (partial)
  • Loading branch information
domlimm committed Feb 24, 2024
1 parent 1dc7c7a commit 1105467
Show file tree
Hide file tree
Showing 17 changed files with 402 additions and 107 deletions.
5 changes: 3 additions & 2 deletions src/it/java/teammates/it/sqllogic/core/DataBundleLogicIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ public void testCreateDataBundle_typicalValues_createdCorrectly() throws Excepti

______TS("verify feedback response comments deserialized correctly");
FeedbackResponseComment actualComment1 = dataBundle.feedbackResponseComments.get("comment1ToResponse1ForQ1");
FeedbackResponseComment expectedComment1 = new FeedbackResponseComment(expectedResponse1, "[email protected]",
Instructor expectedInstructor = dataBundle.instructors.get("instructor1OfTypicalCourse");
FeedbackResponseComment expectedComment1 = new FeedbackResponseComment(expectedResponse1, expectedInstructor,
FeedbackParticipantType.INSTRUCTORS, expectedSection, expectedSection,
"Instructor 1 comment to student 1 self feedback", false, false,
new ArrayList<FeedbackParticipantType>(), new ArrayList<FeedbackParticipantType>(), "[email protected]");
new ArrayList<FeedbackParticipantType>(), new ArrayList<FeedbackParticipantType>(), expectedInstructor);
expectedComment1.setId(actualComment1.getId());
verifyEquals(expectedComment1, actualComment1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected void testExecute() throws Exception {
FeedbackResponseComment comment =
logic.getFeedbackResponseCommentForResponseFromParticipant(fr.getId());
assertEquals(comment.getCommentText(), "Student submission comment");
assertEquals(student.getEmail(), comment.getGiver());
assertEquals(student.getEmail(), comment.getGiver().getEmail());
assertTrue(comment.getIsCommentFromFeedbackParticipant());
assertTrue(comment.getIsVisibilityFollowingFeedbackQuestion());
assertEquals(FeedbackParticipantType.STUDENTS, comment.getGiverType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected void testExecute() throws Exception {

FeedbackResponseComment actualFrc = logic.getFeedbackResponseComment(frc.getId());
assertEquals(newCommentText, actualFrc.getCommentText());
assertEquals(instructor.getEmail(), actualFrc.getLastEditorEmail());
assertEquals(instructor.getEmail(), actualFrc.getLastEditor().getEmail());
}

@Test
Expand Down
12 changes: 10 additions & 2 deletions src/it/resources/data/DataBundleLogicIT.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@
"answer": "Student 1 self feedback."
}
},
"giver": "[email protected]",
"giver": {
"id": "00000000-0000-4000-8000-000000000501",
"type": "instructor",
"email": "[email protected]"
},
"giverType": "INSTRUCTORS",
"giverSection": {
"id": "00000000-0000-4000-8000-000000000201"
Expand All @@ -337,7 +341,11 @@
"isCommentFromFeedbackParticipant": false,
"showCommentTo": [],
"showGiverNameTo": [],
"lastEditorEmail": "[email protected]"
"lastEditor": {
"id": "00000000-0000-4000-8000-000000000501",
"type": "instructor",
"email": "[email protected]"
}
}
},
"notifications": {
Expand Down
Loading

0 comments on commit 1105467

Please sign in to comment.