Skip to content
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

[#12048] Add integration tests for FeedbackResponseCommentsDb #12849

Merged
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
e1955b6
Migrate SessionResultsData
xenosf Feb 12, 2024
8f0f835
Add default entities
xenosf Feb 12, 2024
d40f2fb
Add helper methods to assist migrated logic
xenosf Feb 12, 2024
da63d4a
Migrate buildCompleteGiverRecipientMap
xenosf Feb 12, 2024
cc8ff7a
Migrate checkSpecificAccessControl
xenosf Feb 1, 2024
a046670
Add default team instance for instructor
xenosf Feb 4, 2024
9b4945b
Migrate session results data logic
xenosf Feb 4, 2024
fb5a808
Use default team entity for instructor instead of const
xenosf Feb 12, 2024
cd64a4c
Migrate non-db logic
xenosf Feb 14, 2024
a78bf65
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 14, 2024
97ae4b5
Refactor Datastore and SQL action logic out to separate methods
xenosf Feb 15, 2024
51f738f
Fix checkstyle errors
xenosf Feb 15, 2024
6573955
Migrate DB logic
xenosf Feb 16, 2024
13191fe
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 19, 2024
80d651e
Fix checkstyle errors
xenosf Feb 19, 2024
7e960f7
Move default instructor team entity to const
xenosf Feb 19, 2024
901307a
Add test for SqlSessionResultsBundle
xenosf Feb 19, 2024
29900bd
Fix SQL results bundle test
xenosf Feb 20, 2024
ab20259
Add IT for GetSessionResultsAction
xenosf Feb 20, 2024
06c6b61
Fix action logic
xenosf Feb 20, 2024
0ad3b56
Fix checkstyle errors
xenosf Feb 20, 2024
a23545d
Remove unused method parameters
xenosf Feb 20, 2024
1aa00a8
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 20, 2024
56a9d93
Fix persistence issues in test cases
xenosf Feb 20, 2024
a5de57d
Remove question getter for comment
xenosf Feb 23, 2024
6e62b70
Rename boolean methods to start with verb
xenosf Feb 23, 2024
fa89559
Reword comment to clarify question ID
xenosf Feb 23, 2024
273032b
Refactor getting question UUID from param value
xenosf Feb 23, 2024
8627c3f
Remove unneeded getters
xenosf Feb 23, 2024
7f7b81b
Remove entities from Const
xenosf Feb 23, 2024
b6d4b0f
Revert changes to SqlCourseRoster
xenosf Feb 23, 2024
bd67d3c
Create and use missing response class
xenosf Feb 23, 2024
092a08b
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 23, 2024
0668931
Refactor no response text to const
xenosf Feb 24, 2024
82eeeb8
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 24, 2024
f850787
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 24, 2024
a012ad2
Migrate preview-related functionality
xenosf Feb 24, 2024
4401890
Merge branch 'v9-migration' into v9-migration-GetSessionResultsAction
xenosf Feb 24, 2024
2504ead
Migrate preview functionality for question output
xenosf Feb 24, 2024
3811154
Fix recipient section filter
xenosf Feb 26, 2024
08ca697
Merge branch 'master' into v9-migration-GetSessionResultsAction
xenosf Feb 26, 2024
f8c18b8
Update test cases to handle question preview
xenosf Feb 26, 2024
4a75f0e
Merge duplicate methods
xenosf Feb 26, 2024
27ca58d
Fix checkstyle errors
xenosf Feb 26, 2024
79fae78
Add missing questions with non-visible preview responses
xenosf Feb 26, 2024
809b006
Merge branch 'master' into v9-migration-GetSessionResultsAction
xenosf Feb 26, 2024
5d8bf95
Remove outdated test
xenosf Feb 26, 2024
e10e4ba
Edit for style and readability
xenosf Feb 26, 2024
343bd0e
Fix missing join
xenosf Feb 26, 2024
36eb927
Fix section filtering logic
xenosf Feb 26, 2024
f762d0e
Fix checkstyle errors
xenosf Feb 26, 2024
d34caa1
Merge branch 'master' into v9-migration-GetSessionResultsAction
xenosf Feb 27, 2024
fc290a1
Add integration tests
xenosf Feb 26, 2024
3f7949b
Refactor tests for readability
xenosf Feb 27, 2024
16a2275
Merge branch 'master' into v9-migration-add-tests-FeedbackResponseCom…
xenosf Feb 27, 2024
3d13901
Fix broken test cases
xenosf Feb 28, 2024
b1bc6ee
Rename test section key
xenosf Feb 28, 2024
7ec93f2
Merge branch 'master' into v9-migration-add-tests-FeedbackResponseCom…
xenosf Feb 28, 2024
4271cc4
Merge branch 'master' into v9-migration-add-tests-FeedbackResponseCom…
xenosf Mar 12, 2024
41a43a7
Use separate json bundle for test data
xenosf Mar 12, 2024
d4b9c04
Clear session when set up
xenosf Mar 12, 2024
134aa93
Merge branch 'master' into v9-migration-add-tests-FeedbackResponseCom…
cedricongjh Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename test section key
xenosf committed Feb 28, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b1bc6ee336dc2fad72d889ab754444591d039f61
Original file line number Diff line number Diff line change
@@ -134,19 +134,19 @@ public void testGetFeedbackResponseCommentsForSessionInSection_matchFound_succes

______TS("Section 1A match");
List<FeedbackResponseComment> expected = List.of(
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS1"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS2"),
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1ToS2")
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS1a"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS2a"),
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1aToS2a")
);
List<FeedbackResponseComment> results = frcDb.getFeedbackResponseCommentsForSessionInSection(
course.getId(), session.getName(), section1.getName());
assertListCommentsEqual(expected, results);

