Skip to content

Commit

Permalink
[#12048] Migrate SubmitFeedbackResponseAction tests (#13033)
Browse files Browse the repository at this point in the history
* Skeleton till shouldAllowIfBeforeDeadline

* Save progress

* Save progress

* Fix all tests

* Fix linting

* Remove redundant

* Refactor to fit integration tests structure

* Add breaking changes

* Add flush

* Fix linting

* Fix clean-up from access control
  • Loading branch information
FergusMok authored May 2, 2024
1 parent a2a9ef3 commit 34248a0
Show file tree
Hide file tree
Showing 17 changed files with 934 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ public void testGetFeedbackQuestionsForSession() {
FeedbackQuestion fq4 = typicalDataBundle.feedbackQuestions.get("qn4InSession1InCourse1");
FeedbackQuestion fq5 = typicalDataBundle.feedbackQuestions.get("qn5InSession1InCourse1");
FeedbackQuestion fq6 = typicalDataBundle.feedbackQuestions.get("qn6InSession1InCourse1NoResponses");
FeedbackQuestion fq7 = typicalDataBundle.feedbackQuestions.get("qn7InSession1InCourse1");
FeedbackQuestion fq8 = typicalDataBundle.feedbackQuestions.get("qn8InSession1InCourse1");
FeedbackQuestion fq9 = typicalDataBundle.feedbackQuestions.get("qn9InSession1InCourse1");

List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2, fq3, fq4, fq5, fq6);
List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2, fq3, fq4, fq5, fq6, fq7, fq8, fq9);

List<FeedbackQuestion> actualQuestions = fqLogic.getFeedbackQuestionsForSession(fs);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ public void testGetFeedbackQuestionsForSession() {
FeedbackQuestion fq4 = typicalDataBundle.feedbackQuestions.get("qn4InSession1InCourse1");
FeedbackQuestion fq5 = typicalDataBundle.feedbackQuestions.get("qn5InSession1InCourse1");
FeedbackQuestion fq6 = typicalDataBundle.feedbackQuestions.get("qn6InSession1InCourse1NoResponses");
FeedbackQuestion fq7 = typicalDataBundle.feedbackQuestions.get("qn7InSession1InCourse1");
FeedbackQuestion fq8 = typicalDataBundle.feedbackQuestions.get("qn8InSession1InCourse1");
FeedbackQuestion fq9 = typicalDataBundle.feedbackQuestions.get("qn9InSession1InCourse1");

List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2, fq3, fq4, fq5, fq6);
List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2, fq3, fq4, fq5, fq6, fq7, fq8, fq9);

List<FeedbackQuestion> actualQuestions = fqDb.getFeedbackQuestionsForSession(fs.getId());

Expand All @@ -112,8 +115,9 @@ public void testGetFeedbackQuestionsForGiverType() {
FeedbackSession fs = typicalDataBundle.feedbackSessions.get("session1InCourse1");
FeedbackQuestion fq1 = typicalDataBundle.feedbackQuestions.get("qn1InSession1InCourse1");
FeedbackQuestion fq2 = typicalDataBundle.feedbackQuestions.get("qn2InSession1InCourse1");
FeedbackQuestion fq9 = typicalDataBundle.feedbackQuestions.get("qn9InSession1InCourse1");

List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2);
List<FeedbackQuestion> expectedQuestions = List.of(fq1, fq2, fq9);

List<FeedbackQuestion> actualQuestions = fqDb.getFeedbackQuestionsForGiverType(fs, FeedbackParticipantType.STUDENTS);

Expand Down
Loading

0 comments on commit 34248a0

Please sign in to comment.