______TS("Section 2A match");
expected = List.of(
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS2"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS2ToS2"),
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1ToS2")
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS2a"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS2aToS2a"),
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1aToS2a")
);
results = frcDb.getFeedbackResponseCommentsForSessionInSection(
course.getId(), session.getName(), section2.getName());
@@ -191,25 +191,25 @@ public void testGetFeedbackResponseCommentsForQuestionInSection_matchFound_succe

______TS("Section 1A Question 1 match");
List<FeedbackResponseComment> expected = List.of(
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS1"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS2")
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS1a"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS2a")
);
List<FeedbackResponseComment> results = frcDb.getFeedbackResponseCommentsForQuestionInSection(
question1.getId(), section1.getName());
assertListCommentsEqual(expected, results);

______TS("Section 2A Question 1 match");
expected = List.of(
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1ToS2"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS2ToS2")
additionalTestData.feedbackResponseComments.get("commentForQ1FromS1aToS2a"),
additionalTestData.feedbackResponseComments.get("commentForQ1FromS2aToS2a")
);
results = frcDb.getFeedbackResponseCommentsForQuestionInSection(
question1.getId(), section2.getName());
assertListCommentsEqual(expected, results);

______TS("Section 1 Question 2 match");
expected = List.of(
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1ToS2")
additionalTestData.feedbackResponseComments.get("commentForQ2FromS1aToS2a")
);
results = frcDb.getFeedbackResponseCommentsForQuestionInSection(
question2.getId(), section1.getName());
@@ -301,14 +301,14 @@ private SqlDataBundle getAdditionalTestData() {
bundle.feedbackSessions.put("session1InCourse1", session);
bundle.sections.put("section1aInCourse1", section1a);
bundle.sections.put("section2aInCourse1", section2a);
bundle.feedbackResponses.put("responseForQ1FromS1ToS1", frG1R1Q1);
bundle.feedbackResponses.put("responseForQ1FromS1ToS2", frG1R2Q1);
bundle.feedbackResponses.put("responseForQ2FromS1ToS2", frG1R2Q2);
bundle.feedbackResponses.put("responseForQ1FromS2ToS2", frG2R2Q1);
bundle.feedbackResponseComments.put("commentForQ1FromS1ToS1", frcG1R1Q1);
bundle.feedbackResponseComments.put("commentForQ1FromS1ToS2", frcG1R2Q1);
bundle.feedbackResponseComments.put("commentForQ2FromS1ToS2", frcG1R2Q2);
bundle.feedbackResponseComments.put("commentForQ1FromS2ToS2", frcG2R2Q1);
bundle.feedbackResponses.put("responseForQ1FromS1aToS1a", frG1R1Q1);
bundle.feedbackResponses.put("responseForQ1FromS1aToS2a", frG1R2Q1);
bundle.feedbackResponses.put("responseForQ2FromS1aToS2a", frG1R2Q2);
bundle.feedbackResponses.put("responseForQ1FromS2aToS2a", frG2R2Q1);
bundle.feedbackResponseComments.put("commentForQ1FromS1aToS1a", frcG1R1Q1);
bundle.feedbackResponseComments.put("commentForQ1FromS1aToS2a", frcG1R2Q1);
bundle.feedbackResponseComments.put("commentForQ2FromS1aToS2a", frcG1R2Q2);
bundle.feedbackResponseComments.put("commentForQ1FromS2aToS2a", frcG2R2Q1);

return bundle;
}
Loading