From 0262055c2c9930aa339f4679373450f3552ca767 Mon Sep 17 00:00:00 2001 From: Wilson Kurniawan Date: Mon, 2 Nov 2020 12:32:56 +0800 Subject: [PATCH 1/6] [#9536] Implement E2E test data validity check (#10826) --- .../e2e/cases/AdminAccountsPageE2ETest.java | 14 +- .../e2e/cases/AdminSearchPageE2ETest.java | 4 +- ... => AutomatedSessionRemindersE2ETest.java} | 8 +- .../teammates/e2e/cases/BaseE2ETestCase.java | 3 + ...FeedbackConstSumOptionQuestionE2ETest.java | 2 +- ...dbackConstSumRecipientQuestionE2ETest.java | 6 +- .../FeedbackContributionQuestionE2ETest.java | 6 +- .../e2e/cases/FeedbackMcqQuestionE2ETest.java | 2 +- .../e2e/cases/FeedbackMsqQuestionE2ETest.java | 4 +- .../FeedbackNumScaleQuestionE2ETest.java | 4 +- .../FeedbackRankOptionQuestionE2ETest.java | 4 +- .../FeedbackRankRecipientQuestionE2ETest.java | 2 +- .../cases/FeedbackRubricQuestionE2ETest.java | 4 +- .../e2e/cases/FeedbackSubmitPageE2ETest.java | 8 +- .../cases/FeedbackTextQuestionE2ETest.java | 2 +- .../InstructorCourseDetailsPageE2ETest.java | 24 +- .../InstructorCourseEditPageE2ETest.java | 16 +- .../InstructorCourseEnrollPageE2ETest.java | 6 +- ...ctorCourseJoinConfirmationPageE2ETest.java | 6 +- ...orCourseStudentDetailsEditPageE2ETest.java | 13 +- ...ructorCourseStudentDetailsPageE2ETest.java | 10 +- .../cases/InstructorCoursesPageE2ETest.java | 2 +- .../InstructorFeedbackEditPageE2ETest.java | 2 +- ...InstructorFeedbackSessionsPageE2ETest.java | 8 +- .../e2e/cases/InstructorHomePageE2ETest.java | 14 +- .../StudentCourseDetailsPageE2ETest.java | 22 +- ...dentCourseJoinConfirmationPageE2ETest.java | 4 +- .../e2e/cases/StudentHomePageE2ETest.java | 4 +- .../e2e/cases/StudentProfilePageE2ETest.java | 2 +- .../e2e/util/TestDataValidityTest.java | 98 +- .../data/AdminAccountsPageE2ETest.json | 66 +- .../data/AdminSearchPageE2ETest.json | 44 +- .../data/AdminSessionsPageE2ETest.json | 24 +- ... => AutomatedSessionRemindersE2ETest.json} | 58 +- ...FeedbackConstSumOptionQuestionE2ETest.json | 50 +- ...dbackConstSumRecipientQuestionE2ETest.json | 50 +- .../FeedbackContributionQuestionE2ETest.json | 50 +- .../data/FeedbackMcqQuestionE2ETest.json | 28 +- .../data/FeedbackMsqQuestionE2ETest.json | 50 +- .../data/FeedbackNumScaleQuestionE2ETest.json | 50 +- .../FeedbackRankOptionQuestionE2ETest.json | 50 +- .../FeedbackRankRecipientQuestionE2ETest.json | 54 +- .../data/FeedbackRubricQuestionE2ETest.json | 50 +- .../data/FeedbackSubmitPageE2ETest.json | 120 +- .../data/FeedbackTextQuestionE2ETest.json | 32 +- .../InstructorCourseDetailsPageE2ETest.json | 56 +- .../data/InstructorCourseEditPageE2ETest.json | 77 +- .../InstructorCourseEnrollPageE2ETest.json | 14 +- ...ctorCourseJoinConfirmationPageE2ETest.json | 24 +- ...orCourseStudentDetailsEditPageE2ETest.json | 32 +- ...ructorCourseStudentDetailsPageE2ETest.json | 38 +- .../data/InstructorCoursesPageE2ETest.json | 44 +- .../InstructorFeedbackEditPageE2ETest.json | 52 +- ...InstructorFeedbackSessionsPageE2ETest.json | 56 +- .../data/InstructorHomePageE2ETest.json | 128 +- .../data/InstructorSearchPageE2ETest.json | 76 +- .../InstructorStudentListPageE2ETest.json | 60 +- .../InstructorStudentRecordsPageE2ETest.json | 16 +- .../data/StudentCourseDetailsPageE2ETest.json | 60 +- ...dentCourseJoinConfirmationPageE2ETest.json | 48 +- .../StudentFeedbackResultsPageE2ETest.json | 426 +++---- .../data/StudentHomePageE2ETest.json | 146 +-- .../data/StudentProfilePageE2ETest.json | 16 +- src/e2e/resources/testng-e2e.xml | 2 +- .../java/teammates/common/util/Const.java | 2 + .../java/teammates/logic/api/EmailSender.java | 5 +- .../data/AllAccessControlUiTest.json | 1128 ----------------- .../InstructorSubmissionAdjustmentUiTest.json | 850 ------------- 68 files changed, 1259 insertions(+), 3177 deletions(-) rename src/e2e/java/teammates/e2e/cases/{AutomatedSessionRemindersTest.java => AutomatedSessionRemindersE2ETest.java} (92%) rename src/e2e/resources/data/{AutomatedSessionRemindersTest.json => AutomatedSessionRemindersE2ETest.json} (79%) delete mode 100644 src/test/resources/data/AllAccessControlUiTest.json delete mode 100644 src/test/resources/data/InstructorSubmissionAdjustmentUiTest.json diff --git a/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java index ec5fa27546e..4e2d3e51271 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java @@ -23,7 +23,7 @@ protected void prepareTestData() { @Test public void testAll() { - String googleId = "AAMgtE2eT.instr2"; + String googleId = "tm.e2e.AAccounts.instr2"; ______TS("verify loaded data"); @@ -36,7 +36,7 @@ public void testAll() { ______TS("action: remove instructor from course"); - InstructorAttributes instructor = testData.instructors.get("AAMgtE2eT.instr2-AAMgtE2eT.CS2103"); + InstructorAttributes instructor = testData.instructors.get("AAccounts.instr2-AAccounts.CS2103"); String courseId = instructor.courseId; verifyPresentInDatastore(instructor); @@ -46,7 +46,7 @@ public void testAll() { ______TS("action: remove student from course"); - StudentAttributes student = testData.students.get("AAMgtE2eT.instr2-student-CS2103"); + StudentAttributes student = testData.students.get("AAccounts.instr2-student-CS2103"); courseId = student.course; verifyPresentInDatastore(student); @@ -56,8 +56,8 @@ public void testAll() { ______TS("action: downgrade instructor account"); - InstructorAttributes instructor2 = testData.instructors.get("AAMgtE2eT.instr2-AAMgtE2eT.CS2104"); - InstructorAttributes instructor3 = testData.instructors.get("AAMgtE2eT.instr2-AAMgtE2eT.CS1101"); + InstructorAttributes instructor2 = testData.instructors.get("AAccounts.instr2-AAccounts.CS2104"); + InstructorAttributes instructor3 = testData.instructors.get("AAccounts.instr2-AAccounts.CS1101"); verifyPresentInDatastore(instructor2); verifyPresentInDatastore(instructor3); @@ -74,8 +74,8 @@ public void testAll() { ______TS("action: delete account entirely"); - StudentAttributes student2 = testData.students.get("AAMgtE2eT.instr2-student-CS2104"); - StudentAttributes student3 = testData.students.get("AAMgtE2eT.instr2-student-CS1101"); + StudentAttributes student2 = testData.students.get("AAccounts.instr2-student-CS2104"); + StudentAttributes student3 = testData.students.get("AAccounts.instr2-student-CS1101"); verifyPresentInDatastore(student2); verifyPresentInDatastore(student3); diff --git a/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java index 6d033577ea6..68aa877a3da 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java @@ -37,8 +37,8 @@ public void allTests() { InstructorAttributes instructor = testData.instructors.get("instructor1OfCourse1"); AccountAttributes instructorAccount = testData.accounts.get("instructor1OfCourse1"); - ______TS("Typical case: Search student google id"); - String searchContent = student.getGoogleId(); + ______TS("Typical case: Search student email"); + String searchContent = student.getEmail(); searchPage.inputSearchContent(searchContent); searchPage.clickSearchButton(); verifyStudentRowContent(student, studentAccount); diff --git a/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersTest.java b/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java similarity index 92% rename from src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersTest.java rename to src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java index 547b89691e1..e9414c2f82f 100644 --- a/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersTest.java +++ b/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java @@ -16,11 +16,11 @@ * {@link Const.CronJobURIs#AUTOMATED_FEEDBACK_CLOSED_REMINDERS}, * {@link Const.CronJobURIs#AUTOMATED_FEEDBACK_PUBLISHED_REMINDERS}. */ -public class AutomatedSessionRemindersTest extends BaseE2ETestCase { +public class AutomatedSessionRemindersE2ETest extends BaseE2ETestCase { @Override protected void prepareTestData() { - testData = loadDataBundle("/AutomatedSessionRemindersTest.json"); + testData = loadDataBundle("/AutomatedSessionRemindersE2ETest.json"); // When running the test against a production server, email alerts will be sent // to the specified email address @@ -29,8 +29,8 @@ protected void prepareTestData() { String student1Email = TestProperties.TEST_EMAIL; testData.accounts.get("instructorWithEvals").email = student1Email; - testData.instructors.get("AutSessRem.instructor").email = student1Email; - testData.students.get("alice.tmms@AutSessRem.course").email = student1Email; + testData.instructors.get("AutSesRem.instructor").email = student1Email; + testData.students.get("alice.tmms@AutSesRem.course").email = student1Email; testData.feedbackSessions.get("closedSession").setCreatorEmail(student1Email); testData.feedbackSessions.get("closingSession").setCreatorEmail(student1Email); testData.feedbackSessions.get("openingSession").setCreatorEmail(student1Email); diff --git a/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java b/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java index 8cefb017f4b..f2e3d67252d 100644 --- a/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java +++ b/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java @@ -190,6 +190,9 @@ protected void verifyEmailSent(String email, String subject) { if (TestProperties.isDevServer()) { return; } + if (!TestProperties.TEST_EMAIL.equals(email)) { + fail("Email verification is allowed only on preset test email."); + } EmailAccount emailAccount = new EmailAccount(email); try { emailAccount.getUserAuthenticated(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java index 504230944d3..e08fb8b1426 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java @@ -26,7 +26,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FConstSumOptionQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FCSumOptQn.CS2104"); } @Test diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java index 405f5a04025..8178120f7d5 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java @@ -27,7 +27,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FConstSumRecipientQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FCSumRcptQn.CS2104"); } @Test @@ -84,8 +84,8 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FConstSumRecipientQuestionE2eT.CS2104"); - StudentAttributes receiver2 = testData.students.get("charlie.tmms@FConstSumRecipientQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FCSumRcptQn.CS2104"); + StudentAttributes receiver2 = testData.students.get("charlie.tmms@FCSumRcptQn.CS2104"); feedbackSubmitPage.verifyConstSumQuestion(1, "", (FeedbackConstantSumQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java index b1467791976..14b82b77200 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java @@ -28,7 +28,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FContributionQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FContrQn.CS2104"); } @Test @@ -83,8 +83,8 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FContributionQuestionE2eT.CS2104"); - StudentAttributes receiver2 = testData.students.get("charlie.tmms@FContributionQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FContrQn.CS2104"); + StudentAttributes receiver2 = testData.students.get("charlie.tmms@FContrQn.CS2104"); feedbackSubmitPage.verifyContributionQuestion(1, (FeedbackContributionQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java index 461e7d1d720..6f0ba01f58a 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java @@ -27,7 +27,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FMcqQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FMcqQn.CS2104"); } @Test diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java index 012e2e97a3a..f949a098eef 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java @@ -29,7 +29,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FMsqQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FMsqQn.CS2104"); } @Test @@ -90,7 +90,7 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FMsqQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FMsqQn.CS2104"); feedbackSubmitPage.verifyMsqQuestion(1, receiver.getName(), (FeedbackMsqQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java index 37de27d4a94..7a7f9b59c70 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java @@ -24,7 +24,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FNumScaleQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FNumScaleQn.CS2104"); } @Test @@ -81,7 +81,7 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FNumScaleQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FNumScaleQn.CS2104"); feedbackSubmitPage.verifyNumScaleQuestion(1, receiver.getTeam(), (FeedbackNumericalScaleQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java index dcb87b8d72a..3c974d0833f 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java @@ -29,7 +29,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FRankOptionQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FRankOptQn.CS2104"); } @Test @@ -90,7 +90,7 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FRankOptionQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FRankOptQn.CS2104"); feedbackSubmitPage.verifyRankQuestion(1, receiver.getName(), (FeedbackRankQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java index f8dce4665a3..b2eca8c5293 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java @@ -29,7 +29,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FRankRecipientQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FRankRcptQn.CS2104"); } @Test diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java index 9a328bb1461..08e6ed45155 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java @@ -28,7 +28,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FRubricQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FRubricQn.CS2104"); } @Test @@ -102,7 +102,7 @@ protected void testSubmitPage() { ______TS("verify loaded question"); FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession"); - StudentAttributes receiver = testData.students.get("benny.tmms@FRubricQuestionE2eT.CS2104"); + StudentAttributes receiver = testData.students.get("benny.tmms@FRubricQn.CS2104"); feedbackSubmitPage.verifyRubricQuestion(1, receiver.getName(), (FeedbackRubricQuestionDetails) question.getQuestionDetails()); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java index e48fd0bd3f7..65d485bab15 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java @@ -36,12 +36,10 @@ protected void prepareTestData() { testData = loadDataBundle("/FeedbackSubmitPageE2ETest.json"); testData.feedbackSessions.get("Grace Period Session").setEndTime(Instant.now()); student = testData.students.get("Alice"); - if (!TestProperties.isDevServer()) { - student.email = TestProperties.TEST_EMAIL; - } + student.email = TestProperties.TEST_EMAIL; removeAndRestoreDataBundle(testData); - instructor = testData.instructors.get("SFSubmitE2eT.instr"); + instructor = testData.instructors.get("FSubmit.instr"); openSession = testData.feedbackSessions.get("Open Session"); closedSession = testData.feedbackSessions.get("Closed Session"); gracePeriodSession = testData.feedbackSessions.get("Grace Period Session"); @@ -108,7 +106,7 @@ public void testAll() { submitPage.submitMcqResponse(1, recipient, response); verifyEmailSent(student.getEmail(), "TEAMMATES: Feedback responses successfully recorded" - + " [Course: " + testData.courses.get("SFSubmitE2eT.CS2104").getName() + "][Feedback Session: " + + " [Course: " + testData.courses.get("FSubmit.CS2104").getName() + "][Feedback Session: " + gracePeriodSession.getFeedbackSessionName() + "]"); ______TS("add comment"); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java index aa68d6cf814..4fd3d58e8c6 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java @@ -24,7 +24,7 @@ protected void prepareTestData() { instructor = testData.instructors.get("instructor"); course = testData.courses.get("course"); feedbackSession = testData.feedbackSessions.get("openSession"); - student = testData.students.get("alice.tmms@FTextQuestionE2eT.CS2104"); + student = testData.students.get("alice.tmms@FTextQn.CS2104"); } @Test diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java index ad741a97f00..a2c925edf28 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java @@ -31,13 +31,11 @@ public class InstructorCourseDetailsPageE2ETest extends BaseE2ETestCase { @Override protected void prepareTestData() { testData = loadDataBundle("/InstructorCourseDetailsPageE2ETest.json"); - student = testData.students.get("charlie.tmms@ICDetailsE2eT.CS2104"); - if (!TestProperties.isDevServer()) { - student.email = TestProperties.TEST_EMAIL; - } + student = testData.students.get("charlie.tmms@ICDet.CS2104"); + student.email = TestProperties.TEST_EMAIL; removeAndRestoreDataBundle(testData); - course = testData.courses.get("ICDetailsE2eT.CS2104"); + course = testData.courses.get("ICDet.CS2104"); fileName = "/" + course.getId() + "_studentList.csv"; } @@ -49,20 +47,20 @@ public void classSetup() { @Test public void allTests() { AppUrl detailsPageUrl = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_DETAILS_PAGE) - .withUserId(testData.instructors.get("ICDetailsE2eT.instr").googleId) + .withUserId(testData.instructors.get("ICDet.instr").googleId) .withCourseId(course.getId()); InstructorCourseDetailsPage detailsPage = loginAdminToPage(detailsPageUrl, InstructorCourseDetailsPage.class); ______TS("verify loaded details"); InstructorAttributes[] instructors = { - testData.instructors.get("ICDetailsE2eT.instr"), - testData.instructors.get("ICDetailsE2eT.instr2"), + testData.instructors.get("ICDet.instr"), + testData.instructors.get("ICDet.instr2"), }; StudentAttributes[] students = { - testData.students.get("alice.tmms@ICDetailsE2eT.CS2104"), - testData.students.get("benny.tmms@ICDetailsE2eT.CS2104"), - testData.students.get("charlie.tmms@ICDetailsE2eT.CS2104"), - testData.students.get("danny.tmms@ICDetailsE2eT.CS2104"), + testData.students.get("alice.tmms@ICDet.CS2104"), + testData.students.get("benny.tmms@ICDet.CS2104"), + testData.students.get("charlie.tmms@ICDet.CS2104"), + testData.students.get("danny.tmms@ICDet.CS2104"), }; verifyCourseDetails(detailsPage, course, instructors, students); @@ -71,7 +69,7 @@ public void allTests() { ______TS("link: view student details page"); - StudentAttributes studentToView = testData.students.get("benny.tmms@ICDetailsE2eT.CS2104"); + StudentAttributes studentToView = testData.students.get("benny.tmms@ICDet.CS2104"); InstructorCourseStudentDetailsViewPage studentDetailsViewPage = detailsPage.clickViewStudent(studentToView); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java index 75bd6d0a97b..296200041f6 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java @@ -23,12 +23,12 @@ protected void prepareTestData() { testData = loadDataBundle("/InstructorCourseEditPageE2ETest.json"); removeAndRestoreDataBundle(testData); - course = testData.courses.get("InsCrsEdit.CS2104"); - instructors[0] = testData.instructors.get("InsCrsEdit.helper"); - instructors[1] = testData.instructors.get("InsCrsEdit.manager"); - instructors[2] = testData.instructors.get("InsCrsEdit.observer"); - instructors[3] = testData.instructors.get("InsCrsEdit.coowner"); - instructors[4] = testData.instructors.get("InsCrsEdit.tutor"); + course = testData.courses.get("ICEdit.CS2104"); + instructors[0] = testData.instructors.get("ICEdit.helper"); + instructors[1] = testData.instructors.get("ICEdit.manager"); + instructors[2] = testData.instructors.get("ICEdit.observer"); + instructors[3] = testData.instructors.get("ICEdit.coowner"); + instructors[4] = testData.instructors.get("ICEdit.tutor"); } @Test @@ -60,7 +60,7 @@ public void testAll() { ______TS("add instructor"); InstructorAttributes newInstructor = InstructorAttributes - .builder(course.getId(), "InsCrsEdit.test@gmail.tmt") + .builder(course.getId(), "ICEdit.test@gmail.tmt") .withName("Teammates Test") .withIsDisplayedToStudents(true) .withDisplayedName("Instructor") @@ -80,7 +80,7 @@ public void testAll() { ______TS("edit instructor"); instructors[0].name = "Edited Name"; - instructors[0].email = "InsCrsEdit.edited@gmail.tmt"; + instructors[0].email = "ICEdit.edited@gmail.tmt"; instructors[0].privileges.updatePrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_SESSION, true); instructors[0].privileges.updatePrivilege(Const.ParamsNames.INSTRUCTOR_PERMISSION_MODIFY_STUDENT, false); instructors[0].privileges.updatePrivilege("Section 2", diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java index 38c6cad30e7..c5931cbdb47 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java @@ -21,8 +21,8 @@ protected void prepareTestData() { @Test public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_ENROLL_PAGE) - .withUserId(testData.instructors.get("ICEnrollE2eT.teammates.test").googleId) - .withCourseId(testData.courses.get("ICEnrollE2eT.CS2104").getId()); + .withUserId(testData.instructors.get("ICEnroll.teammates.test").googleId) + .withCourseId(testData.courses.get("ICEnroll.CS2104").getId()); InstructorCourseEnrollPage enrollPage = loginAdminToPage(url, InstructorCourseEnrollPage.class); ______TS("Add rows to enroll spreadsheet"); @@ -92,7 +92,7 @@ public void testAll() { private StudentAttributes createCourseStudent(String section, String team, String name, String email, String comments) { - return StudentAttributes.builder("ICEnrollE2eT.CS2104", email) + return StudentAttributes.builder("tm.e2e.ICEnroll.CS2104", email) .withName(name) .withComment(comments) .withTeamName(team) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java index 0d18b55f47f..b0ba7665113 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java @@ -21,8 +21,8 @@ protected void prepareTestData() { testData = loadDataBundle("/InstructorCourseJoinConfirmationPageE2ETest.json"); removeAndRestoreDataBundle(testData); - newInstructor = testData.instructors.get("ICJConfirmationE2eT.instr.CS1101"); - newInstructor.googleId = "ICJConfirmationE2eT.instr2"; + newInstructor = testData.instructors.get("ICJoinConf.instr.CS1101"); + newInstructor.googleId = "tm.e2e.ICJoinConf.instr2"; } @Test @@ -38,7 +38,7 @@ public void testAll() { errorPage.verifyErrorMessage("No instructor with given registration key: " + invalidEncryptedKey); ______TS("Click join link: valid key"); - String courseId = testData.courses.get("ICJConfirmationE2eT.CS1101").getId(); + String courseId = testData.courses.get("ICJoinConf.CS1101").getId(); String instructorEmail = newInstructor.email; joinLink = createUrl(Const.WebPageURIs.JOIN_PAGE) .withRegistrationKey(getKeyForInstructor(courseId, instructorEmail)) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java index 9989831e5ce..571d38b0997 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java @@ -23,15 +23,15 @@ protected void prepareTestData() { testData = loadDataBundle("/InstructorCourseStudentDetailsEditPageE2ETest.json"); removeAndRestoreDataBundle(testData); - student = testData.students.get("ICSDEditE2eT.jose.tmms"); - otherStudent = testData.students.get("ICSDEditE2eT.benny.c"); - course = testData.courses.get("ICSDEditE2eT.CS2104"); + student = testData.students.get("ICSDetEdit.jose.tmms"); + otherStudent = testData.students.get("ICSDetEdit.benny.c"); + course = testData.courses.get("ICSDetEdit.CS2104"); } @Test public void testAll() { AppUrl editPageUrl = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_STUDENT_DETAILS_EDIT_PAGE) - .withUserId(testData.instructors.get("ICSDEditE2eT.instr").googleId) + .withUserId(testData.instructors.get("ICSDetEdit.instr").googleId) .withCourseId(course.getId()) .withStudentEmail(student.email); InstructorCourseStudentDetailsEditPage editPage = @@ -57,10 +57,7 @@ public void testAll() { editPage.verifyStatusMessage("Trying to update to an email that is already in use"); ______TS("edit email and resend links"); - String newEmail = "editedEmail@gmail.tmt"; - if (!TestProperties.isDevServer()) { - newEmail = TestProperties.TEST_EMAIL; - } + String newEmail = TestProperties.TEST_EMAIL; student.email = newEmail; student.googleId = null; editPage.editStudentEmailAndResendLinks(newEmail); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java index 9fa91c9bf30..bed7c0a92c6 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java @@ -23,8 +23,8 @@ protected void prepareTestData() { @Test public void testAll() { ______TS("verify loaded details - student with profile"); - StudentAttributes student = testData.students.get("ICSDetailsE2eT.jose.tmms"); - StudentProfileAttributes studentProfile = testData.profiles.get("ICSDetailsE2eT.jose.tmms"); + StudentAttributes student = testData.students.get("ICSDet.jose.tmms"); + StudentProfileAttributes studentProfile = testData.profiles.get("ICSDet.jose.tmms"); AppUrl viewPageUrl = getStudentDetailsViewPageUrl(student.getEmail()); InstructorCourseStudentDetailsViewPage viewPage = loginAdminToPage(viewPageUrl, InstructorCourseStudentDetailsViewPage.class); @@ -32,7 +32,7 @@ public void testAll() { viewPage.verifyStudentDetails(studentProfile, student); ______TS("verify loaded details - student without profile"); - student = testData.students.get("ICSDetailsE2eT.benny.c"); + student = testData.students.get("ICSDet.benny.c"); viewPageUrl = getStudentDetailsViewPageUrl(student.getEmail()); viewPage = AppPage.getNewPageInstance(browser, viewPageUrl, InstructorCourseStudentDetailsViewPage.class); @@ -41,8 +41,8 @@ public void testAll() { private AppUrl getStudentDetailsViewPageUrl(String studentEmail) { return createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_STUDENT_DETAILS_PAGE) - .withUserId(testData.instructors.get("ICSDetailsE2eT.instr").getGoogleId()) - .withCourseId(testData.courses.get("ICSDetailsE2eT.CS2104").getId()) + .withUserId(testData.instructors.get("ICSDet.instr").getGoogleId()) + .withCourseId(testData.courses.get("ICSDet.CS2104").getId()) .withStudentEmail(studentEmail); } } diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java index 91ad0903193..a87fd8fca65 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java @@ -31,7 +31,7 @@ protected void prepareTestData() { courses[1] = testData.courses.get("CS2104"); courses[2] = testData.courses.get("CS2105"); - newCourse = CourseAttributes.builder("ICAddE2ETest.CS4100") + newCourse = CourseAttributes.builder("tm.e2e.ICs.CS4100") .withName("New Course") .withTimezone(ZoneId.of("Asia/Singapore")) .build(); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java index 74a85933118..578c08a0c2f 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java @@ -128,7 +128,7 @@ public void allTests() throws Exception { ______TS("preview session as student"); FeedbackSubmitPage previewPage = feedbackEditPage.previewAsStudent( - testData.students.get("benny.tmms@CFeedbackEditE2eT.CS2104")); + testData.students.get("benny.tmms@IFEdit.CS2104")); previewPage.closeCurrentWindowAndSwitchToParentWindow(); ______TS("preview session as instructor"); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java index 83a27537aea..3a402dec4ca 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java @@ -40,10 +40,8 @@ public class InstructorFeedbackSessionsPageE2ETest extends BaseE2ETestCase { @Override protected void prepareTestData() { testData = loadDataBundle("/InstructorFeedbackSessionsPageE2ETest.json"); - studentToEmail = testData.students.get("charlie.tmms@CFeedbackSessionsE2eT.CS1101"); - if (!TestProperties.isDevServer()) { - studentToEmail.email = TestProperties.TEST_EMAIL; - } + studentToEmail = testData.students.get("charlie.tmms@IFSess.CS1101"); + studentToEmail.email = TestProperties.TEST_EMAIL; removeAndRestoreDataBundle(testData); instructor = testData.instructors.get("instructor"); @@ -175,7 +173,7 @@ public void allTests() { ______TS("download results"); feedbackSessionsPage.downloadResults(openSession); - List expectedContent = Arrays.asList("Course,CFeedbackSessionsE2eT.CS1101", + List expectedContent = Arrays.asList("Course,tm.e2e.IFSess.CS1101", "Session Name,Second Session", "Question 1,Testing question text"); verifyDownloadedFile(fileName, expectedContent); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java index c6d4133451c..f4a778a89cc 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java @@ -41,16 +41,14 @@ public class InstructorHomePageE2ETest extends BaseE2ETestCase { @Override protected void prepareTestData() { testData = loadDataBundle("/InstructorHomePageE2ETest.json"); - studentToEmail = testData.students.get("IHomeE2eT.charlie.d.tmms@IHomeE2eT.CS2104"); - if (!TestProperties.isDevServer()) { - studentToEmail.email = TestProperties.TEST_EMAIL; - } + studentToEmail = testData.students.get("IHome.charlie.d.tmms@IHome.CS2104"); + studentToEmail.email = TestProperties.TEST_EMAIL; removeAndRestoreDataBundle(testData); putDocuments(testData); - instructor = testData.instructors.get("IHomeE2eT.instr.CS2104"); - course = testData.courses.get("IHomeE2eT.CS2104"); - otherCourse = testData.courses.get("IHomeE2eT.CS1101"); + instructor = testData.instructors.get("IHome.instr.CS2104"); + course = testData.courses.get("IHome.CS2104"); + otherCourse = testData.courses.get("IHome.CS1101"); feedbackSessionAwaiting = testData.feedbackSessions.get("Second Feedback Session"); feedbackSessionOpen = testData.feedbackSessions.get("First Feedback Session"); @@ -171,7 +169,7 @@ public void allTests() { ______TS("download results"); homePage.downloadResults(courseIndex, sessionIndex); - List expectedContent = Arrays.asList("Course,IHomeE2eT.CS2104", + List expectedContent = Arrays.asList("Course,tm.e2e.IHome.CS2104", "Session Name,First Feedback Session", "Question 1,Rate 5 other students' products"); verifyDownloadedFile(fileName, expectedContent); diff --git a/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java index 99f554b2657..47dc0cdd283 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java @@ -24,21 +24,21 @@ protected void prepareTestData() { public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.STUDENT_COURSE_DETAILS_PAGE) - .withCourseId("SCDetailsE2eT.CS2104") - .withUserId(testData.students.get("SCDetailsE2eT.alice").googleId); + .withCourseId("tm.e2e.SCDet.CS2104") + .withUserId(testData.students.get("SCDet.alice").googleId); StudentCourseDetailsPage detailsPage = loginAdminToPage(url, StudentCourseDetailsPage.class); ______TS("verify loaded data"); - InstructorAttributes[] instructors = { testData.instructors.get("SCDetailsE2eT.instr"), - testData.instructors.get("SCDetailsE2eT.instr2") }; - StudentAttributes[] teammates = { testData.students.get("SCDetailsE2eT.benny"), - testData.students.get("SCDetailsE2eT.charlie") }; - StudentProfileAttributes[] teammatesProfiles = { testData.profiles.get("SCDetailsE2eT.benny"), - testData.profiles.get("SCDetailsE2eT.charlie") }; - - detailsPage.verifyCourseDetails(testData.courses.get("SCDetailsE2eT.CS2104")); + InstructorAttributes[] instructors = { testData.instructors.get("SCDet.instr"), + testData.instructors.get("SCDet.instr2") }; + StudentAttributes[] teammates = { testData.students.get("SCDet.benny"), + testData.students.get("SCDet.charlie") }; + StudentProfileAttributes[] teammatesProfiles = { testData.profiles.get("SCDet.benny"), + testData.profiles.get("SCDet.charlie") }; + + detailsPage.verifyCourseDetails(testData.courses.get("SCDet.CS2104")); detailsPage.verifyInstructorsDetails(instructors); - detailsPage.verifyStudentDetails(testData.students.get("SCDetailsE2eT.alice")); + detailsPage.verifyStudentDetails(testData.students.get("SCDet.alice")); detailsPage.sortTeammatesByName(); detailsPage.verifyTeammatesDetails(teammates, teammatesProfiles); } diff --git a/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java index b813dfcf8bb..b07e66f9895 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java @@ -21,14 +21,14 @@ protected void prepareTestData() { testData = loadDataBundle("/StudentCourseJoinConfirmationPageE2ETest.json"); removeAndRestoreDataBundle(testData); - newStudent = testData.students.get("alice.tmms@SCJConfirmationE2eT.CS2104"); + newStudent = testData.students.get("alice.tmms@SCJoinConf.CS2104"); newStudent.googleId = testData.accounts.get("alice.tmms").googleId; } @Test public void testAll() { ______TS("Click join link: invalid key"); - String courseId = testData.courses.get("SCJConfirmationE2eT.CS2104").getId(); + String courseId = testData.courses.get("SCJoinConf.CS2104").getId(); String invalidEncryptedKey = "invalidKey"; AppUrl joinLink = createUrl(Const.WebPageURIs.JOIN_PAGE) .withRegistrationKey(invalidEncryptedKey) diff --git a/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java index 6081e1b0f27..86cbba35a7d 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java @@ -27,7 +27,7 @@ protected void prepareTestData() { @Test public void testAll() { - AppUrl url = createUrl(Const.WebPageURIs.STUDENT_HOME_PAGE).withUserId("SHomeUiT.student"); + AppUrl url = createUrl(Const.WebPageURIs.STUDENT_HOME_PAGE).withUserId("tm.e2e.SHome.student"); loginAdminToPage(url, StudentHomePage.class); List courseIds = getAllVisibleCourseIds(); @@ -56,7 +56,7 @@ private List getAllVisibleCourseIds() { List courseIds = new ArrayList<>(); for (StudentAttributes student : testData.students.values()) { - if ("SHomeUiT.student".equals(student.googleId)) { + if ("tm.e2e.SHome.student".equals(student.googleId)) { courseIds.add(student.getCourse()); } } diff --git a/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java index 998d88e5a32..d4a61459efa 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java @@ -23,7 +23,7 @@ public void testAll() { ______TS("Typical case: Log in with filled profile values"); - AppUrl url = createUrl(Const.WebPageURIs.STUDENT_PROFILE_PAGE).withUserId("SProfUiT.student"); + AppUrl url = createUrl(Const.WebPageURIs.STUDENT_PROFILE_PAGE).withUserId("tm.e2e.SProf.student"); StudentProfilePage profilePage = loginAdminToPage(url, StudentProfilePage.class); profilePage.ensureProfileContains("Ben", "i.m.benny@gmail.tmt", "TEAMMATES Test Institute 4", diff --git a/src/e2e/java/teammates/e2e/util/TestDataValidityTest.java b/src/e2e/java/teammates/e2e/util/TestDataValidityTest.java index 4878196bf45..017f4611715 100644 --- a/src/e2e/java/teammates/e2e/util/TestDataValidityTest.java +++ b/src/e2e/java/teammates/e2e/util/TestDataValidityTest.java @@ -15,6 +15,7 @@ import org.testng.annotations.Test; import teammates.common.datatransfer.DataBundle; +import teammates.common.util.Const; import teammates.common.util.JsonUtils; import teammates.test.BaseTestCase; import teammates.test.FileHelper; @@ -52,10 +53,11 @@ public void checkTestDataValidity() throws IOException { return; } + String testPage = path.getFileName().toString().replace("E2ETest.json", ""); DataBundle dataBundle = JsonUtils.fromJson(jsonString, DataBundle.class); dataBundle.accounts.forEach((id, account) -> { - if (!isValidTestGoogleId(account.googleId)) { + if (!isValidTestGoogleId(account.googleId, testPage)) { errors.computeIfAbsent(pathString, k -> new ArrayList<>()) .add("Invalid account google ID: " + account.googleId); } @@ -67,14 +69,14 @@ public void checkTestDataValidity() throws IOException { }); dataBundle.courses.forEach((id, course) -> { - if (!isValidTestCourseId(course.getId())) { + if (!isValidTestCourseId(course.getId(), testPage)) { errors.computeIfAbsent(pathString, k -> new ArrayList<>()) .add("Invalid course ID: " + course.getId()); } }); dataBundle.students.forEach((id, student) -> { - if (!isValidTestGoogleId(student.googleId)) { + if (!isValidTestGoogleId(student.googleId, testPage)) { errors.computeIfAbsent(pathString, k -> new ArrayList<>()) .add("Invalid student google ID: " + student.googleId); } @@ -86,7 +88,7 @@ public void checkTestDataValidity() throws IOException { }); dataBundle.instructors.forEach((id, instructor) -> { - if (!isValidTestGoogleId(instructor.googleId)) { + if (!isValidTestGoogleId(instructor.googleId, testPage)) { errors.computeIfAbsent(pathString, k -> new ArrayList<>()) .add("Invalid instructor google ID: " + instructor.googleId); } @@ -96,6 +98,35 @@ public void checkTestDataValidity() throws IOException { .add("Invalid instructor email: " + instructor.email); } }); + + dataBundle.feedbackSessions.forEach((id, session) -> { + if (!isValidTestCourseId(session.getCourseId(), testPage)) { + errors.computeIfAbsent(pathString, k -> new ArrayList<>()) + .add("Invalid session course ID: " + session.getCourseId()); + } + + if (!isValidTestEmail(session.getCreatorEmail())) { + errors.computeIfAbsent(pathString, k -> new ArrayList<>()) + .add("Invalid session creator email: " + session.getCreatorEmail()); + } + }); + + dataBundle.feedbackResponses.forEach((id, response) -> { + if (!isValidTestCourseId(response.getCourseId(), testPage)) { + errors.computeIfAbsent(pathString, k -> new ArrayList<>()) + .add("Invalid response course ID: " + response.getCourseId()); + } + + if (response.giver.contains("@") && !isValidTestEmail(response.giver)) { + errors.computeIfAbsent(pathString, k -> new ArrayList<>()) + .add("Invalid response giver email: " + response.giver); + } + + if (response.recipient.contains("@") && !isValidTestEmail(response.recipient)) { + errors.computeIfAbsent(pathString, k -> new ArrayList<>()) + .add("Invalid response recipient email: " + response.recipient); + } + }); }); } @@ -110,22 +141,59 @@ public void checkTestDataValidity() throws IOException { } } - @SuppressWarnings("PMD.UnusedFormalParameter") private boolean isValidTestEmail(String email) { - // TODO - return true; + return email.endsWith(Const.TEST_EMAIL_DOMAIN); } - @SuppressWarnings("PMD.UnusedFormalParameter") - private boolean isValidTestCourseId(String courseId) { - // TODO - return true; + private boolean isValidTestCourseId(String courseId, String testPage) { + return courseId.matches(constructIdRegex(testPage)) && courseId.length() < 32; + } + + private boolean isValidTestGoogleId(String googleId, String testPage) { + if (googleId == null || googleId.equals("")) { + // Empty google ID is always acceptable + return true; + } + return googleId.matches(constructIdRegex(testPage)) && googleId.length() < 32; } - @SuppressWarnings("PMD.UnusedFormalParameter") - private boolean isValidTestGoogleId(String googleId) { - // TODO - return true; + private String constructIdRegex(String testPage) { + // We set these rules for setting the prefix for IDs: + // Rule 1: must start with predefined phrase + // Rule 2: must be representative of the test but yet not too long + + String shortenedTestPage = testPage; + + // Trim the Page word at the end if any + shortenedTestPage = shortenedTestPage + .replaceFirst("Page$", ""); + + // Shorten common words + shortenedTestPage = shortenedTestPage + .replaceFirst("^Admin", "A") + .replaceFirst("^Instructor", "I") + .replaceFirst("^Automated", "Aut") + .replace("Feedback", "F") + .replace("Student", "S") + .replace("Course", "C") + .replace("Question", "Qn") + .replaceFirst("Session(s?)", "Ses$1") + .replaceFirst("Results?", "Res") + .replace("Details", "Det") + .replace("Confirmation", "Conf") + .replace("Profile", "Prof") + .replace("Reminders", "Rem"); + + // Shorten question types + shortenedTestPage = shortenedTestPage + .replace("Recipient", "Rcpt") + .replace("Option", "Opt") + .replace("Contribution", "Contr") + .replace("ConstSum", "CSum"); + + // Prefix with tm.e2e. + // Add validation at the end to ensure that the ID is not equal to the prefix only + return "tm\\.e2e\\." + shortenedTestPage + "\\.(?:[A-Za-z0-9]+.)*[A-Za-z0-9]+"; } } diff --git a/src/e2e/resources/data/AdminAccountsPageE2ETest.json b/src/e2e/resources/data/AdminAccountsPageE2ETest.json index 280bbd476f5..0e71542a0b0 100644 --- a/src/e2e/resources/data/AdminAccountsPageE2ETest.json +++ b/src/e2e/resources/data/AdminAccountsPageE2ETest.json @@ -1,36 +1,36 @@ { "accounts": { - "AAMgtE2eT.instr2": { - "googleId": "AAMgtE2eT.instr2", + "AAccounts.instr2": { + "googleId": "tm.e2e.AAccounts.instr2", "name": "Teammates Instr2", "isInstructor": true, - "email": "AAMgtE2eT.instr2@gmail.tmt", + "email": "AAccounts.instr2@gmail.tmt", "institute": "TEAMMATES Test Institute 1" } }, "courses": { - "AAMgtE2eT.CS2104": { - "id": "AAMgtE2eT.CS2104", + "AAccounts.CS2104": { + "id": "tm.e2e.AAccounts.CS2104", "name": "Programming Languages", "timeZone": "UTC" }, - "AAMgtE2eT.CS2103": { - "id": "AAMgtE2eT.CS2103", + "AAccounts.CS2103": { + "id": "tm.e2e.AAccounts.CS2103", "name": "Software Engineering", "timeZone": "UTC" }, - "AAMgtE2eT.CS1101": { - "id": "AAMgtE2eT.CS1101", + "AAccounts.CS1101": { + "id": "tm.e2e.AAccounts.CS1101", "name": "Programming Methodology", "timeZone": "UTC" } }, "instructors": { - "AAMgtE2eT.instr2-AAMgtE2eT.CS2104": { - "googleId": "AAMgtE2eT.instr2", - "courseId": "AAMgtE2eT.CS2104", + "AAccounts.instr2-AAccounts.CS2104": { + "googleId": "tm.e2e.AAccounts.instr2", + "courseId": "tm.e2e.AAccounts.CS2104", "name": "Teammates Instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", + "email": "AAccounts.instr2@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": false, "displayedName": "Co-owner", @@ -49,11 +49,11 @@ "sessionLevel": {} } }, - "AAMgtE2eT.instr2-AAMgtE2eT.CS2103": { - "googleId": "AAMgtE2eT.instr2", - "courseId": "AAMgtE2eT.CS2103", + "AAccounts.instr2-AAccounts.CS2103": { + "googleId": "tm.e2e.AAccounts.instr2", + "courseId": "tm.e2e.AAccounts.CS2103", "name": "Teammates Instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", + "email": "AAccounts.instr2@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": false, "displayedName": "Co-owner", @@ -72,11 +72,11 @@ "sessionLevel": {} } }, - "AAMgtE2eT.instr2-AAMgtE2eT.CS1101": { - "googleId": "AAMgtE2eT.instr2", - "courseId": "AAMgtE2eT.CS1101", + "AAccounts.instr2-AAccounts.CS1101": { + "googleId": "tm.e2e.AAccounts.instr2", + "courseId": "tm.e2e.AAccounts.CS1101", "name": "Teammates Instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", + "email": "AAccounts.instr2@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": false, "displayedName": "Co-owner", @@ -97,28 +97,28 @@ } }, "students": { - "AAMgtE2eT.instr2-student-CS2104": { - "googleId": "AAMgtE2eT.instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", - "course": "AAMgtE2eT.CS2104", + "AAccounts.instr2-student-CS2104": { + "googleId": "tm.e2e.AAccounts.instr2", + "email": "AAccounts.instr2@gmail.tmt", + "course": "tm.e2e.AAccounts.CS2104", "name": "Teammates Instr2", "comments": "This is an instructor", "team": "Team 1", "section": "None" }, - "AAMgtE2eT.instr2-student-CS2103": { - "googleId": "AAMgtE2eT.instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", - "course": "AAMgtE2eT.CS2103", + "AAccounts.instr2-student-CS2103": { + "googleId": "tm.e2e.AAccounts.instr2", + "email": "AAccounts.instr2@gmail.tmt", + "course": "tm.e2e.AAccounts.CS2103", "name": "Teammates Instr2", "comments": "This is an instructor", "team": "Team 1", "section": "None" }, - "AAMgtE2eT.instr2-student-CS1101": { - "googleId": "AAMgtE2eT.instr2", - "email": "AAMgtE2eT.instr2@gmail.tmt", - "course": "AAMgtE2eT.CS1101", + "AAccounts.instr2-student-CS1101": { + "googleId": "tm.e2e.AAccounts.instr2", + "email": "AAccounts.instr2@gmail.tmt", + "course": "tm.e2e.AAccounts.CS1101", "name": "Teammates Instr2", "comments": "This is an instructor", "team": "Team 1", diff --git a/src/e2e/resources/data/AdminSearchPageE2ETest.json b/src/e2e/resources/data/AdminSearchPageE2ETest.json index e28126b9c3f..c311e2c798f 100644 --- a/src/e2e/resources/data/AdminSearchPageE2ETest.json +++ b/src/e2e/resources/data/AdminSearchPageE2ETest.json @@ -1,40 +1,40 @@ { "accounts": { "instructor1OfCourse1": { - "googleId": "adminSearch.idOfInstructor1OfCourse1", + "googleId": "tm.e2e.ASearch.instr1", "name": "Instructor1 of Course1", "isInstructor": true, - "email": "adminSearch.instructor1@course1.tmt", + "email": "ASearch.instructor1@gmail.tmt", "institute": "TEAMMATES Institute 1" }, "instructor2OfCourse1": { - "googleId": "adminSearch.idOfInstructor2OfCourse1", + "googleId": "tm.e2e.ASearch.instr2", "name": "Instructor2 of Course1", "isInstructor": true, - "email": "adminSearch.instructor2@course1.tmt", + "email": "ASearch.instructor2@gmail.tmt", "institute": "TEAMMATES Institute 1" }, "student1InCourse1": { - "googleId": "adminSearch.student1InCourse1", + "googleId": "tm.e2e.ASearch.student1", "name": "Student1 in course1", "isInstructor": false, - "email": "adminSearch.student1InCourse1@gmail.tmt", + "email": "ASearch.student1@gmail.tmt", "institute": "TEAMMATES Institute 1" } }, "courses": { "typicalCourse1": { - "id": "adminSearch.idOfTypicalCourse1", + "id": "tm.e2e.ASearch.course1", "name": "Typical Course 1", "timeZone": "UTC" } }, "instructors": { "instructor1OfCourse1": { - "googleId": "adminSearch.idOfInstructor1OfCourse1", - "courseId": "adminSearch.idOfTypicalCourse1", + "googleId": "tm.e2e.ASearch.instr1", + "courseId": "tm.e2e.ASearch.course1", "name": "Instructor1 of Course1", - "email": "adminSearch.instructor1@course1.tmt", + "email": "ASearch.instructor1@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -54,10 +54,10 @@ } }, "instructor2OfCourse1": { - "googleId": "adminSearch.idOfInstructor2OfCourse1", - "courseId": "adminSearch.idOfTypicalCourse1", + "googleId": "tm.e2e.ASearch.instr2", + "courseId": "tm.e2e.ASearch.course1", "name": "Instructor2 of Course1", - "email": "adminSearch.instructor2@course1.tmt", + "email": "ASearch.instructor2@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -79,9 +79,9 @@ }, "students": { "student1InCourse1": { - "googleId": "adminSearch.student1InCourse1", - "email": "adminSearch.student1InCourse1@gmail.tmt", - "course": "adminSearch.idOfTypicalCourse1", + "googleId": "tm.e2e.ASearch.student1", + "email": "ASearch.student1@gmail.tmt", + "course": "tm.e2e.ASearch.course1", "name": "Student1 in course1", "comments": "comment for student1InCourse1", "team": "Team 1.1", @@ -90,9 +90,9 @@ }, "feedbackSessions": { "session1InCourse1": { - "feedbackSessionName": "adminSearch.First feedback session", - "courseId": "adminSearch.idOfTypicalCourse1", - "creatorEmail": "adminSearch.instructor1@course1.tmt", + "feedbackSessionName": "ASearch.First feedback session", + "courseId": "tm.e2e.ASearch.course1", + "creatorEmail": "ASearch.instructor1@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T21:59:00Z", @@ -110,9 +110,9 @@ "isPublishedEmailEnabled": true }, "session2InCourse1": { - "feedbackSessionName": "adminSearch.Second feedback session", - "courseId": "adminSearch.idOfTypicalCourse1", - "creatorEmail": "adminSearch.instructor1@course1.tmt", + "feedbackSessionName": "ASearch.Second feedback session", + "courseId": "tm.e2e.ASearch.course1", + "creatorEmail": "ASearch.instructor1@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T21:59:00Z", diff --git a/src/e2e/resources/data/AdminSessionsPageE2ETest.json b/src/e2e/resources/data/AdminSessionsPageE2ETest.json index 4fd5aed4e0b..d76ed2974a9 100644 --- a/src/e2e/resources/data/AdminSessionsPageE2ETest.json +++ b/src/e2e/resources/data/AdminSessionsPageE2ETest.json @@ -1,26 +1,26 @@ { "accounts": { "instructor1OfCourse1": { - "googleId": "adminSessions.idOfInstructor1OfCourse1", + "googleId": "tm.e2e.ASess.instr1", "name": "Instructor1 of Course1", "isInstructor": true, - "email": "adminSessions.instructor1@course1.tmt", + "email": "ASess.instructor1@gmail.tmt", "institute": "TEAMMATES Institute 1" } }, "courses": { "typicalCourse1": { - "id": "adminSessions.idOfTypicalCourse1", + "id": "tm.e2e.ASess.idOfTypicalCourse1", "name": "Typical Course 1", "timeZone": "UTC" } }, "instructors": { "instructor1OfCourse1": { - "googleId": "adminSessions.idOfInstructor1OfCourse1", - "courseId": "adminSessions.idOfTypicalCourse1", + "googleId": "tm.e2e.ASess.instr1", + "courseId": "tm.e2e.ASess.idOfTypicalCourse1", "name": "Instructor1 of Course1", - "email": "adminSessions.instructor1@course1.tmt", + "email": "ASess.instructor1@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -43,8 +43,8 @@ "feedbackSessions": { "session1InCourse1": { "feedbackSessionName": "Open feedback session", - "courseId": "adminSessions.idOfTypicalCourse1", - "creatorEmail": "adminSessions.instructor1@course1.tmt", + "courseId": "tm.e2e.ASess.idOfTypicalCourse1", + "creatorEmail": "ASess.instructor1@gmail.tmt", "instructions": "Please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-03-28T21:59:00Z", @@ -63,8 +63,8 @@ }, "session2InCourse1": { "feedbackSessionName": "Awaiting feedback session", - "courseId": "adminSessions.idOfTypicalCourse1", - "creatorEmail": "adminSessions.instructor1@course1.tmt", + "courseId": "tm.e2e.ASess.idOfTypicalCourse1", + "creatorEmail": "ASess.instructor1@gmail.tmt", "instructions": "Please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-03-28T21:59:00Z", @@ -83,8 +83,8 @@ }, "session3InCourse1": { "feedbackSessionName": "Future feedback session", - "courseId": "adminSessions.idOfTypicalCourse1", - "creatorEmail": "adminSessions.instructor1@course1.tmt", + "courseId": "tm.e2e.ASess.idOfTypicalCourse1", + "creatorEmail": "ASess.instructor1@gmail.tmt", "instructions": "Please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-03-28T21:59:00Z", diff --git a/src/e2e/resources/data/AutomatedSessionRemindersTest.json b/src/e2e/resources/data/AutomatedSessionRemindersE2ETest.json similarity index 79% rename from src/e2e/resources/data/AutomatedSessionRemindersTest.json rename to src/e2e/resources/data/AutomatedSessionRemindersE2ETest.json index e2c4c21ea68..ca1609426ed 100644 --- a/src/e2e/resources/data/AutomatedSessionRemindersTest.json +++ b/src/e2e/resources/data/AutomatedSessionRemindersE2ETest.json @@ -1,26 +1,26 @@ { "accounts": { "instructorWithEvals": { - "googleId": "AutSessRem.instructor", + "googleId": "tm.e2e.AutSesRem.instructor", "name": "Test Ins for Aut Sessions Reminder", "isInstructor": true, - "email": "${value.injected.in.testfile}", + "email": "AutSesRem.instructor@gmail.tmt", "institute": "TEAMMATES Test Institute 1" } }, "courses": { "course": { - "id": "AutSessRem.course", + "id": "tm.e2e.AutSesRem.course", "name": "Test Course for Aut Sessions Reminder", "timeZone": "UTC" } }, "instructors": { - "AutSessRem.instructor": { - "googleId": "AutSessRem.instructor", - "courseId": "AutSessRem.course", + "AutSesRem.instructor": { + "googleId": "tm.e2e.AutSesRem.instructor", + "courseId": "tm.e2e.AutSesRem.course", "name": "Test Ins for Aut Sessions Reminder", - "email": "${value.injected.in.testfile}", + "email": "AutSesRem.instructor@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": false, "displayedName": "Co-owner", @@ -41,10 +41,10 @@ } }, "students": { - "alice.tmms@AutSessRem.course": { - "googleId": "alice.b.tmms", - "email": "${value.injected.in.testfile}", - "course": "AutSessRem.course", + "alice.tmms@AutSesRem.course": { + "googleId": "tm.e2e.AutSesRem.alice.b.tmms", + "email": "AutSesRem.instructor@gmail.tmt", + "course": "tm.e2e.AutSesRem.course", "name": "Alice Betsy'\"", "comments": "dummy comment'\"", "team": "Team 1'\"", @@ -53,9 +53,9 @@ }, "feedbackSessions": { "openingSession": { - "feedbackSessionName": "AutSessRem Opening Session", - "courseId": "AutSessRem.course", - "creatorEmail": "${value.injected.in.testfile}", + "feedbackSessionName": "AutSesRem Opening Session", + "courseId": "tm.e2e.AutSesRem.course", + "creatorEmail": "AutSesRem.instructor@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -73,9 +73,9 @@ "isPublishedEmailEnabled": true }, "closingSession": { - "feedbackSessionName": "AutSessRem Closing Session", - "courseId": "AutSessRem.course", - "creatorEmail": "${value.injected.in.testfile}", + "feedbackSessionName": "AutSesRem Closing Session", + "courseId": "tm.e2e.AutSesRem.course", + "creatorEmail": "AutSesRem.instructor@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T23:59:00Z", @@ -93,9 +93,9 @@ "isPublishedEmailEnabled": true }, "closedSession": { - "feedbackSessionName": "AutSessRem Closed Session", - "courseId": "AutSessRem.course", - "creatorEmail": "${value.injected.in.testfile}", + "feedbackSessionName": "AutSesRem Closed Session", + "courseId": "tm.e2e.AutSesRem.course", + "creatorEmail": "AutSesRem.instructor@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T23:59:00Z", @@ -113,9 +113,9 @@ "isPublishedEmailEnabled": true }, "publishedSession": { - "feedbackSessionName": "AutSessRem Published Session", - "courseId": "AutSessRem.course", - "creatorEmail": "${value.injected.in.testfile}", + "feedbackSessionName": "AutSesRem Published Session", + "courseId": "tm.e2e.AutSesRem.course", + "creatorEmail": "AutSesRem.instructor@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T21:59:00Z", @@ -135,8 +135,8 @@ }, "feedbackQuestions": { "questionForOpeningSession": { - "feedbackSessionName": "AutSessRem Opening Session", - "courseId": "AutSessRem.course", + "feedbackSessionName": "AutSesRem Opening Session", + "courseId": "tm.e2e.AutSesRem.course", "questionDetails": { "questionType": "TEXT", "questionText": "This question is so that opening reminders will be sent to students, as the session needs to have question for students." @@ -156,8 +156,8 @@ ] }, "questionForClosingSession": { - "feedbackSessionName": "AutSessRem Closing Session", - "courseId": "AutSessRem.course", + "feedbackSessionName": "AutSesRem Closing Session", + "courseId": "tm.e2e.AutSesRem.course", "questionDetails": { "questionType": "TEXT", "questionText": "This question is so that closing reminders will be sent to students as it is unanswered." @@ -177,8 +177,8 @@ ] }, "questionForPublishedSession": { - "feedbackSessionName": "AutSessRem Published Session", - "courseId": "AutSessRem.course", + "feedbackSessionName": "AutSesRem Published Session", + "courseId": "tm.e2e.AutSesRem.course", "questionDetails": { "questionType": "TEXT", "questionText": "This question is so that opening reminders will be sent to students, as the session needs to have question for students." diff --git a/src/e2e/resources/data/FeedbackConstSumOptionQuestionE2ETest.json b/src/e2e/resources/data/FeedbackConstSumOptionQuestionE2ETest.json index 1f6f7c7d8c9..83410ea9ecc 100644 --- a/src/e2e/resources/data/FeedbackConstSumOptionQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackConstSumOptionQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FConstSumOptionQuestionE2eT.instructor", + "googleId": "tm.e2e.FCSumOptQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FConstSumOptionQuestionE2eT.CS2104", + "id": "tm.e2e.FCSumOptQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FConstSumOptionQuestionE2eT.CS1101", + "id": "tm.e2e.FCSumOptQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FConstSumOptionQuestionE2eT.instructor", - "courseId": "FConstSumOptionQuestionE2eT.CS2104", + "googleId": "tm.e2e.FCSumOptQn.instructor", + "courseId": "tm.e2e.FCSumOptQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FConstSumOptionQuestionE2eT.instructor", - "courseId": "FConstSumOptionQuestionE2eT.CS1101", + "googleId": "tm.e2e.FCSumOptQn.instructor", + "courseId": "tm.e2e.FCSumOptQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FConstSumOptionQuestionE2eT.CS2104": { - "googleId": "FConstSumOptionQuestionE2eT.alice.tmms", + "alice.tmms@FCSumOptQn.CS2104": { + "googleId": "tm.e2e.FCSumOptQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FConstSumOptionQuestionE2eT.CS2104", + "course": "tm.e2e.FCSumOptQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FConstSumOptionQuestionE2eT.CS2104": { - "googleId": "FConstSumOptionQuestionE2eT.benny.tmms", + "benny.tmms@FCSumOptQn.CS2104": { + "googleId": "tm.e2e.FCSumOptQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FConstSumOptionQuestionE2eT.CS2104", + "course": "tm.e2e.FCSumOptQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FConstSumOptionQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FConstSumOptionQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FConstSumOptionQuestionE2eT.CS2104", + "charlie.tmms@FCSumOptQn.CS2104": { + "googleId": "tm.e2e.FCSumOptQn.charlie.tmms", + "email": "FCSumOptQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FCSumOptQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "None" }, - "danny.tmms@FConstSumOptionQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FConstSumOptionQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FConstSumOptionQuestionE2eT.CS1101", + "danny.tmms@FCSumOptQn.CS1101": { + "googleId": "tm.e2e.FCSumOptQn.danny.tmms", + "email": "FCSumOptQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FCSumOptQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FConstSumOptionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FCSumOptQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FConstSumOptionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FCSumOptQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FConstSumOptionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FCSumOptQn.CS2104", "questionDetails": { "distributeToRecipients": false, "forceUnevenDistribution": true, @@ -184,7 +184,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FConstSumOptionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FCSumOptQn.CS1101", "questionDetails": { "distributeToRecipients": false, "forceUnevenDistribution": false, diff --git a/src/e2e/resources/data/FeedbackConstSumRecipientQuestionE2ETest.json b/src/e2e/resources/data/FeedbackConstSumRecipientQuestionE2ETest.json index dd7630848b0..24af37e88a4 100644 --- a/src/e2e/resources/data/FeedbackConstSumRecipientQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackConstSumRecipientQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FConstSumRecipientQuestionE2eT.instructor", + "googleId": "tm.e2e.FCSumRcptQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FConstSumRecipientQuestionE2eT.CS2104", + "id": "tm.e2e.FCSumRcptQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FConstSumRecipientQuestionE2eT.CS1101", + "id": "tm.e2e.FCSumRcptQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FConstSumRecipientQuestionE2eT.instructor", - "courseId": "FConstSumRecipientQuestionE2eT.CS2104", + "googleId": "tm.e2e.FCSumRcptQn.instructor", + "courseId": "tm.e2e.FCSumRcptQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FConstSumRecipientQuestionE2eT.instructor", - "courseId": "FConstSumRecipientQuestionE2eT.CS1101", + "googleId": "tm.e2e.FCSumRcptQn.instructor", + "courseId": "tm.e2e.FCSumRcptQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FConstSumRecipientQuestionE2eT.CS2104": { - "googleId": "FConstSumRecipientQuestionE2eT.alice.tmms", + "alice.tmms@FCSumRcptQn.CS2104": { + "googleId": "tm.e2e.FCSumRcptQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FConstSumRecipientQuestionE2eT.CS2104", + "course": "tm.e2e.FCSumRcptQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FConstSumRecipientQuestionE2eT.CS2104": { - "googleId": "FConstSumRecipientQuestionE2eT.benny.tmms", + "benny.tmms@FCSumRcptQn.CS2104": { + "googleId": "tm.e2e.FCSumRcptQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FConstSumRecipientQuestionE2eT.CS2104", + "course": "tm.e2e.FCSumRcptQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 2", "section": "None" }, - "charlie.tmms@FConstSumRecipientQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FConstSumRecipientQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FConstSumRecipientQuestionE2eT.CS2104", + "charlie.tmms@FCSumRcptQn.CS2104": { + "googleId": "tm.e2e.FCSumRcptQn.charlie.tmms", + "email": "FCSumRcptQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FCSumRcptQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 3", "section": "None" }, - "danny.tmms@FConstSumRecipientQuestionE2eT.CS2104": { - "googleId": "danny.tmms", - "email": "FConstSumRecipientQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FConstSumRecipientQuestionE2eT.CS2104", + "danny.tmms@FCSumRcptQn.CS2104": { + "googleId": "tm.e2e.FCSumRcptQn.danny.tmms", + "email": "FCSumRcptQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FCSumRcptQn.CS2104", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 3", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FConstSumRecipientQuestionE2eT.CS2104", + "courseId": "tm.e2e.FCSumRcptQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FConstSumRecipientQuestionE2eT.CS1101", + "courseId": "tm.e2e.FCSumRcptQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FConstSumRecipientQuestionE2eT.CS2104", + "courseId": "tm.e2e.FCSumRcptQn.CS2104", "questionDetails": { "distributeToRecipients": true, "pointsPerOption": false, @@ -182,7 +182,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FConstSumRecipientQuestionE2eT.CS1101", + "courseId": "tm.e2e.FCSumRcptQn.CS1101", "questionDetails": { "numOfConstSumOptions": 0, "constSumOptions": [], diff --git a/src/e2e/resources/data/FeedbackContributionQuestionE2ETest.json b/src/e2e/resources/data/FeedbackContributionQuestionE2ETest.json index 4d9b66781e2..58568ce9643 100644 --- a/src/e2e/resources/data/FeedbackContributionQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackContributionQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FContributionQuestionE2eT.instructor", + "googleId": "tm.e2e.FContrQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FContributionQuestionE2eT.CS2104", + "id": "tm.e2e.FContrQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FContributionQuestionE2eT.CS1101", + "id": "tm.e2e.FContrQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FContributionQuestionE2eT.instructor", - "courseId": "FContributionQuestionE2eT.CS2104", + "googleId": "tm.e2e.FContrQn.instructor", + "courseId": "tm.e2e.FContrQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FContributionQuestionE2eT.instructor", - "courseId": "FContributionQuestionE2eT.CS1101", + "googleId": "tm.e2e.FContrQn.instructor", + "courseId": "tm.e2e.FContrQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FContributionQuestionE2eT.CS2104": { - "googleId": "FContributionQuestionE2eT.alice.tmms", + "alice.tmms@FContrQn.CS2104": { + "googleId": "tm.e2e.FContrQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FContributionQuestionE2eT.CS2104", + "course": "tm.e2e.FContrQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FContributionQuestionE2eT.CS2104": { - "googleId": "FContributionQuestionE2eT.benny.tmms", + "benny.tmms@FContrQn.CS2104": { + "googleId": "tm.e2e.FContrQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FContributionQuestionE2eT.CS2104", + "course": "tm.e2e.FContrQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FContributionQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FContributionQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FContributionQuestionE2eT.CS2104", + "charlie.tmms@FContrQn.CS2104": { + "googleId": "tm.e2e.FContrQn.charlie.tmms", + "email": "FContrQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FContrQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "None" }, - "danny.tmms@FContributionQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FContributionQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FContributionQuestionE2eT.CS1101", + "danny.tmms@FContrQn.CS1101": { + "googleId": "tm.e2e.FContrQn.danny.tmms", + "email": "FContrQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FContrQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FContributionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FContrQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FContributionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FContrQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FContributionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FContrQn.CS2104", "questionDetails": { "isNotSureAllowed": true, "questionType": "CONTRIB", @@ -177,7 +177,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FContributionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FContrQn.CS1101", "questionDetails": { "isNotSureAllowed": false, "questionType": "CONTRIB", diff --git a/src/e2e/resources/data/FeedbackMcqQuestionE2ETest.json b/src/e2e/resources/data/FeedbackMcqQuestionE2ETest.json index 4dbfd3bf0eb..b1792e6f438 100644 --- a/src/e2e/resources/data/FeedbackMcqQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackMcqQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FMcqQuestionE2eT.instructor", + "googleId": "tm.e2e.FMcqQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FMcqQuestionE2eT.CS2104", + "id": "tm.e2e.FMcqQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FMcqQuestionE2eT.CS1101", + "id": "tm.e2e.FMcqQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FMcqQuestionE2eT.instructor", - "courseId": "FMcqQuestionE2eT.CS2104", + "googleId": "tm.e2e.FMcqQn.instructor", + "courseId": "tm.e2e.FMcqQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FMcqQuestionE2eT.instructor", - "courseId": "FMcqQuestionE2eT.CS1101", + "googleId": "tm.e2e.FMcqQn.instructor", + "courseId": "tm.e2e.FMcqQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,10 +69,10 @@ } }, "students": { - "alice.tmms@FMcqQuestionE2eT.CS2104": { - "googleId": "FMcqQuestionE2eT.alice.tmms", + "alice.tmms@FMcqQn.CS2104": { + "googleId": "tm.e2e.FMcqQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FMcqQuestionE2eT.CS2104", + "course": "tm.e2e.FMcqQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", @@ -82,7 +82,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FMcqQuestionE2eT.CS2104", + "courseId": "tm.e2e.FMcqQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -102,7 +102,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FMcqQuestionE2eT.CS1101", + "courseId": "tm.e2e.FMcqQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -124,7 +124,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FMcqQuestionE2eT.CS2104", + "courseId": "tm.e2e.FMcqQn.CS2104", "questionDetails": { "questionType": "MCQ", "questionText": "Which area did you work on the most?", @@ -160,7 +160,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FMcqQuestionE2eT.CS1101", + "courseId": "tm.e2e.FMcqQn.CS1101", "questionDetails": { "numOfMcqChoices": 0, "mcqChoices": [], diff --git a/src/e2e/resources/data/FeedbackMsqQuestionE2ETest.json b/src/e2e/resources/data/FeedbackMsqQuestionE2ETest.json index 5404e145a4b..c28569f8fc4 100644 --- a/src/e2e/resources/data/FeedbackMsqQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackMsqQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FMsqQuestionE2eT.instructor", + "googleId": "tm.e2e.FMsqQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FMsqQuestionE2eT.CS2104", + "id": "tm.e2e.FMsqQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FMsqQuestionE2eT.CS1101", + "id": "tm.e2e.FMsqQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FMsqQuestionE2eT.instructor", - "courseId": "FMsqQuestionE2eT.CS2104", + "googleId": "tm.e2e.FMsqQn.instructor", + "courseId": "tm.e2e.FMsqQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FMsqQuestionE2eT.instructor", - "courseId": "FMsqQuestionE2eT.CS1101", + "googleId": "tm.e2e.FMsqQn.instructor", + "courseId": "tm.e2e.FMsqQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FMsqQuestionE2eT.CS2104": { - "googleId": "FMsqQuestionE2eT.alice.tmms", + "alice.tmms@FMsqQn.CS2104": { + "googleId": "tm.e2e.FMsqQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FMsqQuestionE2eT.CS2104", + "course": "tm.e2e.FMsqQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FMsqQuestionE2eT.CS2104": { - "googleId": "FMsqQuestionE2eT.benny.tmms", + "benny.tmms@FMsqQn.CS2104": { + "googleId": "tm.e2e.FMsqQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FMsqQuestionE2eT.CS2104", + "course": "tm.e2e.FMsqQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FMsqQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FMsqQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FMsqQuestionE2eT.CS2104", + "charlie.tmms@FMsqQn.CS2104": { + "googleId": "tm.e2e.FMsqQn.charlie.tmms", + "email": "FMsqQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FMsqQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 2", "section": "None" }, - "danny.tmms@FMsqQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FMsqQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FMsqQuestionE2eT.CS1101", + "danny.tmms@FMsqQn.CS1101": { + "googleId": "tm.e2e.FMsqQn.danny.tmms", + "email": "FMsqQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FMsqQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FMsqQuestionE2eT.CS2104", + "courseId": "tm.e2e.FMsqQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FMsqQuestionE2eT.CS1101", + "courseId": "tm.e2e.FMsqQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FMsqQuestionE2eT.CS2104", + "courseId": "tm.e2e.FMsqQn.CS2104", "questionDetails": { "questionType": "MSQ", "questionText": "Which area did this student work well in?", @@ -190,7 +190,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FMsqQuestionE2eT.CS1101", + "courseId": "tm.e2e.FMsqQn.CS1101", "questionDetails": { "numOfMsqChoices": 0, "msqChoices": [], diff --git a/src/e2e/resources/data/FeedbackNumScaleQuestionE2ETest.json b/src/e2e/resources/data/FeedbackNumScaleQuestionE2ETest.json index 895a7ac3260..0483c9fb085 100644 --- a/src/e2e/resources/data/FeedbackNumScaleQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackNumScaleQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FNumScaleQuestionE2eT.instructor", + "googleId": "tm.e2e.FNumScaleQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FNumScaleQuestionE2eT.CS2104", + "id": "tm.e2e.FNumScaleQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FNumScaleQuestionE2eT.CS1101", + "id": "tm.e2e.FNumScaleQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FNumScaleQuestionE2eT.instructor", - "courseId": "FNumScaleQuestionE2eT.CS2104", + "googleId": "tm.e2e.FNumScaleQn.instructor", + "courseId": "tm.e2e.FNumScaleQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FNumScaleQuestionE2eT.instructor", - "courseId": "FNumScaleQuestionE2eT.CS1101", + "googleId": "tm.e2e.FNumScaleQn.instructor", + "courseId": "tm.e2e.FNumScaleQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FNumScaleQuestionE2eT.CS2104": { - "googleId": "FNumScaleQuestionE2eT.alice.tmms", + "alice.tmms@FNumScaleQn.CS2104": { + "googleId": "tm.e2e.FNumScaleQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FNumScaleQuestionE2eT.CS2104", + "course": "tm.e2e.FNumScaleQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FNumScaleQuestionE2eT.CS2104": { - "googleId": "FNumScaleQuestionE2eT.benny.tmms", + "benny.tmms@FNumScaleQn.CS2104": { + "googleId": "tm.e2e.FNumScaleQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FNumScaleQuestionE2eT.CS2104", + "course": "tm.e2e.FNumScaleQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 2", "section": "None" }, - "charlie.tmms@FNumScaleQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FNumScaleQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FNumScaleQuestionE2eT.CS2104", + "charlie.tmms@FNumScaleQn.CS2104": { + "googleId": "tm.e2e.FNumScaleQn.charlie.tmms", + "email": "FNumScaleQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FNumScaleQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 3", "section": "None" }, - "danny.tmms@FNumScaleQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FNumScaleQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FNumScaleQuestionE2eT.CS1101", + "danny.tmms@FNumScaleQn.CS1101": { + "googleId": "tm.e2e.FNumScaleQn.danny.tmms", + "email": "FNumScaleQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FNumScaleQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FNumScaleQuestionE2eT.CS2104", + "courseId": "tm.e2e.FNumScaleQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FNumScaleQuestionE2eT.CS1101", + "courseId": "tm.e2e.FNumScaleQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FNumScaleQuestionE2eT.CS2104", + "courseId": "tm.e2e.FNumScaleQn.CS2104", "questionDetails": { "minScale": 0, "questionText": "Rate this team's product", @@ -178,7 +178,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FNumScaleQuestionE2eT.CS1101", + "courseId": "tm.e2e.FNumScaleQn.CS1101", "questionDetails": { "minScale": 1, "questionText": "Rate this team's teamwork", diff --git a/src/e2e/resources/data/FeedbackRankOptionQuestionE2ETest.json b/src/e2e/resources/data/FeedbackRankOptionQuestionE2ETest.json index e39bf0881bf..f23220e2b66 100644 --- a/src/e2e/resources/data/FeedbackRankOptionQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackRankOptionQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FRankOptionQuestionE2eT.instructor", + "googleId": "tm.e2e.FRankOptQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FRankOptionQuestionE2eT.CS2104", + "id": "tm.e2e.FRankOptQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FRankOptionQuestionE2eT.CS1101", + "id": "tm.e2e.FRankOptQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FRankOptionQuestionE2eT.instructor", - "courseId": "FRankOptionQuestionE2eT.CS2104", + "googleId": "tm.e2e.FRankOptQn.instructor", + "courseId": "tm.e2e.FRankOptQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FRankOptionQuestionE2eT.instructor", - "courseId": "FRankOptionQuestionE2eT.CS1101", + "googleId": "tm.e2e.FRankOptQn.instructor", + "courseId": "tm.e2e.FRankOptQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FRankOptionQuestionE2eT.CS2104": { - "googleId": "FRankOptionQuestionE2eT.alice.tmms", + "alice.tmms@FRankOptQn.CS2104": { + "googleId": "tm.e2e.FRankOptQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FRankOptionQuestionE2eT.CS2104", + "course": "tm.e2e.FRankOptQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FRankOptionQuestionE2eT.CS2104": { - "googleId": "FRankOptionQuestionE2eT.benny.tmms", + "benny.tmms@FRankOptQn.CS2104": { + "googleId": "tm.e2e.FRankOptQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FRankOptionQuestionE2eT.CS2104", + "course": "tm.e2e.FRankOptQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FRankOptionQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FRankOptionQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FRankOptionQuestionE2eT.CS2104", + "charlie.tmms@FRankOptQn.CS2104": { + "googleId": "tm.e2e.FRankOptQn.charlie.tmms", + "email": "FRankOptQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FRankOptQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "None" }, - "danny.tmms@FRankOptionQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FRankOptionQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FRankOptionQuestionE2eT.CS1101", + "danny.tmms@FRankOptQn.CS1101": { + "googleId": "tm.e2e.FRankOptQn.danny.tmms", + "email": "FRankOptQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FRankOptQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FRankOptionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRankOptQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FRankOptionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRankOptQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FRankOptionQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRankOptQn.CS2104", "questionDetails": { "areDuplicatesAllowed": false, "questionText": "As a student, rank for every teammate, the areas of improvement that they should work on", @@ -183,7 +183,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FRankOptionQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRankOptQn.CS1101", "questionDetails": { "areDuplicatesAllowed": true, "questionText": "As an student, rank for every team, the areas of improvement that they should work on", diff --git a/src/e2e/resources/data/FeedbackRankRecipientQuestionE2ETest.json b/src/e2e/resources/data/FeedbackRankRecipientQuestionE2ETest.json index ffbc8822766..cd079a08699 100644 --- a/src/e2e/resources/data/FeedbackRankRecipientQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackRankRecipientQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FRankRecipientQuestionE2eT.instructor", + "googleId": "tm.e2e.FRankRcptQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FRankRecipientQuestionE2eT.CS2104", + "id": "tm.e2e.FRankRcptQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FRankRecipientQuestionE2eT.CS1101", + "id": "tm.e2e.FRankRcptQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FRankRecipientQuestionE2eT.instructor", - "courseId": "FRankRecipientQuestionE2eT.CS2104", + "googleId": "tm.e2e.FRankRcptQn.instructor", + "courseId": "tm.e2e.FRankRcptQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FRankRecipientQuestionE2eT.instructor2", - "courseId": "FRankRecipientQuestionE2eT.CS2104", + "googleId": "tm.e2e.FRankRcptQn.instructor2", + "courseId": "tm.e2e.FRankRcptQn.CS2104", "name": "Teammates Test 2", "email": "tmms.tes2t@gmail.tmt", "role": "Co-owner", @@ -68,8 +68,8 @@ } }, "instructor3": { - "googleId": "FRankRecipientQuestionE2eT.instructor", - "courseId": "FRankRecipientQuestionE2eT.CS1101", + "googleId": "tm.e2e.FRankRcptQn.instructor", + "courseId": "tm.e2e.FRankRcptQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -92,37 +92,37 @@ } }, "students": { - "alice.tmms@FRankRecipientQuestionE2eT.CS2104": { - "googleId": "FRankRecipientQuestionE2eT.alice.tmms", + "alice.tmms@FRankRcptQn.CS2104": { + "googleId": "tm.e2e.FRankRcptQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FRankRecipientQuestionE2eT.CS2104", + "course": "tm.e2e.FRankRcptQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FRankRecipientQuestionE2eT.CS2104": { - "googleId": "FRankRecipientQuestionE2eT.benny.tmms", + "benny.tmms@FRankRcptQn.CS2104": { + "googleId": "tm.e2e.FRankRcptQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FRankRecipientQuestionE2eT.CS2104", + "course": "tm.e2e.FRankRcptQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FRankRecipientQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FRankRecipientQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FRankRecipientQuestionE2eT.CS2104", + "charlie.tmms@FRankRcptQn.CS2104": { + "googleId": "tm.e2e.FRankRcptQn.charlie.tmms", + "email": "FRankRcptQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FRankRcptQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "None" }, - "danny.tmms@FRankRecipientQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FRankRecipientQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FRankRecipientQuestionE2eT.CS1101", + "danny.tmms@FRankRcptQn.CS1101": { + "googleId": "tm.e2e.FRankRcptQn.danny.tmms", + "email": "FRankRcptQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FRankRcptQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -132,7 +132,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FRankRecipientQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRankRcptQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -152,7 +152,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FRankRecipientQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRankRcptQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -174,7 +174,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FRankRecipientQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRankRcptQn.CS2104", "questionDetails": { "areDuplicatesAllowed": true, "questionType": "RANK_RECIPIENTS", @@ -200,7 +200,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FRankRecipientQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRankRcptQn.CS1101", "questionDetails": { "areDuplicatesAllowed": false, "questionType": "RANK_RECIPIENTS", diff --git a/src/e2e/resources/data/FeedbackRubricQuestionE2ETest.json b/src/e2e/resources/data/FeedbackRubricQuestionE2ETest.json index 23305e42472..51bb85da02d 100644 --- a/src/e2e/resources/data/FeedbackRubricQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackRubricQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FRubricQuestionE2eT.instructor", + "googleId": "tm.e2e.FRubricQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FRubricQuestionE2eT.CS2104", + "id": "tm.e2e.FRubricQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FRubricQuestionE2eT.CS1101", + "id": "tm.e2e.FRubricQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FRubricQuestionE2eT.instructor", - "courseId": "FRubricQuestionE2eT.CS2104", + "googleId": "tm.e2e.FRubricQn.instructor", + "courseId": "tm.e2e.FRubricQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FRubricQuestionE2eT.instructor", - "courseId": "FRubricQuestionE2eT.CS1101", + "googleId": "tm.e2e.FRubricQn.instructor", + "courseId": "tm.e2e.FRubricQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -69,37 +69,37 @@ } }, "students": { - "alice.tmms@FRubricQuestionE2eT.CS2104": { - "googleId": "FRubricQuestionE2eT.alice.tmms", + "alice.tmms@FRubricQn.CS2104": { + "googleId": "tm.e2e.FRubricQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FRubricQuestionE2eT.CS2104", + "course": "tm.e2e.FRubricQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@FRubricQuestionE2eT.CS2104": { - "googleId": "FRubricQuestionE2eT.benny.tmms", + "benny.tmms@FRubricQn.CS2104": { + "googleId": "tm.e2e.FRubricQn.benny.tmms", "email": "benny.tmms@gmail.tmt", - "course": "FRubricQuestionE2eT.CS2104", + "course": "tm.e2e.FRubricQn.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, - "charlie.tmms@FRubricQuestionE2eT.CS2104": { - "googleId": "charlie.tmms", - "email": "FRubricQuestionE2eT.charlie.tmms@gmail.tmt", - "course": "FRubricQuestionE2eT.CS2104", + "charlie.tmms@FRubricQn.CS2104": { + "googleId": "tm.e2e.FRubricQn.charlie.tmms", + "email": "FRubricQn.charlie.tmms@gmail.tmt", + "course": "tm.e2e.FRubricQn.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "None" }, - "danny.tmms@FRubricQuestionE2eT.CS1101": { - "googleId": "danny.tmms", - "email": "FRubricQuestionE2eT.danny.tmms@gmail.tmt", - "course": "FRubricQuestionE2eT.CS1101", + "danny.tmms@FRubricQn.CS1101": { + "googleId": "tm.e2e.FRubricQn.danny.tmms", + "email": "FRubricQn.danny.tmms@gmail.tmt", + "course": "tm.e2e.FRubricQn.CS1101", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", @@ -109,7 +109,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FRubricQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRubricQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -129,7 +129,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FRubricQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRubricQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -151,7 +151,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FRubricQuestionE2eT.CS2104", + "courseId": "tm.e2e.FRubricQn.CS2104", "questionDetails": { "rubricSubQuestions": [ "This student has done a good job.", @@ -206,7 +206,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FRubricQuestionE2eT.CS1101", + "courseId": "tm.e2e.FRubricQn.CS1101", "questionDetails": { "rubricSubQuestions": [ "The content of the class was interesting.", diff --git a/src/e2e/resources/data/FeedbackSubmitPageE2ETest.json b/src/e2e/resources/data/FeedbackSubmitPageE2ETest.json index 348bb818f03..6c9622e5f37 100644 --- a/src/e2e/resources/data/FeedbackSubmitPageE2ETest.json +++ b/src/e2e/resources/data/FeedbackSubmitPageE2ETest.json @@ -1,61 +1,61 @@ { "accounts": { - "SFSubmitE2eT.instr": { - "googleId": "SFSubmitE2eT.instr", + "FSubmit.instr": { + "googleId": "tm.e2e.FSubmit.instr", "name": "Teammates Test", "isInstructor": true, - "email": "SFSubmitE2eT.instr@gmail.tmt", + "email": "FSubmit.instr@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "SFSubmitE2eT.instr2": { - "googleId": "SFSubmitE2eT.instr2", + "FSubmit.instr2": { + "googleId": "tm.e2e.FSubmit.instr2", "name": "Teammates Test2", "isInstructor": true, - "email": "SFSubmitE2eT.instr2@gmail.tmt", + "email": "FSubmit.instr2@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "SFResultsUiT.alice.b": { - "googleId": "SFSubmitE2eT.alice.b", + "FSubmit.alice.b": { + "googleId": "tm.e2e.FSubmit.alice.b", "name": "Alice B.", "isInstructor": false, - "email": "SFSubmitE2eT.alice.b@gmail.tmt", + "email": "FSubmit.alice.b@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "SFSubmitE2eT.charlie.d": { - "googleId": "SFSubmitE2eT.charlie.d", + "FSubmit.charlie.d": { + "googleId": "tm.e2e.FSubmit.charlie.d", "name": "Charlie D.", "isInstructor": false, - "email": "SFSubmitE2eT.charlie.d@gmail.tmt", + "email": "FSubmit.charlie.d@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "SFSubmitE2eT.danny.e": { - "googleId": "SFSubmitE2eT.danny.e", + "FSubmit.danny.e": { + "googleId": "tm.e2e.FSubmit.danny.e", "name": "Danny E.", "isInstructor": false, - "email": "SFSubmitE2eT.danny.e@gmail.tmt", + "email": "FSubmit.danny.e@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "SFSubmitE2eT.emily.f": { - "googleId": "SFSubmitE2eT.emily.f", + "FSubmit.emily.f": { + "googleId": "tm.e2e.FSubmit.emily.f", "name": "Emily F.", "isInstructor": false, - "email": "SFSubmitE2eT.emily.f@gmail.tmt", + "email": "FSubmit.emily.f@gmail.tmt", "institute": "TEAMMATES Test Institute 1" } }, "courses": { - "SFSubmitE2eT.CS2104": { - "id": "SFSubmitE2eT.CS2104", + "FSubmit.CS2104": { + "id": "tm.e2e.FSubmit.CS2104", "name": "Programming Language Concepts", "timeZone": "UTC" } }, "instructors": { - "SFSubmitE2eT.instr": { - "googleId": "SFSubmitE2eT.instr", - "courseId": "SFSubmitE2eT.CS2104", + "FSubmit.instr": { + "googleId": "tm.e2e.FSubmit.instr", + "courseId": "tm.e2e.FSubmit.CS2104", "name": "Teammates Test", - "email": "SFSubmitE2eT.instr@gmail.tmt", + "email": "FSubmit.instr@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -74,11 +74,11 @@ "sessionLevel": {} } }, - "SFSubmitE2eT.instr2": { - "googleId": "SFSubmitE2eT.instr2", - "courseId": "SFSubmitE2eT.CS2104", + "FSubmit.instr2": { + "googleId": "tm.e2e.FSubmit.instr2", + "courseId": "tm.e2e.FSubmit.CS2104", "name": "Teammates Test2", - "email": "SFSubmitE2eT.instr2@gmail.tmt", + "email": "FSubmit.instr2@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -100,45 +100,45 @@ }, "students": { "Alice": { - "googleId": "SFSubmitE2eT.alice.b", - "email": "SFSubmitE2eT.alice.b@gmail.tmt", - "course": "SFSubmitE2eT.CS2104", + "googleId": "tm.e2e.FSubmit.alice.b", + "email": "FSubmit.alice.b@gmail.tmt", + "course": "tm.e2e.FSubmit.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, "Benny": { - "googleId": "SFSubmitE2eT.benny.c", - "email": "SFSubmitE2eT.benny.c@gmail.tmt", - "course": "SFSubmitE2eT.CS2104", + "googleId": "tm.e2e.FSubmit.benny.c", + "email": "FSubmit.benny.c@gmail.tmt", + "course": "tm.e2e.FSubmit.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 1", "section": "None" }, "Charlie": { - "googleId": "SFSubmitE2eT.charlie.d", - "email": "SFSubmitE2eT.charlie.d@gmail.tmt", - "course": "SFSubmitE2eT.CS2104", + "googleId": "tm.e2e.FSubmit.charlie.d", + "email": "FSubmit.charlie.d@gmail.tmt", + "course": "tm.e2e.FSubmit.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 2", "section": "None" }, "Danny": { - "googleId": "SFSubmitE2eT.danny.e", - "email": "SFSubmitE2eT.danny.e@gmail.tmt", - "course": "SFSubmitE2eT.CS2104", + "googleId": "tm.e2e.FSubmit.danny.e", + "email": "FSubmit.danny.e@gmail.tmt", + "course": "tm.e2e.FSubmit.CS2104", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", "section": "None" }, "Emily": { - "googleId": "SFSubmitE2eT.emily.f", - "email": "SFSubmitE2eT.emily.f@gmail.tmt", - "course": "SFSubmitE2eT.CS2104", + "googleId": "tm.e2e.FSubmit.emily.f", + "email": "FSubmit.emily.f@gmail.tmt", + "course": "tm.e2e.FSubmit.CS2104", "name": "Emily", "comments": "This student's name is Emily", "team": "Team 3", @@ -148,8 +148,8 @@ "feedbackSessions": { "Open Session": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", - "creatorEmail": "SFSubmitE2eT.instr@gmail.tmt", + "courseId": "tm.e2e.FSubmit.CS2104", + "creatorEmail": "FSubmit.instr@gmail.tmt", "instructions": "Instructions for first session", "createdTime": "2012-04-01T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -168,8 +168,8 @@ }, "Grace Period Session": { "feedbackSessionName": "Grace Period Session", - "courseId": "SFSubmitE2eT.CS2104", - "creatorEmail": "SFSubmitE2eT.instr@gmail.tmt", + "courseId": "tm.e2e.FSubmit.CS2104", + "creatorEmail": "FSubmit.instr@gmail.tmt", "instructions": "This going to be a grace period session", "createdTime": "2012-04-01T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -188,8 +188,8 @@ }, "Closed Session": { "feedbackSessionName": "Closed Session", - "courseId": "SFSubmitE2eT.CS2104", - "creatorEmail": "SFSubmitE2eT.instr@gmail.tmt", + "courseId": "tm.e2e.FSubmit.CS2104", + "creatorEmail": "FSubmit.instr@gmail.tmt", "instructions": "This going to be a closed session", "createdTime": "2012-04-01T23:59:00Z", "startTime": "2012-04-02T15:59:00Z", @@ -210,7 +210,7 @@ "feedbackQuestions": { "qn1InSession1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Rate 3 other students' products" @@ -236,7 +236,7 @@ }, "qn2InSession1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Provide feedback on each instructor" @@ -262,7 +262,7 @@ }, "qn3InSession1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Give feedback to your team mates" @@ -283,7 +283,7 @@ }, "qn4InSession1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "numOfMcqChoices": 2, "mcqChoices": [ @@ -310,7 +310,7 @@ }, "qn5InSession1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "This question should be hidden." @@ -331,7 +331,7 @@ }, "qn1InGracePeriodSession": { "feedbackSessionName": "Grace Period Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "numOfMcqChoices": 2, "mcqChoices": [ @@ -361,7 +361,7 @@ }, "qn2InGracePeriodSession": { "feedbackSessionName": "Grace Period Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "numOfMcqChoices": 0, "questionText": "Which instructor do you think is the most engaging", @@ -385,7 +385,7 @@ }, "qn1InClosedSession": { "feedbackSessionName": "Closed Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "What is the best selling point of your product?" @@ -412,10 +412,10 @@ "feedbackResponses": { "response1": { "feedbackSessionName": "First Session", - "courseId": "SFSubmitE2eT.CS2104", + "courseId": "tm.e2e.FSubmit.CS2104", "feedbackQuestionId": "1", - "giver": "SFSubmitE2eT.benny.c@gmail.tmt", - "recipient": "SFSubmitE2eT.alice.b@gmail.tmt", + "giver": "FSubmit.benny.c@gmail.tmt", + "recipient": "FSubmit.alice.b@gmail.tmt", "giverSection": "None", "recipientSection": "None", "responseDetails": { diff --git a/src/e2e/resources/data/FeedbackTextQuestionE2ETest.json b/src/e2e/resources/data/FeedbackTextQuestionE2ETest.json index d85306baf84..bf8cfcc279e 100644 --- a/src/e2e/resources/data/FeedbackTextQuestionE2ETest.json +++ b/src/e2e/resources/data/FeedbackTextQuestionE2ETest.json @@ -1,7 +1,7 @@ { "accounts": { "instructorWithSessions": { - "googleId": "FTextQuestionE2eT.instructor", + "googleId": "tm.e2e.FTextQn.instructor", "name": "Teammates Test", "isInstructor": true, "email": "tmms.test@gmail.tmt", @@ -10,20 +10,20 @@ }, "courses": { "course": { - "id": "FTextQuestionE2eT.CS2104", + "id": "tm.e2e.FTextQn.CS2104", "name": "Programming Language Concepts", "timeZone": "Africa/Johannesburg" }, "course2": { - "id": "FTextQuestionE2eT.CS1101", + "id": "tm.e2e.FTextQn.CS1101", "name": "Programming Methodology", "timeZone": "Africa/Johannesburg" } }, "instructors": { "instructor": { - "googleId": "FTextQuestionE2eT.instructor", - "courseId": "FTextQuestionE2eT.CS2104", + "googleId": "tm.e2e.FTextQn.instructor", + "courseId": "tm.e2e.FTextQn.CS2104", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -45,8 +45,8 @@ } }, "instructor2": { - "googleId": "FTextQuestionE2eT.instructor2", - "courseId": "FTextQuestionE2eT.CS2104", + "googleId": "tm.e2e.FTextQn.instructor2", + "courseId": "tm.e2e.FTextQn.CS2104", "name": "Teammates Test 2", "email": "tmms.test2@gmail.tmt", "role": "Co-owner", @@ -68,8 +68,8 @@ } }, "instructor3": { - "googleId": "FTextQuestionE2eT.instructor", - "courseId": "FTextQuestionE2eT.CS1101", + "googleId": "tm.e2e.FTextQn.instructor", + "courseId": "tm.e2e.FTextQn.CS1101", "name": "Teammates Test", "email": "tmms.test@gmail.tmt", "role": "Co-owner", @@ -92,10 +92,10 @@ } }, "students": { - "alice.tmms@FTextQuestionE2eT.CS2104": { - "googleId": "FTextQuestionE2eT.alice.tmms", + "alice.tmms@FTextQn.CS2104": { + "googleId": "tm.e2e.FTextQn.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "FTextQuestionE2eT.CS2104", + "course": "tm.e2e.FTextQn.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", @@ -105,7 +105,7 @@ "feedbackSessions": { "openSession": { "feedbackSessionName": "First Session", - "courseId": "FTextQuestionE2eT.CS2104", + "courseId": "tm.e2e.FTextQn.CS2104", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for first session

", "createdTime": "2012-04-01T23:59:00Z", @@ -125,7 +125,7 @@ }, "openSession2": { "feedbackSessionName": "Second Session", - "courseId": "FTextQuestionE2eT.CS1101", + "courseId": "tm.e2e.FTextQn.CS1101", "creatorEmail": "tmms.test@gmail.tmt", "instructions": "

Instructions for Second session

", "createdTime": "2012-04-01T23:59:00Z", @@ -147,7 +147,7 @@ "feedbackQuestions": { "qn1ForFirstSession": { "feedbackSessionName": "First Session", - "courseId": "FTextQuestionE2eT.CS2104", + "courseId": "tm.e2e.FTextQn.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "What did this instructor do well?", @@ -170,7 +170,7 @@ }, "qn1ForSecondSession": { "feedbackSessionName": "Second Session", - "courseId": "FTextQuestionE2eT.CS1101", + "courseId": "tm.e2e.FTextQn.CS1101", "questionDetails": { "questionType": "TEXT", "questionText": "How can this instructor improve?", diff --git a/src/e2e/resources/data/InstructorCourseDetailsPageE2ETest.json b/src/e2e/resources/data/InstructorCourseDetailsPageE2ETest.json index 3bb8ae8fd34..bb8c494c281 100644 --- a/src/e2e/resources/data/InstructorCourseDetailsPageE2ETest.json +++ b/src/e2e/resources/data/InstructorCourseDetailsPageE2ETest.json @@ -1,28 +1,28 @@ { "accounts": { - "ICDetailsE2eT.instr": { - "googleId": "ICDetailsE2eT.instr", + "ICDet.instr": { + "googleId": "tm.e2e.ICDet.instr", "name": "Teammates Test", "isInstructor": true, - "email": "ICDetailsE2eT.instr@gmail.tmt", + "email": "ICDet.instr@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "ICDetailsE2eT.instr2": { - "googleId": "ICDetailsE2eT.instr2", + "ICDet.instr2": { + "googleId": "tm.e2e.ICDet.instr2", "name": "Teammates Test 2", "isInstructor": true, - "email": "ICDetailsE2eT.instr2@gmail.tmt", + "email": "ICDet.instr2@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, "Alice": { - "googleId": "ICDetailsE2eT.alice.b", + "googleId": "tm.e2e.ICDet.alice.b", "name": "Alice Betsy", "isInstructor": false, "email": "alice.b.tmms@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, "Danny": { - "googleId": "ICDetailsE2eT.danny.e", + "googleId": "tm.e2e.ICDet.danny.e", "name": "Charlie Davis", "isInstructor": false, "email": "danny.e.tmms@gmail.tmt", @@ -30,18 +30,18 @@ } }, "courses": { - "ICDetailsE2eT.CS2104": { - "id": "ICDetailsE2eT.CS2104", + "ICDet.CS2104": { + "id": "tm.e2e.ICDet.CS2104", "name": "Programming Language Concepts", "timeZone": "UTC" } }, "instructors": { - "ICDetailsE2eT.instr": { - "googleId": "ICDetailsE2eT.instr", - "courseId": "ICDetailsE2eT.CS2104", + "ICDet.instr": { + "googleId": "tm.e2e.ICDet.instr", + "courseId": "tm.e2e.ICDet.CS2104", "name": "Teammates Test", - "email": "ICDetailsE2eT.instr@gmail.tmt", + "email": "ICDet.instr@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -60,11 +60,11 @@ "sessionLevel": {} } }, - "ICDetailsE2eT.instr2": { - "googleId": "ICDetailsE2eT.instr2", - "courseId": "ICDetailsE2eT.CS2104", + "ICDet.instr2": { + "googleId": "tm.e2e.ICDet.instr2", + "courseId": "tm.e2e.ICDet.CS2104", "name": "Teammates Test 2", - "email": "ICDetailsE2eT.instr2@gmail.tmt", + "email": "ICDet.instr2@gmail.tmt", "role": "Tutor", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -85,37 +85,37 @@ } }, "students": { - "alice.tmms@ICDetailsE2eT.CS2104": { - "googleId": "ICDetailsE2eT.alice.b", + "alice.tmms@ICDet.CS2104": { + "googleId": "tm.e2e.ICDet.alice.b", "email": "alice.b.tmms@gmail.tmt", - "course": "ICDetailsE2eT.CS2104", + "course": "tm.e2e.ICDet.CS2104", "name": "Alice Betsy", "comments": "This student's name is Alice Betsy", "team": "Team 1", "section": "None" }, - "benny.tmms@ICDetailsE2eT.CS2104": { + "benny.tmms@ICDet.CS2104": { "googleId": "", "email": "benny.c.tmms@gmail.tmt", - "course": "ICDetailsE2eT.CS2104", + "course": "tm.e2e.ICDet.CS2104", "name": "Benny Charles", "comments": "This student's name is Benny Charles", "team": "Team 2", "section": "None" }, - "charlie.tmms@ICDetailsE2eT.CS2104": { + "charlie.tmms@ICDet.CS2104": { "googleId": "", "email": "charlie.d.tmms@gmail.tmt", - "course": "ICDetailsE2eT.CS2104", + "course": "tm.e2e.ICDet.CS2104", "name": "Charlie Davis", "comments": "This student's name is Charlie Davis", "team": "Team 1", "section": "Section 1" }, - "danny.tmms@ICDetailsE2eT.CS2104": { - "googleId": "ICDetailsE2eT.danny.e", + "danny.tmms@ICDet.CS2104": { + "googleId": "tm.e2e.ICDet.danny.e", "email": "danny.e.tmms@gmail.tmt", - "course": "ICDetailsE2eT.CS2104", + "course": "tm.e2e.ICDet.CS2104", "name": "Danny Engrid", "comments": "This student's name is Danny Engrid", "team": "Team 2", diff --git a/src/e2e/resources/data/InstructorCourseEditPageE2ETest.json b/src/e2e/resources/data/InstructorCourseEditPageE2ETest.json index a3bc7d3bb23..5ebc9f16b0e 100644 --- a/src/e2e/resources/data/InstructorCourseEditPageE2ETest.json +++ b/src/e2e/resources/data/InstructorCourseEditPageE2ETest.json @@ -1,33 +1,33 @@ { "accounts": { - "InsCrsEdit.coowner": { - "googleId": "InsCrsEdit.coowner", + "ICEdit.coowner": { + "googleId": "tm.e2e.ICEdit.coowner", "name": "Teammates Test", "isInstructor": true, - "email": "InsCrsEdit.coowner@gmail.tmt", + "email": "ICEdit.coowner@gmail.tmt", "institute": "TEAMMATES Test Institute 1" }, - "InsCrsEdit.observer": { - "googleId": "InsCrsEdit.observer", + "ICEdit.observer": { + "googleId": "tm.e2e.ICEdit.observer", "name": "Teammates Instructor", "isInstructor": true, - "email": "InsCrsEdit.observer@gmail.tmt", + "email": "ICEdit.observer@gmail.tmt", "institute": "TEAMMATES Test Institute 1" } }, "courses": { - "InsCrsEdit.CS2104": { - "id": "InsCrsEdit.CS2104", + "ICEdit.CS2104": { + "id": "tm.e2e.ICEdit.CS2104", "name": "Programming Language Concepts", "timeZone": "UTC" } }, "instructors": { - "InsCrsEdit.coowner": { - "googleId": "InsCrsEdit.coowner", - "courseId": "InsCrsEdit.CS2104", + "ICEdit.coowner": { + "googleId": "tm.e2e.ICEdit.coowner", + "courseId": "tm.e2e.ICEdit.CS2104", "name": "Teammates Test", - "email": "InsCrsEdit.coowner@gmail.tmt", + "email": "ICEdit.coowner@gmail.tmt", "role": "Co-owner", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -46,11 +46,11 @@ "sessionLevel": {} } }, - "InsCrsEdit.manager": { - "googleId": "InsCrsEdit.manager", - "courseId": "InsCrsEdit.CS2104", + "ICEdit.manager": { + "googleId": "tm.e2e.ICEdit.manager", + "courseId": "tm.e2e.ICEdit.CS2104", "name": "Teammates Manager", - "email": "InsCrsEdit.manager@gmail.tmt", + "email": "ICEdit.manager@gmail.tmt", "role": "Manager", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -69,11 +69,11 @@ "sessionLevel": {} } }, - "InsCrsEdit.observer": { - "googleId": "InsCrsEdit.observer", - "courseId": "InsCrsEdit.CS2104", + "ICEdit.observer": { + "googleId": "tm.e2e.ICEdit.observer", + "courseId": "tm.e2e.ICEdit.CS2104", "name": "Teammates Observer", - "email": "InsCrsEdit.observer@gmail.tmt", + "email": "ICEdit.observer@gmail.tmt", "role": "Observer", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -92,11 +92,11 @@ "sessionLevel": {} } }, - "InsCrsEdit.tutor": { - "googleId": "InsCrsEdit.tutor", - "courseId": "InsCrsEdit.CS2104", + "ICEdit.tutor": { + "googleId": "tm.e2e.ICEdit.tutor", + "courseId": "tm.e2e.ICEdit.CS2104", "name": "Teammates Tutor", - "email": "InsCrsEdit.tutor@gmail.tmt", + "email": "ICEdit.tutor@gmail.tmt", "role": "Tutor", "isDisplayedToStudents": false, "displayedName": "Instructor", @@ -115,12 +115,11 @@ "sessionLevel": {} } }, - "InsCrsEdit.helper": { - "googleId": "InsCrsEdit.helper", - "courseId": "InsCrsEdit.CS2104", + "ICEdit.helper": { + "googleId": "tm.e2e.ICEdit.helper", + "courseId": "tm.e2e.ICEdit.CS2104", "name": "Teammates Helper", - "email": "InsCrsEdit.helper@gmail.tmt", - "key": "InsCrsEdit.helper@gmail.tmt%InsCrsEdit.CS2104", + "email": "ICEdit.helper@gmail.tmt", "role": "Custom", "isDisplayedToStudents": true, "displayedName": "Instructor", @@ -141,28 +140,28 @@ } }, "students": { - "alice.tmms@InsCrsEdit.CS2104": { - "googleId": "InsCrsEdit.alice.tmms", + "alice.tmms@ICEdit.CS2104": { + "googleId": "tm.e2e.ICEdit.alice.tmms", "email": "alice.b.tmms@gmail.tmt", - "course": "InsCrsEdit.CS2104", + "course": "tm.e2e.ICEdit.CS2104", "name": "Alice Betsy'\"", "comments": "This student's name is Alice Betsy", "team": "Team 1'\"", "comments": "This student's name is Amy Betsy'\"", "team": "Team 1'\"", "section": "None" }, - "SHomeUiT.student@SHomeUiT.CS1101": { - "googleId": "SHomeUiT.student", - "email": "SHomeUiT.student@gmail.tmt", - "course": "SHomeUiT.CS1101", + "SHome.student@SHome.CS1101": { + "googleId": "tm.e2e.SHome.student", + "email": "SHome.student@gmail.tmt", + "course": "tm.e2e.SHome.CS1101", "name": "Amy Betsy'\"", "comments": "This student's name is Amy Betsy'\"", "team": "Team 1'\"", "section": "None" }, - "SHomeUiT.student@SHomeUiT.CS4215": { - "googleId": "SHomeUiT.student", - "email": "SHomeUiT.student@gmail.tmt", - "course": "SHomeUiT.CS4215", + "SHome.student@SHome.CS4215": { + "googleId": "tm.e2e.SHome.student", + "email": "SHome.student@gmail.tmt", + "course": "tm.e2e.SHome.CS4215", "name": "Amy Betsy'\"", "comments": "This student's name is Amy Betsy'\"", "team": "Team 1'\"", "section": "None" }, - "SHomeUiT.student@SHomeUiT.CS4221": { - "googleId": "SHomeUiT.student", - "email": "SHomeUiT.student@gmail.tmt", - "course": "SHomeUiT.CS4221", + "SHome.student@SHome.CS4221": { + "googleId": "tm.e2e.SHome.student", + "email": "SHome.student@gmail.tmt", + "course": "tm.e2e.SHome.CS4221", "name": "Amy Betsy", "comments": "This student's name is Amy Betsy", "team": "Team 1'\"", @@ -170,10 +170,10 @@ } }, "feedbackSessions": { - "SHomeUiT.CS2104:First Feedback Session": { + "SHome.CS2104:First Feedback Session": { "feedbackSessionName": "First Feedback Session", - "courseId": "SHomeUiT.CS2104", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS2104", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -190,10 +190,10 @@ "isClosingEmailEnabled": true, "isPublishedEmailEnabled": true }, - "SHomeUiT.CS2104:Graced Feedback Session": { + "SHome.CS2104:Graced Feedback Session": { "feedbackSessionName": "Graced Feedback Session", - "courseId": "SHomeUiT.CS2104", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS2104", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -210,10 +210,10 @@ "isClosingEmailEnabled": true, "isPublishedEmailEnabled": true }, - "SHomeUiT.CS2104:No Question Feedback Session": { + "SHome.CS2104:No Question Feedback Session": { "feedbackSessionName": "No Question Feedback Session", - "courseId": "SHomeUiT.CS2104", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS2104", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -230,10 +230,10 @@ "isClosingEmailEnabled": true, "isPublishedEmailEnabled": true }, - "SHomeUiT.CS2104:Future Feedback Session": { + "SHome.CS2104:Future Feedback Session": { "feedbackSessionName": "Future Feedback Session", - "courseId": "SHomeUiT.CS2104", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS2104", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2034-04-01T15:59:00Z", @@ -250,10 +250,10 @@ "isClosingEmailEnabled": true, "isPublishedEmailEnabled": true }, - "SHomeUiT.CS2104:Closed Feedback Session": { + "SHome.CS2104:Closed Feedback Session": { "feedbackSessionName": "Closed Feedback Session", - "courseId": "SHomeUiT.CS2104", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS2104", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -270,10 +270,10 @@ "isClosingEmailEnabled": true, "isPublishedEmailEnabled": true }, - "SHomeUiT.CS4221:Session with no Student Questions": { + "SHome.CS4221:Session with no Student Questions": { "feedbackSessionName": "Session without Student Questions", - "courseId": "SHomeUiT.CS4221", - "creatorEmail": "SHomeUiT.instr@gmail.tmt", + "courseId": "tm.e2e.SHome.CS4221", + "creatorEmail": "SHome.instr@gmail.tmt", "instructions": "Please please fill in the following questions.", "createdTime": "2012-03-20T23:59:00Z", "startTime": "2012-04-01T15:59:00Z", @@ -292,9 +292,9 @@ } }, "feedbackQuestions": { - "SHomeUiT.CS2104:First Feedback Session:Q1": { + "SHome.CS2104:First Feedback Session:Q1": { "feedbackSessionName": "First Feedback Session", - "courseId": "SHomeUiT.CS2104", + "courseId": "tm.e2e.SHome.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Rate 5 other students' products" @@ -315,9 +315,9 @@ "RECEIVER" ] }, - "SHomeUiT.CS2104:Graced Feedback Session:Q1": { + "SHome.CS2104:Graced Feedback Session:Q1": { "feedbackSessionName": "Graced Feedback Session", - "courseId": "SHomeUiT.CS2104", + "courseId": "tm.e2e.SHome.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Rate 5 other students' products" @@ -338,9 +338,9 @@ "RECEIVER" ] }, - "SHomeUiT.CS2104:Future Feedback Session:Q1": { + "SHome.CS2104:Future Feedback Session:Q1": { "feedbackSessionName": "Future Feedback Session", - "courseId": "SHomeUiT.CS2104", + "courseId": "tm.e2e.SHome.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Rate 5 other students' products" @@ -361,9 +361,9 @@ "RECEIVER" ] }, - "SHomeUiT.CS2104:Closed Feedback Session:Q1": { + "SHome.CS2104:Closed Feedback Session:Q1": { "feedbackSessionName": "Closed Feedback Session", - "courseId": "SHomeUiT.CS2104", + "courseId": "tm.e2e.SHome.CS2104", "questionDetails": { "questionType": "TEXT", "questionText": "Rate 5 other students' products" @@ -384,9 +384,9 @@ "RECEIVER" ] }, - "SHomeUiT.CS4221:Feedback Session without Student Questions:Q1": { + "SHome.CS4221:Feedback Session without Student Questions:Q1": { "feedbackSessionName": "Session without Student Questions", - "courseId": "SHomeUiT.CS4221", + "courseId": "tm.e2e.SHome.CS4221", "questionDetails": { "questionType": "TEXT", "questionText": "This is a session without questions for students" diff --git a/src/e2e/resources/data/StudentProfilePageE2ETest.json b/src/e2e/resources/data/StudentProfilePageE2ETest.json index 3dd3b7d63d5..e8254f5d344 100644 --- a/src/e2e/resources/data/StudentProfilePageE2ETest.json +++ b/src/e2e/resources/data/StudentProfilePageE2ETest.json @@ -1,16 +1,16 @@ { "accounts": { "studentWithExistingProfile": { - "googleId": "SProfUiT.student", + "googleId": "tm.e2e.SProf.student", "name": "Benny C", "isInstructor": false, - "email": "SProfUiT.student@gmail.tmt", + "email": "SProf.student@gmail.tmt", "institute": "TEAMMATES Test Institute 7" } }, "courses": { - "SProfUiT.CS2104": { - "id": "SProfUiT.CS2104", + "SProf.CS2104": { + "id": "tm.e2e.SProf.CS2104", "name": "Programming Language Concepts", "timeZone": "UTC" } @@ -18,9 +18,9 @@ "instructors": {}, "students": { "studentWithExistingProfile": { - "googleId": "SProfUiT.student", - "email": "SProfUiT.student@gmail.tmt", - "course": "SProfUiT.CS2104", + "googleId": "tm.e2e.SProf.student", + "email": "SProf.student@gmail.tmt", + "course": "tm.e2e.SProf.CS2104", "name": "Benny C", "comments": "This student's name is BC", "team": "Team 1", @@ -33,7 +33,7 @@ "feedbackResponseComments": {}, "profiles": { "studentWithExistingProfile": { - "googleId": "SProfUiT.student", + "googleId": "tm.e2e.SProf.student", "shortName": "Ben", "email": "i.m.benny@gmail.tmt", "institute": "TEAMMATES Test Institute 4", diff --git a/src/e2e/resources/testng-e2e.xml b/src/e2e/resources/testng-e2e.xml index b4c7de2462d..dd4f74483bd 100644 --- a/src/e2e/resources/testng-e2e.xml +++ b/src/e2e/resources/testng-e2e.xml @@ -9,7 +9,7 @@ - + diff --git a/src/main/java/teammates/common/util/Const.java b/src/main/java/teammates/common/util/Const.java index d284f999495..f4c51fe0b32 100644 --- a/src/main/java/teammates/common/util/Const.java +++ b/src/main/java/teammates/common/util/Const.java @@ -93,6 +93,8 @@ public final class Const { TIME_REPRESENTS_DEFAULT_TIMESTAMP = TimeHelper.parseInstant("2011-01-01 12:00 AM +0000"); } + public static final String TEST_EMAIL_DOMAIN = "@gmail.tmt"; + /* * Other Constants */ diff --git a/src/main/java/teammates/logic/api/EmailSender.java b/src/main/java/teammates/logic/api/EmailSender.java index 4be5caf3f10..50718b9dd61 100644 --- a/src/main/java/teammates/logic/api/EmailSender.java +++ b/src/main/java/teammates/logic/api/EmailSender.java @@ -9,6 +9,7 @@ import teammates.common.exception.TeammatesException; import teammates.common.util.Config; +import teammates.common.util.Const; import teammates.common.util.EmailSendingStatus; import teammates.common.util.EmailWrapper; import teammates.common.util.Logger; @@ -66,10 +67,8 @@ public EmailSendingStatus sendEmail(EmailWrapper message) { return status; } - @SuppressWarnings("PMD.UnusedFormalParameter") private boolean isTestingAccount(String email) { - // TODO - return false; + return email.endsWith(Const.TEST_EMAIL_DOMAIN); } /** diff --git a/src/test/resources/data/AllAccessControlUiTest.json b/src/test/resources/data/AllAccessControlUiTest.json deleted file mode 100644 index 427abe17833..00000000000 --- a/src/test/resources/data/AllAccessControlUiTest.json +++ /dev/null @@ -1,1128 +0,0 @@ -{ - "accounts": { - "instructor1OfCourse1": { - "googleId": "idOfInstructor1OfCourse1.access", - "name": "Instructor 1 of Course 1", - "isInstructor": true, - "email": "instr1@course1.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor2OfCourse1": { - "googleId": "idOfInstructor2OfCourse1.access", - "name": "Instructor 2 of Course 1", - "isInstructor": true, - "email": "instr2@course1.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "helperOfCourse1": { - "googleId": "idOfHelperOfCourse1.access", - "name": "Helper of Course 1", - "isInstructor": true, - "email": "helper@course1.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor1OfCourse2": { - "googleId": "idOfInstructor1OfCourse2.access", - "name": "Instructor 1 of Course 2", - "isInstructor": true, - "email": "instr1@course2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor2OfCourse2": { - "googleId": "idOfInstructor2OfCourse2.access", - "name": "Instructor 2 of Course 2", - "isInstructor": true, - "email": "instr2@course2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor3": { - "googleId": "idOfInstructor3.access", - "name": "Instructor 3 of Course 1 and 2", - "isInstructor": true, - "email": "instr3@course1n2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor4": { - "googleId": "idOfInstructor4.access", - "name": "Instructor 4 of CourseNoEvals", - "isInstructor": true, - "email": "instr4@coursenoevals.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor5": { - "googleId": "idOfInstructor5.access", - "name": "Instructor 5 of CourseNoRegister", - "isInstructor": true, - "email": "instructor5@courseNoRegister.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructorWithoutCourses.access": { - "googleId": "instructorWithoutCourses.access", - "name": "Instructor Without Courses", - "isInstructor": true, - "email": "iwc@yahoo.tmt", - "institute": "TEAMMATES Test Institute 7" - }, - "instructorWithOnlyOneSampleCourse": { - "googleId": "idOfInstructorWithOnlyOneSampleCourse.access", - "name": "Instructor With Only One Sample Course", - "isInstructor": true, - "email": "iwosc@yahoo.tmt", - "institute": "TEAMMATES Test Institute 7" - }, - "instructorOfArchivedCourse.access": { - "googleId": "idOfinstructorOfArchivedCourse.access", - "name": "InstructorOfArchiveCourse name", - "isInstructor": true, - "email": "instructorOfArchiveCourse@archiveCourse.tmt", - "institute": "TEAMMATES Test Institute 5" - }, - "student1InCourse1.access": { - "googleId": "student1InCourse1.access", - "name": "Student 1 in course 1", - "isInstructor": false, - "email": "student1InCourse1.access@gmail.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "student2InCourse1.access": { - "googleId": "student2InCourse1.access", - "name": "Student in two courses", - "isInstructor": false, - "email": "student2InCourse1.access@gmail.tmt", - "institute": "TEAMMATES Test Institute 1" - } - }, - "courses": { - "typicalCourse1": { - "id": "idOfTypicalCourse1.access", - "name": "Typical Course 1 with 2 Evals", - "timeZone": "UTC" - }, - "typicalCourse2": { - "id": "idOfTypicalCourse2.access", - "name": "Typical Course 2 with 1 Evals", - "timeZone": "UTC" - }, - "courseNoEvals": { - "id": "idOfCourseNoEvals.access", - "name": "Typical Course 3 with 0 Evals", - "timeZone": "UTC" - }, - "sampleCourse": { - "id": "idOfSampleCourse-demo.access", - "name": "Sample Course", - "timeZone": "UTC" - }, - "archivedCourse": { - "id": "idOfArchivedCourse.access", - "name": "Archived Course", - "timeZone": "UTC" - }, - "unregisteredCourse": { - "id": "idOfUnregisteredCourse.access", - "name": "Unregistered Course", - "timeZone": "UTC" - } - }, - "instructors": { - "instructor1OfCourse1": { - "googleId": "idOfInstructor1OfCourse1.access", - "courseId": "idOfTypicalCourse1.access", - "name": "Instructor1 Course1", - "email": "instructor1@course1.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor2OfCourse1": { - "googleId": "idOfInstructor2OfCourse1.access", - "courseId": "idOfTypicalCourse1.access", - "name": "Instructor2 Course1", - "email": "instructor2@course1.tmt", - "role": "Manager", - "isDisplayedToStudents": true, - "displayedName": "Manager", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": false, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "helperOfCourse1": { - "googleId": "idOfHelperOfCourse1.access", - "courseId": "idOfTypicalCourse1.access", - "name": "Helper Course1", - "email": "helper@course1.tmt", - "role": "Custom", - "isDisplayedToStudents": false, - "displayedName": "Helper", - "privileges": { - "courseLevel": { - "canviewstudentinsection": false, - "cansubmitsessioninsection": false, - "canmodifysessioncommentinsection": false, - "canmodifycourse": false, - "canviewsessioninsection": false, - "canmodifysession": false, - "canmodifystudent": false, - "canmodifyinstructor": false - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor1OfCourse2": { - "googleId": "idOfInstructor1OfCourse2.access", - "courseId": "idOfTypicalCourse2.access", - "name": "Instructor1 Course2", - "email": "instructor1@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor2OfCourse2": { - "googleId": "idOfInstructor2OfCourse2.access", - "courseId": "idOfTypicalCourse2.access", - "name": "Instructor2 Course2", - "email": "instructor2@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor3OfCourse1": { - "googleId": "idOfInstructor3.access", - "courseId": "idOfTypicalCourse1.access", - "name": "Instructor3 Course1", - "email": "instructor3@course1.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor3OfCourse2": { - "googleId": "idOfInstructor3.access", - "courseId": "idOfTypicalCourse2.access", - "name": "Instructor3 Course2", - "email": "instructor3@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor4": { - "googleId": "idOfInstructor4.access", - "courseId": "idOfCourseNoEvals.access", - "name": "Instructor4 name", - "email": "instructor4@courseNoEvals.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor5": { - "googleId": "idOfInstructor5.access", - "courseId": "idOfUnregisteredCourse.access", - "name": "Instructor 5 of CourseNoRegister", - "email": "instructor5@courseNoRegister.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructorWithOnlyOneSampleCourse": { - "googleId": "idOfInstructorWithOnlyOneSampleCourse.access", - "courseId": "idOfSampleCourse-demo.access", - "name": "Instructor With Only One Sample Course", - "email": "iwosc@yahoo.tmt", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructorOfArchivedCourse.access": { - "googleId": "idOfinstructorOfArchivedCourse.access", - "courseId": "idOfArchivedCourse.access", - "name": "InstructorOfArchiveCourse name", - "email": "instructorOfArchiveCourse@archiveCourse.tmt", - "isArchived": true, - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructorNotYetJoinCourse": { - "courseId": "idOfSampleCourse-demo.access", - "name": "Instructor Not Yet Joined Course", - "email": "instructorNotYetJoined@email.tmt", - "key": "regKeyForInstrNotYetJoinCourse", - "role": "Co-owner", - "isDisplayedToStudents": true, - "displayedName": "Instructor", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - } - }, - "students": { - "student1InCourse1.access": { - "googleId": "student1InCourse1.access", - "email": "student1InCourse1.access@gmail.tmt", - "course": "idOfTypicalCourse1.access", - "name": "student1 In Course1'\"", - "comments": "comment for student1InCourse1.access'\"", - "team": "Team 1.1'\"", - "section": "Section 1" - }, - "student2InCourse1.access": { - "googleId": "student2InCourse1.access", - "email": "student2InCourse1.access@gmail.tmt", - "course": "idOfTypicalCourse1.access", - "name": "student2 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "Section 1" - }, - "student3InCourse1": { - "googleId": "student3InCourse1", - "email": "student3InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1.access", - "name": "student3 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "Section 1" - }, - "student4InCourse1": { - "googleId": "student4InCourse1", - "email": "student4InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1.access", - "name": "student4 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "Section 1" - }, - "student5InCourse1": { - "googleId": "student5InCourse1", - "email": "student5InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1.access", - "name": "student5 In Course1", - "comments": "", - "team": "Team 1.2", - "section": "Section 2" - }, - "student1InCourse2": { - "googleId": "student1InCourse2", - "email": "student1InCourse2@gmail.tmt", - "course": "idOfTypicalCourse2.access", - "name": "student1 In Course2", - "comments": "", - "team": "Team 2.1", - "section": "None" - }, - "student2InCourse2": { - "googleId": "student2InCourse1.access", - "email": "student2InCourse1.access@gmail.tmt", - "course": "idOfTypicalCourse2.access", - "name": "student2 In Course2", - "comments": "#####This is the same student as student2InCourse1.access but using different name and email #####", - "team": "Team 2.1", - "section": "None" - }, - "student1InUnregisteredCourse": { - "googleId": "", - "email": "student1InUnregisteredCourse@gmail.tmt", - "course": "idOfUnregisteredCourse.access", - "name": "student1 In unregisteredCourse", - "comments": "", - "team": "Team 1", - "section": "Section 1", - "key": "regKeyForStuNotYetJoinCourse" - }, - "student2InUnregisteredCourse": { - "googleId": "", - "email": "student2InUnregisteredCourse@gmail.tmt", - "course": "idOfUnregisteredCourse.access", - "name": "student2 In unregisteredCourse", - "comments": "", - "team": "Team 2", - "section": "Section 2", - "key": "regKey2ForStuNotYetJoinCourse" - } - }, - "feedbackSessions": { - "session1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2012-03-20T23:59:00Z", - "startTime": "2012-04-01T21:59:00Z", - "endTime": "2027-04-30T21:59:00Z", - "sessionVisibleFromTime": "2012-03-28T21:59:00Z", - "resultsVisibleFromTime": "2027-05-01T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 10, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "session2InCourse1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-03-20T23:59:00Z", - "startTime": "2013-06-01T21:59:00Z", - "endTime": "2026-04-28T21:59:00Z", - "sessionVisibleFromTime": "2013-03-20T21:59:00Z", - "resultsVisibleFromTime": "2026-04-29T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 5, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "gracePeriodSession": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-03-20T23:59:00Z", - "startTime": "2013-06-01T21:59:00Z", - "endTime": "2026-04-28T21:59:00Z", - "sessionVisibleFromTime": "2013-03-20T21:59:00Z", - "resultsVisibleFromTime": "2026-04-29T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 1440, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "closedSession": { - "feedbackSessionName": "Closed Session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-03-20T23:59:00Z", - "startTime": "2013-06-01T21:58:00Z", - "endTime": "2013-06-01T21:59:00Z", - "sessionVisibleFromTime": "2013-03-20T21:59:00Z", - "resultsVisibleFromTime": "2026-04-29T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 5, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "empty.session": { - "feedbackSessionName": "Empty session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor2@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-01-20T23:57:00Z", - "startTime": "2013-02-01T23:57:00Z", - "endTime": "2013-04-28T23:57:00Z", - "sessionVisibleFromTime": "2013-01-20T23:57:00Z", - "resultsVisibleFromTime": "2013-04-29T23:57:00Z", - "timeZone": "UTC", - "gracePeriod": 5, - "sentOpenEmail": false, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "awaiting.session": { - "feedbackSessionName": "non visible session", - "courseId": "idOfTypicalCourse1.access", - "creatorEmail": "instructor2@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-01-20T23:00:00Z", - "startTime": "2026-02-01T23:00:00Z", - "endTime": "2026-04-28T23:00:00Z", - "sessionVisibleFromTime": "2026-02-01T23:00:00Z", - "resultsVisibleFromTime": "2026-04-29T23:00:00Z", - "timeZone": "UTC", - "gracePeriod": 5, - "sentOpenEmail": false, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "session1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2.access", - "creatorEmail": "instructor1@course2.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2012-03-20T23:59:00Z", - "startTime": "2012-04-01T15:59:00Z", - "endTime": "2027-04-30T15:59:00Z", - "sessionVisibleFromTime": "2012-03-28T15:59:00Z", - "resultsVisibleFromTime": "2027-05-01T15:59:00Z", - "timeZone": "Asia/Singapore", - "gracePeriod": 0, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - } - }, - "feedbackQuestions": { - "qn1InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "What is the best selling point of your product?" - }, - "questionNumber": 1, - "giverType": "STUDENTS", - "recipientType": "SELF", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "INSTRUCTORS" - ] - }, - "qn2InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Rate 1 other student's product" - }, - "questionNumber": 2, - "giverType": "STUDENTS", - "recipientType": "STUDENTS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "INSTRUCTORS", - "RECEIVER" - ], - "showGiverNameTo": [ - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "INSTRUCTORS", - "RECEIVER" - ] - }, - "qn3InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "My comments on the class" - }, - "questionNumber": 3, - "giverType": "SELF", - "recipientType": "NONE", - "numberOfEntitiesToGiveFeedbackTo": -100, - "showResponsesTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ] - }, - "qn4InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Instructor comments on the class" - }, - "questionNumber": 4, - "giverType": "INSTRUCTORS", - "recipientType": "NONE", - "numberOfEntitiesToGiveFeedbackTo": -100, - "showResponsesTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ] - }, - "team.feedback": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 2 other teams." - }, - "questionNumber": 1, - "giverType": "TEAMS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 2, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "team.members.feedback": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 1 of your team mates" - }, - "questionNumber": 2, - "giverType": "STUDENTS", - "recipientType": "OWN_TEAM_MEMBERS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "graceperiod.session.feedback": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 2 other teams." - }, - "questionNumber": 1, - "giverType": "TEAMS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 2, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "graceperiod.session.feedback2": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to yourself." - }, - "questionNumber": 2, - "giverType": "INSTRUCTORS", - "recipientType": "SELF", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "closed.session.feedback": { - "feedbackSessionName": "Closed Session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to yourself." - }, - "questionNumber": 1, - "giverType": "INSTRUCTORS", - "recipientType": "SELF", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "qn1InSession4InCourse1": { - "feedbackSessionName": "non visible session", - "courseId": "idOfTypicalCourse1.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 4 other students" - }, - "questionNumber": 1, - "giverType": "STUDENTS", - "recipientType": "STUDENTS", - "numberOfEntitiesToGiveFeedbackTo": 4, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "qn1InSession1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Please rate the following teams" - }, - "questionNumber": 1, - "giverType": "INSTRUCTORS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [], - "showGiverNameTo": [], - "showRecipientNameTo": [] - }, - "qn2InSession1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2.access", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Please rate your fellow instructors" - }, - "questionNumber": 2, - "giverType": "INSTRUCTORS", - "recipientType": "INSTRUCTORS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [], - "showGiverNameTo": [], - "showRecipientNameTo": [] - } - }, - "feedbackResponses": { - "response1ForQ1S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "1", - "giver": "student1InCourse1.access@gmail.tmt", - "recipient": "student1InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Student 1 self feedback." - } - }, - "response2ForQ1S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "1", - "giver": "student2InCourse1.access@gmail.tmt", - "recipient": "student2InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "I'm cool'" - } - }, - "response1ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student2InCourse1.access@gmail.tmt", - "recipient": "student1InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 2 to student 1." - } - }, - "response2ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student1InCourse1.access@gmail.tmt", - "recipient": "student2InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 1 to student 2." - } - }, - "response3ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student3InCourse1@gmail.tmt", - "recipient": "student2InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 3 \"to\" student 2.\r\nMultiline test." - } - }, - "response1ForQ3S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "3", - "giver": "instructor1@course1.tmt", - "recipient": "%GENERAL%", - "giverSection": "None", - "recipientSection": "None", - "responseDetails": { - "questionType": "TEXT", - "answer": "Good work, keep it up!" - } - }, - "response1ForQ1S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "1", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "Team 1.2", - "giverSection": "Section 1", - "recipientSection": "Section 2", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from team 1 by (student 4) to team 1.2." - } - }, - "response1GracePeriodFeedback": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "Team 1.2", - "giverSection": "Section 1", - "recipientSection": "Section 2", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from team 1 by (student 4) to team 1.2." - } - }, - "response1Q2GracePeriodFeedback": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "instructor1@course1.tmt", - "recipient": "instructor1@course1.tmt", - "giverSection": "None", - "recipientSection": "None", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from instructor to self." - } - }, - "response1Q1ClosedPeriodFeedback": { - "feedbackSessionName": "Closed Session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "1", - "giver": "instructor1@course1.tmt", - "recipient": "instructor1@course1.tmt", - "giverSection": "None", - "recipientSection": "None", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from Inst1 to self." - } - }, - "response1ForQ2S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "student2InCourse1.access@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 4 to team member (student 2)." - } - }, - "response2ForQ2S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1.access", - "feedbackQuestionId": "2", - "giver": "student1InCourse1.access@gmail.tmt", - "recipient": "student4InCourse1@gmail.tmt", - "giverSection": "Section 1", - "recipientSection": "Section 1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 1 to team member (student 4)." - } - }, - "response1ForQ1S1C2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2.access", - "feedbackQuestionId": "1", - "giver": "instructor1@course2.tmt", - "recipient": "Team 2.1", - "giverSection": "None", - "recipientSection": "None", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from instr to Team 2.1" - } - } - }, - "feedbackResponseComments": { - "comment1FromT1C1ToR1Q1S1C1": { - "courseId": "idOfTypicalCourse1.access", - "feedbackSessionName": "First feedback session", - "feedbackQuestionId": "1", - "commentGiver": "instructor1@course1.tmt", - "giverSection": "None", - "receiverSection": "None", - "feedbackResponseId": "1%student1InCourse1.access@gmail.tmt%student1InCourse1.access@gmail.tmt", - "showCommentTo": [], - "showGiverNameTo": [], - "commentGiverType": "INSTRUCTORS", - "isVisibilityFollowingFeedbackQuestion": false, - "isCommentFromFeedbackParticipant": false, - "createdAt": "2026-03-01T23:59:00Z", - "commentText": "Instructor 1 comment to student 1 self feedback" - }, - "comment1FromT1C1ToR1Q2S1C1": { - "courseId": "idOfTypicalCourse1.access", - "feedbackSessionName": "First feedback session", - "feedbackQuestionId": "2", - "commentGiver": "instructor1@course1.tmt", - "giverSection": "None", - "receiverSection": "None", - "feedbackResponseId": "2%student2InCourse1.access@gmail.tmt%student1InCourse1.access@gmail.tmt", - "showCommentTo": [], - "showGiverNameTo": [], - "commentGiverType": "INSTRUCTORS", - "isVisibilityFollowingFeedbackQuestion": false, - "isCommentFromFeedbackParticipant": false, - "createdAt": "2026-02-01T23:59:00Z", - "commentText": "Instructor 1 comment to student 1 self feedback Question 2" - }, - "comment1FromT1C1ToR1Q3S1C1": { - "courseId": "idOfTypicalCourse1.access", - "feedbackSessionName": "First feedback session", - "feedbackQuestionId": "3", - "commentGiver": "instructor1@course1.tmt", - "giverSection": "None", - "receiverSection": "None", - "feedbackResponseId": "3%instructor1@course1.tmt%%GENERAL%", - "showCommentTo": [], - "showGiverNameTo": [], - "commentGiverType": "INSTRUCTORS", - "isVisibilityFollowingFeedbackQuestion": false, - "isCommentFromFeedbackParticipant": false, - "createdAt": "2026-01-01T23:59:00Z", - "commentText": "Instructor 1 comment to his own response for feedback Question 3" - } - }, - "profiles": { - "student1InCourse1.access": { - "googleId": "student1InCourse1.access", - "shortName": "Stud1", - "email": "i.m.stud1@gmail.tmt", - "institute": "TEAMMATES Test Institute 3", - "nationality": "American", - "gender": "MALE", - "moreInfo": "I am just a student :P", - "pictureKey": "asdf34&hfn3!@" - } - } -} diff --git a/src/test/resources/data/InstructorSubmissionAdjustmentUiTest.json b/src/test/resources/data/InstructorSubmissionAdjustmentUiTest.json deleted file mode 100644 index 5fc26cdb937..00000000000 --- a/src/test/resources/data/InstructorSubmissionAdjustmentUiTest.json +++ /dev/null @@ -1,850 +0,0 @@ -{ - "accounts": { - "instructor1OfCourse1": { - "googleId": "${value.injected.in.testfile}", - "name": "Instructor 1 of Course 1", - "isInstructor": true, - "email": "${value.injected.in.testfile}", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor2OfCourse1": { - "googleId": "idOfInstructor2OfCourse1", - "name": "Instructor 2 of Course 1", - "isInstructor": true, - "email": "instr2@course1.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor1OfCourse2": { - "googleId": "idOfInstructor1OfCourse2", - "name": "Instructor 1 of Course 2", - "isInstructor": true, - "email": "instr1@course2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor2OfCourse2": { - "googleId": "idOfInstructor2OfCourse2", - "name": "Instructor 2 of Course 2", - "isInstructor": true, - "email": "instr2@course2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor3": { - "googleId": "idOfInstructor3", - "name": "Instructor 3 of Course 1 and 2", - "isInstructor": true, - "email": "instr3@course1n2.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructor4": { - "googleId": "idOfInstructor4", - "name": "Instructor 4 of CourseNoEvals", - "isInstructor": true, - "email": "instr4@coursenoevals.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "instructorWithoutCourses": { - "googleId": "instructorWithoutCourses", - "name": "Instructor Without Courses", - "isInstructor": true, - "email": "iwc@yahoo.tmt", - "institute": "TEAMMATES Test Institute 7" - }, - "instructorWithOnlyOneSampleCourse": { - "googleId": "idOfInstructorWithOnlyOneSampleCourse", - "name": "Instructor With Only One Sample Course", - "isInstructor": true, - "email": "iwosc@yahoo.tmt", - "institute": "TEAMMATES Test Institute 7" - }, - "instructorOfArchivedCourse": { - "googleId": "idOfInstructorOfArchivedCourse", - "name": "InstructorOfArchiveCourse name", - "isInstructor": true, - "email": "instructorOfArchiveCourse@archiveCourse.tmt", - "institute": "TEAMMATES Test Institute 5" - }, - "student1InCourse1": { - "googleId": "student1InCourse1", - "name": "Student 1 in course 1", - "isInstructor": false, - "email": "sudent1inCourse1@gmail.tmt", - "institute": "TEAMMATES Test Institute 1" - }, - "student2InCourse1": { - "googleId": "student2InCourse1", - "name": "Student in two courses", - "isInstructor": false, - "email": "sudent2inCourse1@gmail.tmt", - "institute": "TEAMMATES Test Institute 1" - } - }, - "courses": { - "typicalCourse1": { - "id": "idOfTypicalCourse1", - "name": "Typical Course 1 with 2 Evals", - "timeZone": "UTC" - }, - "typicalCourse2": { - "id": "idOfTypicalCourse2", - "name": "Typical Course 2 with 1 Evals", - "timeZone": "UTC" - }, - "courseNoEvals": { - "id": "idOfCourseNoEvals", - "name": "Typical Course 3 with 0 Evals", - "timeZone": "UTC" - }, - "sampleCourse": { - "id": "idOfSampleCourse-demo", - "name": "Sample Course", - "timeZone": "UTC" - }, - "archivedCourse": { - "id": "idOfArchivedCourse", - "name": "Archived Course", - "timeZone": "UTC" - } - }, - "instructors": { - "instructor1OfCourse1": { - "googleId": "idOfInstructor1OfCourse1", - "courseId": "idOfTypicalCourse1", - "name": "Instructor1 Course1", - "email": "instructor1@course1.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor2OfCourse1": { - "googleId": "idOfInstructor2OfCourse1", - "courseId": "idOfTypicalCourse1", - "name": "Instructor2 Course1", - "email": "instructor2@course1.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor1OfCourse2": { - "googleId": "idOfInstructor1OfCourse2", - "courseId": "idOfTypicalCourse2", - "name": "Instructor1 Course2", - "email": "instructor1@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor2OfCourse2": { - "googleId": "idOfInstructor2OfCourse2", - "courseId": "idOfTypicalCourse2", - "name": "Instructor2 Course2", - "email": "instructor2@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor3OfCourse1": { - "googleId": "idOfInstructor3", - "courseId": "idOfTypicalCourse1", - "name": "Instructor3 Course1", - "email": "instructor3@course1.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor3OfCourse2": { - "googleId": "idOfInstructor3", - "courseId": "idOfTypicalCourse2", - "name": "Instructor3 Course2", - "email": "instructor3@course2.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructor4": { - "googleId": "idOfInstructor4", - "courseId": "idOfCourseNoEvals", - "name": "Instructor4 name", - "email": "instructor4@courseNoEvals.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructorWithOnlyOneSampleCourse": { - "googleId": "idOfInstructorWithOnlyOneSampleCourse", - "courseId": "idOfSampleCourse-demo", - "name": "Instructor With Only One Sample Course", - "email": "iwosc@yahoo.tmt", - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - }, - "instructorOfArchivedCourse": { - "googleId": "idOfInstructorOfArchivedCourse", - "courseId": "idOfArchivedCourse", - "name": "InstructorOfArchiveCourse name", - "email": "instructorOfArchiveCourse@archiveCourse.tmt", - "isArchived": true, - "role": "Co-owner", - "isDisplayedToStudents": false, - "displayedName": "Co-owner", - "privileges": { - "courseLevel": { - "canviewstudentinsection": true, - "cansubmitsessioninsection": true, - "canmodifysessioncommentinsection": true, - "canmodifycourse": true, - "canviewsessioninsection": true, - "canmodifysession": true, - "canmodifystudent": true, - "canmodifyinstructor": true - }, - "sectionLevel": {}, - "sessionLevel": {} - } - } - }, - "students": { - "student1InCourse1": { - "googleId": "student1InCourse1", - "email": "student1InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1", - "name": "student1 In Course1'\"", - "comments": "comment for student1InCourse1'\"", - "team": "Team 1.1'\"", - "section": "None" - }, - "student2InCourse1": { - "googleId": "student2InCourse1", - "email": "student2InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1", - "name": "student2 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "None" - }, - "student3InCourse1": { - "googleId": "student3InCourse1", - "email": "student3InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1", - "name": "student3 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "None" - }, - "student4InCourse1": { - "googleId": "student4InCourse1", - "email": "student4InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1", - "name": "student4 In Course1", - "comments": "", - "team": "Team 1.1'\"", - "section": "None" - }, - "student5InCourse1": { - "googleId": "student5InCourse1", - "email": "student5InCourse1@gmail.tmt", - "course": "idOfTypicalCourse1", - "name": "student5 In Course1", - "comments": "", - "team": "Team 1.2", - "section": "None" - }, - "student1InCourse2": { - "googleId": "student1InCourse2", - "email": "student1InCourse2@gmail.tmt", - "course": "idOfTypicalCourse2", - "name": "student1 In Course2", - "comments": "", - "team": "Team 2.1", - "section": "None" - }, - "student2InCourse2": { - "googleId": "student2InCourse1", - "email": "student2InCourse1@gmail.tmt", - "course": "idOfTypicalCourse2", - "name": "student2 In Course2", - "comments": "#####This is the same student as student2InCourse1 but using different name and email #####", - "team": "Team 2.1", - "section": "None" - } - }, - "feedbackSessions": { - "session1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2012-03-20T23:59:00Z", - "startTime": "2012-04-01T21:59:00Z", - "endTime": "2027-04-30T21:59:00Z", - "sessionVisibleFromTime": "2012-03-28T21:59:00Z", - "resultsVisibleFromTime": "2027-05-01T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 10, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "session2InCourse1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-03-20T23:59:00Z", - "startTime": "2013-06-01T21:59:00Z", - "endTime": "2026-04-28T21:59:00Z", - "sessionVisibleFromTime": "2013-03-20T21:59:00Z", - "resultsVisibleFromTime": "2026-04-29T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 5, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "gracePeriodSession": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1", - "creatorEmail": "instructor1@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-03-20T23:59:00Z", - "startTime": "2013-06-01T21:59:00Z", - "endTime": "2026-04-28T21:59:00Z", - "sessionVisibleFromTime": "2013-03-20T21:59:00Z", - "resultsVisibleFromTime": "2026-04-29T21:59:00Z", - "timeZone": "Africa/Johannesburg", - "gracePeriod": 1440, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "empty.session": { - "feedbackSessionName": "Empty session", - "courseId": "idOfTypicalCourse1", - "creatorEmail": "instructor2@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-01-20T23:57:00Z", - "startTime": "2013-02-01T23:57:00Z", - "endTime": "2013-04-28T23:57:00Z", - "sessionVisibleFromTime": "2013-01-20T23:57:00Z", - "resultsVisibleFromTime": "2013-04-29T23:57:00Z", - "timeZone": "UTC", - "gracePeriod": 5, - "sentOpenEmail": false, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "awaiting.session": { - "feedbackSessionName": "non visible session", - "courseId": "idOfTypicalCourse1", - "creatorEmail": "instructor2@course1.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2013-01-20T23:00:00Z", - "startTime": "2026-02-01T23:00:00Z", - "endTime": "2026-04-28T23:00:00Z", - "sessionVisibleFromTime": "2026-02-01T23:00:00Z", - "resultsVisibleFromTime": "2026-04-29T23:00:00Z", - "timeZone": "UTC", - "gracePeriod": 5, - "sentOpenEmail": false, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - }, - "session1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2", - "creatorEmail": "instructor1@course2.tmt", - "instructions": "Please please fill in the following questions.", - "createdTime": "2012-03-20T23:59:00Z", - "startTime": "2012-04-01T15:59:00Z", - "endTime": "2027-04-30T15:59:00Z", - "sessionVisibleFromTime": "2012-03-28T15:59:00Z", - "resultsVisibleFromTime": "2027-05-01T15:59:00Z", - "timeZone": "Asia/Singapore", - "gracePeriod": 0, - "sentOpenEmail": true, - "sentClosingEmail": false, - "sentClosedEmail": false, - "sentPublishedEmail": false, - "isOpeningEmailEnabled": true, - "isClosingEmailEnabled": true, - "isPublishedEmailEnabled": true - } - }, - "feedbackQuestions": { - "qn1InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "What is the best selling point of your product?" - }, - "questionNumber": 1, - "giverType": "STUDENTS", - "recipientType": "SELF", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "INSTRUCTORS" - ] - }, - "qn2InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Rate 1 other student's product" - }, - "questionNumber": 2, - "giverType": "STUDENTS", - "recipientType": "STUDENTS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "INSTRUCTORS", - "RECEIVER" - ], - "showGiverNameTo": [ - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "INSTRUCTORS", - "RECEIVER" - ] - }, - "qn3InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "My comments on the class" - }, - "questionNumber": 3, - "giverType": "SELF", - "recipientType": "NONE", - "numberOfEntitiesToGiveFeedbackTo": -100, - "showResponsesTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ] - }, - "qn4InSession1InCourse1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Instructor comments on the class" - }, - "questionNumber": 4, - "giverType": "INSTRUCTORS", - "recipientType": "NONE", - "numberOfEntitiesToGiveFeedbackTo": -100, - "showResponsesTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showGiverNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ], - "showRecipientNameTo": [ - "RECEIVER", - "OWN_TEAM_MEMBERS", - "STUDENTS", - "INSTRUCTORS" - ] - }, - "team.feedback": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 2 other teams." - }, - "questionNumber": 1, - "giverType": "TEAMS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 2, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "team.members.feedback": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 1 of your team mates" - }, - "questionNumber": 2, - "giverType": "STUDENTS", - "recipientType": "OWN_TEAM_MEMBERS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "graceperiod.session.feedback": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 2 other teams." - }, - "questionNumber": 1, - "giverType": "TEAMS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 2, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "qn1InSession4InCourse1": { - "feedbackSessionName": "non visible session", - "courseId": "idOfTypicalCourse1", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Give feedback to 4 other students" - }, - "questionNumber": 1, - "giverType": "STUDENTS", - "recipientType": "STUDENTS", - "numberOfEntitiesToGiveFeedbackTo": 4, - "showResponsesTo": [ - "RECEIVER" - ], - "showGiverNameTo": [ - "RECEIVER" - ], - "showRecipientNameTo": [ - "RECEIVER" - ] - }, - "qn1InSession1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Please rate the following teams" - }, - "questionNumber": 1, - "giverType": "INSTRUCTORS", - "recipientType": "TEAMS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [], - "showGiverNameTo": [], - "showRecipientNameTo": [] - }, - "qn2InSession1InCourse2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2", - "questionDetails": { - "questionType": "TEXT", - "questionText": "Please rate your fellow instructors" - }, - "questionNumber": 2, - "giverType": "INSTRUCTORS", - "recipientType": "INSTRUCTORS", - "numberOfEntitiesToGiveFeedbackTo": 1, - "showResponsesTo": [], - "showGiverNameTo": [], - "showRecipientNameTo": [] - } - }, - "feedbackResponses": { - "response1ForQ1S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "1", - "giver": "student1InCourse1@gmail.tmt", - "recipient": "student1InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Student 1 self feedback." - } - }, - "response2ForQ1S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "1", - "giver": "student2InCourse1@gmail.tmt", - "recipient": "student2InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "I'm cool'" - } - }, - "response1ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "2", - "giver": "student2InCourse1@gmail.tmt", - "recipient": "student1InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 2 to student 1." - } - }, - "response2ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "2", - "giver": "student1InCourse1@gmail.tmt", - "recipient": "student2InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 1 to student 2." - } - }, - "response3ForQ2S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "2", - "giver": "student3InCourse1@gmail.tmt", - "recipient": "student2InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 3 \"to\" student 2.\r\nMultiline test." - } - }, - "response1ForQ3S1C1": { - "feedbackSessionName": "First feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "3", - "giver": "instructor1@course1.tmt", - "recipient": "%GENERAL%", - "responseDetails": { - "questionType": "TEXT", - "answer": "Good work, keep it up!" - } - }, - "response1ForQ1S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "1", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "Team 1.2", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from team 1 by (student 4) to team 1.2." - } - }, - "response1GracePeriodFeedback": { - "feedbackSessionName": "Grace Period Session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "1", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "Team 1.2", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from team 1 by (student 4) to team 1.2." - } - }, - "response1ForQ2S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "2", - "giver": "student4InCourse1@gmail.tmt", - "recipient": "student2InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 4 to team member (student 2)." - } - }, - "response2ForQ2S2C1": { - "feedbackSessionName": "Second feedback session", - "courseId": "idOfTypicalCourse1", - "feedbackQuestionId": "2", - "giver": "student1InCourse1@gmail.tmt", - "recipient": "student4InCourse1@gmail.tmt", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from student 1 to team member (student 4)." - } - }, - "response1ForQ1S1C2": { - "feedbackSessionName": "Instructor feedback session", - "courseId": "idOfTypicalCourse2", - "feedbackQuestionId": "1", - "giver": "instructor1@course2.tmt", - "recipient": "Team 2.1", - "responseDetails": { - "questionType": "TEXT", - "answer": "Response from instr to Team 2.1" - } - } - }, - "feedbackResponseComments": {}, - "profiles": {} -} From cc625930a011e702f65782bd5fc9edc7b6f9bb46 Mon Sep 17 00:00:00 2001 From: Jessica Rairigh <67874354+jfrairigh@users.noreply.github.com> Date: Mon, 2 Nov 2020 19:49:30 -0600 Subject: [PATCH 2/6] [#10569] Missing loading icons and bugs (#10813) * added loading icons for buttons under Deleted Feedback Sessions table * deleted unnessary line of white space in code * final change to fix merge conflict --- .../instructor-sessions-page.component.html | 2 +- .../instructor-sessions-page.component.ts | 65 +++++++++++-------- 2 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/web/app/pages-instructor/instructor-sessions-page/instructor-sessions-page.component.html b/src/web/app/pages-instructor/instructor-sessions-page/instructor-sessions-page.component.html index e927c3c0776..a6133a7cbea 100644 --- a/src/web/app/pages-instructor/instructor-sessions-page/instructor-sessions-page.component.html +++ b/src/web/app/pages-instructor/instructor-sessions-page/instructor-sessions-page.component.html @@ -50,7 +50,7 @@
this.isRestoreFeedbackSessionLoading = false)) .subscribe((feedbackSession: FeedbackSession) => { this.recycleBinFeedbackSessionRowModels.splice( this.recycleBinFeedbackSessionRowModels.indexOf(model), 1); @@ -565,6 +569,7 @@ export class InstructorSessionsPageComponent extends InstructorSessionModalPageC * Restores all feedback sessions in recycle bin. */ restoreAllRecycleBinFeedbackSession(): void { + this.isRestoreFeedbackSessionLoading = true; const restoreRequests: Observable[] = []; this.recycleBinFeedbackSessionRowModels.forEach((model: RecycleBinFeedbackSessionRowModel) => { restoreRequests.push( @@ -574,27 +579,29 @@ export class InstructorSessionsPageComponent extends InstructorSessionModalPageC )); }); - forkJoin(restoreRequests).subscribe((restoredSessions: FeedbackSession[]) => { - restoredSessions.forEach((session: FeedbackSession) => { - this.recycleBinFeedbackSessionRowModels = []; - const m: SessionsTableRowModel = { - feedbackSession: session, - responseRate: '', - isLoadingResponseRate: false, - instructorPrivilege: session.privileges || DEFAULT_INSTRUCTOR_PRIVILEGE, - }; - this.sessionsTableRowModels.push(m); + forkJoin(restoreRequests).pipe(finalize(() => this.isRestoreFeedbackSessionLoading = false)) + .subscribe((restoredSessions: FeedbackSession[]) => { + restoredSessions.forEach((session: FeedbackSession) => { + this.recycleBinFeedbackSessionRowModels = []; + const m: SessionsTableRowModel = { + feedbackSession: session, + responseRate: '', + isLoadingResponseRate: false, + instructorPrivilege: session.privileges || DEFAULT_INSTRUCTOR_PRIVILEGE, + }; + this.sessionsTableRowModels.push(m); + }); + this.statusMessageService.showSuccessToast('All sessions have been restored.'); + }, (resp: ErrorMessageOutput) => { + this.statusMessageService.showErrorToast(resp.error.message); }); - this.statusMessageService.showSuccessToast('All sessions have been restored.'); - }, (resp: ErrorMessageOutput) => { - this.statusMessageService.showErrorToast(resp.error.message); - }); } /** * Deletes the feedback session permanently. */ permanentDeleteSession(model: RecycleBinFeedbackSessionRowModel): void { + this.isPermanentDeleteLoading = true; const modalRef: NgbModalRef = this.ngbModal.open(SessionPermanentDeletionConfirmModalComponent); modalRef.componentInstance.courseId = model.feedbackSession.courseId; modalRef.componentInstance.feedbackSessionName = model.feedbackSession.feedbackSessionName; @@ -603,13 +610,15 @@ export class InstructorSessionsPageComponent extends InstructorSessionModalPageC this.feedbackSessionsService.deleteFeedbackSession( model.feedbackSession.courseId, model.feedbackSession.feedbackSessionName, - ).subscribe(() => { - this.recycleBinFeedbackSessionRowModels.splice( - this.recycleBinFeedbackSessionRowModels.indexOf(model), 1); - this.statusMessageService.showSuccessToast('The feedback session has been permanently deleted.'); - }, (resp: ErrorMessageOutput) => { - this.statusMessageService.showErrorToast(resp.error.message); - }); + ) + .pipe(finalize(() => this.isPermanentDeleteLoading = false)) + .subscribe(() => { + this.recycleBinFeedbackSessionRowModels.splice( + this.recycleBinFeedbackSessionRowModels.indexOf(model), 1); + this.statusMessageService.showSuccessToast('The feedback session has been permanently deleted.'); + }, (resp: ErrorMessageOutput) => { + this.statusMessageService.showErrorToast(resp.error.message); + }); }); } @@ -617,6 +626,7 @@ export class InstructorSessionsPageComponent extends InstructorSessionModalPageC * Deletes all feedback sessions in the recycle bin permanently. */ permanentDeleteAllSessions(): void { + this.isPermanentDeleteLoading = true; const modalRef: NgbModalRef = this.ngbModal.open(SessionsPermanentDeletionConfirmModalComponent); modalRef.componentInstance.sessionsToDelete = this.recycleBinFeedbackSessionRowModels.map( @@ -632,12 +642,13 @@ export class InstructorSessionsPageComponent extends InstructorSessionModalPageC )); }); - forkJoin(deleteRequests).subscribe(() => { - this.recycleBinFeedbackSessionRowModels = []; - this.statusMessageService.showSuccessToast('All sessions have been permanently deleted.'); - }, (resp: ErrorMessageOutput) => { - this.statusMessageService.showErrorToast(resp.error.message); - }); + forkJoin(deleteRequests).pipe(finalize(() => this.isPermanentDeleteLoading = false)) + .subscribe(() => { + this.recycleBinFeedbackSessionRowModels = []; + this.statusMessageService.showSuccessToast('All sessions have been permanently deleted.'); + }, (resp: ErrorMessageOutput) => { + this.statusMessageService.showErrorToast(resp.error.message); + }); }); } From e7d18b04c3fccd27a380fa60b10e5d87a5f2ff2d Mon Sep 17 00:00:00 2001 From: Tan Kian Wei Jason <31800234+jtankw3@users.noreply.github.com> Date: Tue, 3 Nov 2020 13:31:55 +0800 Subject: [PATCH 3/6] [#9536] Update docs for E2E testing (#10812) * Update docs for E2E testing * Edit e2e testing doc * Update README * Add abstract method testAll * Clean up docs * Clean up TimezoneSyncerTest * Shift E2E running details to e2e-testing.md * Improve document layout and wording Co-authored-by: Ahmed Bahajjaj --- docs/README.md | 1 + docs/development.md | 68 +-------- docs/e2e-testing.md | 141 ++++++++++++++++++ .../e2e/cases/AdminAccountsPageE2ETest.java | 1 + .../e2e/cases/AdminHomePageE2ETest.java | 1 + .../e2e/cases/AdminSearchPageE2ETest.java | 3 +- .../e2e/cases/AdminSessionsPageE2ETest.java | 1 + .../AutomatedSessionRemindersE2ETest.java | 20 ++- .../teammates/e2e/cases/BaseE2ETestCase.java | 2 + ...FeedbackConstSumOptionQuestionE2ETest.java | 1 + ...dbackConstSumRecipientQuestionE2ETest.java | 1 + .../FeedbackContributionQuestionE2ETest.java | 1 + .../e2e/cases/FeedbackMcqQuestionE2ETest.java | 1 + .../e2e/cases/FeedbackMsqQuestionE2ETest.java | 1 + .../FeedbackNumScaleQuestionE2ETest.java | 1 + .../FeedbackRankOptionQuestionE2ETest.java | 1 + .../FeedbackRankRecipientQuestionE2ETest.java | 1 + .../cases/FeedbackRubricQuestionE2ETest.java | 1 + .../e2e/cases/FeedbackSubmitPageE2ETest.java | 1 + .../cases/FeedbackTextQuestionE2ETest.java | 1 + .../InstructorCourseDetailsPageE2ETest.java | 3 +- .../InstructorCourseEditPageE2ETest.java | 1 + .../InstructorCourseEnrollPageE2ETest.java | 1 + ...ctorCourseJoinConfirmationPageE2ETest.java | 1 + ...orCourseStudentDetailsEditPageE2ETest.java | 1 + ...ructorCourseStudentDetailsPageE2ETest.java | 1 + .../cases/InstructorCoursesPageE2ETest.java | 1 + .../InstructorFeedbackEditPageE2ETest.java | 3 +- ...InstructorFeedbackSessionsPageE2ETest.java | 3 +- .../e2e/cases/InstructorHomePageE2ETest.java | 3 +- .../cases/InstructorSearchPageE2ETest.java | 3 +- .../InstructorStudentListPageE2ETest.java | 1 + .../InstructorStudentRecordsPageE2ETest.java | 1 + .../StudentCourseDetailsPageE2ETest.java | 1 + ...dentCourseJoinConfirmationPageE2ETest.java | 1 + .../StudentFeedbackResultsPageE2ETest.java | 1 + .../e2e/cases/StudentHomePageE2ETest.java | 1 + .../e2e/cases/StudentProfilePageE2ETest.java | 1 + .../cases/SystemErrorEmailReportE2ETest.java | 1 + .../e2e/cases/TimezoneSyncerTest.java | 16 +- 40 files changed, 204 insertions(+), 90 deletions(-) create mode 100644 docs/e2e-testing.md diff --git a/docs/README.md b/docs/README.md index 9a4bfeee69d..39d1d4f5d66 100644 --- a/docs/README.md +++ b/docs/README.md @@ -34,3 +34,4 @@ Here are some documents important for TEAMMATES developers. * [Setting up third-party email providers](emails.md). * [Setting up CAPTCHA](captcha.md). * [Snapshot testing](snapshot-testing.md) +* [E2E testing](e2e-testing.md) diff --git a/docs/development.md b/docs/development.md index 6a62f55587c..1c5d6eeb62c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -159,48 +159,9 @@ POST http://localhost:8080/_ah/login?action=Log+Out There are two big categories of testing in TEAMMATES: - **Component tests**: white-box unit and integration tests, i.e. they test the application components with full knowledge of the components' internal workings. This is configured in `src/test/resources/testng-component.xml` (back-end) and `src/web/jest.config.js` (front-end). -- **E2E (end-to-end) tests**: black-box tests, i.e. they test the application as a whole without knowing any internal working. This is configured in `src/e2e/resources/testng-e2e.xml`. +- **E2E (end-to-end) tests**: black-box tests, i.e. they test the application as a whole without knowing any internal working. This is configured in `src/e2e/resources/testng-e2e.xml`. To learn more about E2E tests, refer to this [document](https://github.com/TEAMMATES/teammates/blob/master/docs/e2e-testing.md). -### Configuring browsers for E2E Testing - -TEAMMATES E2E testing requires Firefox or Chrome. - -Before running tests, modify `src/e2e/resources/test.properties` if necessary, e.g. to configure which browser and test accounts to use. - -#### Using Firefox - -* You need to use geckodriver for testing with Firefox. - * Download the latest stable geckodriver from [here](https://github.com/mozilla/geckodriver/releases). - The site will also inform the versions of Firefox that can be used with the driver. - * Specify the path to the geckodriver executable in `test.geckodriver.path` value in `test.properties`. - -* If you want to use a Firefox version other than your computer's default, specify the custom path in `test.firefox.path` value in `test.properties`. - -* If you are planning to test changes to JavaScript code, disable JavaScript caching for Firefox: - * Enter `about:config` into the Firefox address bar and set `network.http.use-cache` (or `browser.cache.disk.enable` in newer versions of Firefox) to `false`. - -#### Using Chrome - -* You need to use chromedriver for testing with Chrome. - * Download the latest stable chromedriver from [here](https://sites.google.com/a/chromium.org/chromedriver/downloads). - The site will also inform the versions of Chrome that can be used with the driver. - * Specify the path to the chromedriver executable in `test.chromedriver.path` value in `test.properties`. - -* If you are planning to test changes to JavaScript code, disable JavaScript caching for Chrome: - * Press Ctrl+Shift+J to bring up the Web Console. - * Click on the settings button at the bottom right corner. - * Under the General tab, check "Disable Cache". - -* The chromedriver process started by the test suite will not automatically get killed after the tests have finished executing.
- You will need to manually kill these processes after the tests are done. - * On Windows, use the Task Manager or `taskkill /f /im chromedriver.exe` command. - * On OS X, use the Activity Monitor or `sudo killall chromedriver` command. - -### Running the tests - -- When running the test cases, a few cases may fail (this can happen due to timing issues). They can be re-run until they pass without affecting the accuracy of the tests. - -#### Running the tests with command line +#### Running the tests To run all front-end component tests in watch mode (i.e. any change to source code will automatically reload the tests), run the following command: ```sh @@ -216,17 +177,12 @@ To run an individual test in a test file, change `it` in the `*.spec.ts` file to To run all tests in a test file (or all test files matching a pattern), you can use Jest's watch mode and filter by filename pattern. -Back-end component tests and E2E tests follow this configuration: +Back-end component tests follow this configuration: Test suite | Command | Results can be viewed in ---|---|--- `Component tests` | `./gradlew componentTests` | `{project folder}/build/reports/tests/componentTests/index.html` -`E2E tests` | `./gradlew e2eTests` | `{project folder}/build/reports/e2e-test-try-{n}/index.html`, where `{n}` is the sequence number of the test run Any individual component test | `./gradlew componentTests --tests TestClassName` | `{project folder}/build/reports/tests/componentTests/index.html` -Any individual E2E test | `./gradlew e2eTestTry1 --tests TestClassName` | `{project folder}/build/reports/e2e-test-try-1/index.html` - -- `E2E tests` will be run in their entirety once and the failed tests will be re-run a few times. All other test suites will be run once and only once. -- Before running `E2E tests`, it is important to have the both front-end and back-end dev servers running locally first if you are testing against them. You can generate the coverage data with `jacocoReport` task after running tests, e.g.: ```sh @@ -234,24 +190,6 @@ You can generate the coverage data with `jacocoReport` task after running tests, ``` The report can be found in the `build/reports/jacoco/jacocoReport/` directory. -### Testing against production server - -If you are testing against a production server (staging server or live server), some additional tasks need to be done. - -1. You need to setup a `Gmail API`1 as follows: - * [Obtain a Gmail API credentials](https://github.com/TEAMMATES/teammates-ops/blob/master/platform-guide.md) and download it. - * Copy the file to `src/e2e/resources/gmail-api` (create the `gmail-api` folder) of your project and rename it to `client_secret.json`. - * It is also possible to use the Gmail API credentials from any other Google Cloud Platform project for this purpose. - -1. Edit `src/e2e/resources/test.properties` as instructed is in its comments. - * In particular, you will need legitimate Google accounts to be used for testing. - -1. Run the full test suite or any subset of it as how you would have done it in dev server. - * Do note that the GAE daily quota is usually not enough to run the full test suite, in particular for accounts with no billing enabled. - -1 This setup is necessary because our test suite uses the Gmail API to access Gmail accounts used for testing (these accounts are specified in `test.properties`) to confirm that those accounts receive the expected emails from TEAMMATES. -This is needed only when testing against a production server because no actual emails are sent by the dev server and therefore delivery of emails is not tested when testing against the dev server. - ## Deploying to a staging server > `Staging server` is the server instance you set up on Google App Engine for hosting the app for testing purposes. diff --git a/docs/e2e-testing.md b/docs/e2e-testing.md new file mode 100644 index 00000000000..d083a936516 --- /dev/null +++ b/docs/e2e-testing.md @@ -0,0 +1,141 @@ +# E2E Testing + +* [What is E2E Testing](#what-is-e2e-testing) +* [Running E2E Tests](#running-e2e-tests) + * [Configuring browsers for E2E Testing](#configuring-browsers-for-e2e-testing) + * [Running the tests](#running-the-tests) + * [Testing against production server](#testing-against-production-server) +* [Creating E2E Tests](#creating-e2e-tests) + * [Page Object Pattern](#page-object-pattern) + * [Creating Page Objects](#creating-page-objects) + * [Things to avoid when writing E2E tests](#things-to-avoid-when-writing-e2e-tests) + * [FAQ](#faq) + +## What is E2E Testing? + +E2E (End-to-end) testing is a testing methodology where the objective is to test the application as a whole. +- It aims to ensure all integrated components of the application work together as expected when it is being used by the end user. +- This is done by simulating user scenarios on the fully built product. + +E2E tests in TEAMMATES can be found in the package `teammates.e2e`. + +## Running E2E tests + +### Configuring browsers for E2E Testing + +TEAMMATES E2E testing requires Firefox or Chrome. + +Before running tests, modify `src/e2e/resources/test.properties` if necessary, e.g. to configure which browser and test accounts to use. + +#### Using Firefox + +* You need to use geckodriver for testing with Firefox. + * Download the latest stable geckodriver from [here](https://github.com/mozilla/geckodriver/releases). + The site will also inform the versions of Firefox that can be used with the driver. + * Specify the path to the geckodriver executable in `test.geckodriver.path` value in `test.properties`. + +* If you want to use a Firefox version other than your computer's default, specify the custom path in `test.firefox.path` value in `test.properties`. + +* If you are planning to test against a production server, specify the Firefox profile to be used in `test.firefox.profile.name` value in `test.properties`. + * This is used to bypass login by using previous login data. + * You can enter `about:profiles` into Firefox address bar to identify the profile being used. + +#### Using Chrome + +* You need to use chromedriver for testing with Chrome. + * Download the latest stable chromedriver from [here](https://sites.google.com/a/chromium.org/chromedriver/downloads). + The site will also inform the versions of Chrome that can be used with the driver. + * Specify the path to the chromedriver executable in `test.chromedriver.path` value in `test.properties`. + +* If you are planning to test against a production server, specify the path to Chrome's user data directory in `test.chrome.userdata.path` value in `test.properties`. + * This is used to bypass login by using previous login data. + +* The chromedriver process started by the test suite will not automatically get killed after the tests have finished executing.
+ You will need to manually kill these processes after the tests are done. + * On Windows, use the Task Manager or `taskkill /f /im chromedriver.exe` command. + * On OS X, use the Activity Monitor or `sudo killall chromedriver` command. + +### Running the tests +E2E tests follow this configuration: + +Test suite | Command | Results can be viewed in +---|---|--- +`E2E tests` | `./gradlew e2eTests` | `{project folder}/build/reports/e2e-test-try-{n}/index.html`, where `{n}` is the sequence number of the test run +Any individual E2E test | `./gradlew e2eTestTry1 --tests TestClassName` | `{project folder}/build/reports/e2e-test-try-1/index.html` + +- `E2E tests` will be run in their entirety once and the failed tests will be re-run a few times. +- Before running `E2E tests`, it is important to have the dev server running locally first if you are testing against it. +- When running the test cases, a few cases may fail (this can happen due to timing issues). They can be re-run until they pass without affecting the accuracy of the tests. + +### Testing against production server + +If you are testing against a production server (staging server or live server), some additional tasks need to be done. + +1. You need to setup a `Gmail API`1 as follows: + * [Obtain a Gmail API credentials](https://github.com/TEAMMATES/teammates-ops/blob/master/platform-guide.md) and download it. + * Copy the file to `src/e2e/resources/gmail-api` (create the `gmail-api` folder) of your project and rename it to `client_secret.json`. + * It is also possible to use the Gmail API credentials from any other Google Cloud Platform project for this purpose. + +1. Edit `src/e2e/resources/test.properties` as instructed is in its comments. + * In particular, you will need a legitimate Gmail account to be used for testing. + +1. Login manually to TEAMMATES on the browser used for testing to add cookie with login details to the browser profile. + * This profile will be added to the web driver so that E2E tests will start with user already logged in. + * This is required as Google does not allow login by automated software. + +1. For Firefox, run the full test suite or any subset of it as how you would have done it in dev server. + * Do note that the GAE daily quota is usually not enough to run the full test suite, in particular for accounts with no billing enabled. + +1. For Chrome, you may have to run tests one at a time as multiple ChromeDriver instances cannot be opened with the same user data. + +1 This setup is necessary because our test suite uses the Gmail API to access the Gmail account used for testing (the account is specified in `test.properties`) to confirm that the account receives the expected emails from TEAMMATES. +This is needed only when testing against a production server because no actual emails are sent by the dev server and therefore delivery of emails is not tested when testing against the dev server. + +## Creating E2E tests + +As E2E tests should be written from the end user perspective, each test case should reflect some user workflow. + +In TEAMMATES, E2E test cases are organized by page. For each page, we: +1. Identify the important user workflows +1. Simulate the user actions involved in the workflow by interacting with the UI elements. +1. Assert the expected conditions are present after the interaction. + +[Selenium](https://www.selenium.dev/) is used to locate and interact with elements in the UI. + +All E2E test classes inherit from `BaseE2ETestCase` which contains methods that are common to most test cases, such as preparing the `Browser` object used for testing. + +To help verify the state of the datastore, `BackDoor` contains methods to create API calls to the back-end without going through the UI. + +### Page Object Pattern + +In order to make E2E testing more robust to UI changes, the [Page Object Pattern](https://martinfowler.com/bliki/PageObject.html) is adopted. + +Each page in TEAMMATES is represented by a page object class. The page object class abstracts interactions with UI elements and only exposes the functionality of each page as methods. +- This way only the page object classes require updating when there are UI changes +- Without Page Object Pattern, all test cases that use the changed UI element would require updating + +To maximise the effectiveness of Page Object Pattern, interaction with UI elements should not occur outside the page objects. + + +### Creating Page Objects + +The page object should have methods to represent the main functionality of the page that testers can use to simulate user actions. +- The public methods for page objects should avoid exposing the UI elements it interacts with and instead focus on the functionality of the webpage. +- For example, instead of having methods like `fillSearchBox` and `clickSearchButton`, it is better to have a method `searchForInstructor` which hides the UI elements used. + +All Page Object classes inherit from `AppPage` which contains methods that are common for interacting with the web elements such as filling in textboxes. + + +### Things to avoid when writing E2E tests + +1. **Testing based on implementation** - The focus should be on user actions instead of implementation details. Therefore, black box testing should be adopted and test cases should be designed around use cases. +1. **Excessive exception testing** - Testing edge cases with E2E tests should be avoided. This is because E2E tests are expensive to run and not that effective for isolating bugs. Hence we should focus on the happy path and exception paths that are more common. We should leave more exhaustive testing to lower-level unit or integration tests. +1. **Not following “Tell Don’t Ask" Principle** - Instead of “asking” for data from the page objects and performing operations on them, “tell” the page object to do the operations. This is mostly seen in the verification methods where assertions are done in the page object instead of in the test case. This improves readability and maintainability as data and behavior are placed together. + +### FAQ + +**Why are all the tests done in one `testAll()` method?** +We bundle together everything as one test case instead of having multiple test cases. The advantage is that the time for the whole test class will be reduced because we minimize repetitive per-method setup/teardown. The downside is that it increases the time spent on re-running failed tests as the whole class has to be re-run. We opt for this approach because we expect tests to pass more frequently than to fail. + +**Why is there one JSON file for each test case?** +Each test case has its own JSON file and the data inside has a unique prefix to prevent clashes in the database that may cause test failure, since tests are run concurrently. \ No newline at end of file diff --git a/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java index 4e2d3e51271..7996ae64620 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminAccountsPageE2ETest.java @@ -21,6 +21,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { String googleId = "tm.e2e.AAccounts.instr2"; diff --git a/src/e2e/java/teammates/e2e/cases/AdminHomePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminHomePageE2ETest.java index 03f729df41a..46da0fc2053 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminHomePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminHomePageE2ETest.java @@ -18,6 +18,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.ADMIN_HOME_PAGE); AdminHomePage homePage = loginAdminToPage(url, AdminHomePage.class); diff --git a/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java index 68aa877a3da..834c849b783 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminSearchPageE2ETest.java @@ -28,7 +28,8 @@ protected void prepareTestData() { } @Test - public void allTests() { + @Override + public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.ADMIN_SEARCH_PAGE); searchPage = loginAdminToPage(url, AdminSearchPage.class); diff --git a/src/e2e/java/teammates/e2e/cases/AdminSessionsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/AdminSessionsPageE2ETest.java index 0c4d9b0e977..4ca4ce44a6b 100644 --- a/src/e2e/java/teammates/e2e/cases/AdminSessionsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AdminSessionsPageE2ETest.java @@ -67,6 +67,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("verify loaded data"); diff --git a/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java b/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java index e9414c2f82f..e8036ecf47e 100644 --- a/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/AutomatedSessionRemindersE2ETest.java @@ -56,27 +56,31 @@ protected void prepareTestData() { // In all the tests, we need to explicitly log in as admin // because the cron job URLs are additionally protected by admin constraint in web.xml // and adding backdoor key is not sufficient to bypass it - @Test - public void testFeedbackSessionOpeningReminders() { + @Override + public void testAll() { + testFeedbackSessionOpeningReminders(); + testFeedbackSessionClosingReminders(); + testFeedbackSessionClosedReminders(); + testFeedbackSessionPublishedReminders(); + } + + private void testFeedbackSessionOpeningReminders() { AppUrl openingRemindersUrl = createUrl(Const.CronJobURIs.AUTOMATED_FEEDBACK_OPENING_REMINDERS); loginAdminToPage(openingRemindersUrl, GenericAppPage.class); } - @Test - public void testFeedbackSessionClosingReminders() { + private void testFeedbackSessionClosingReminders() { AppUrl closingRemindersUrl = createUrl(Const.CronJobURIs.AUTOMATED_FEEDBACK_CLOSING_REMINDERS); loginAdminToPage(closingRemindersUrl, GenericAppPage.class); } - @Test - public void testFeedbackSessionClosedReminders() { + private void testFeedbackSessionClosedReminders() { AppUrl closedRemindersUrl = createUrl(Const.CronJobURIs.AUTOMATED_FEEDBACK_CLOSED_REMINDERS); loginAdminToPage(closedRemindersUrl, GenericAppPage.class); } - @Test - public void testFeedbackSessionPublishedReminders() { + private void testFeedbackSessionPublishedReminders() { AppUrl publishedRemindersUrl = createUrl(Const.CronJobURIs.AUTOMATED_FEEDBACK_PUBLISHED_REMINDERS); loginAdminToPage(publishedRemindersUrl, GenericAppPage.class); } diff --git a/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java b/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java index f2e3d67252d..9e5dfe3471d 100644 --- a/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java +++ b/src/e2e/java/teammates/e2e/cases/BaseE2ETestCase.java @@ -60,6 +60,8 @@ protected void prepareBrowser() { protected abstract void prepareTestData() throws Exception; + protected abstract void testAll(); + @Override protected String getTestDataFolder() { return TestProperties.TEST_DATA_FOLDER; diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java index e08fb8b1426..20fa4f2ad09 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumOptionQuestionE2ETest.java @@ -30,6 +30,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java index 8178120f7d5..0f3e806a957 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackConstSumRecipientQuestionE2ETest.java @@ -31,6 +31,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java index 14b82b77200..016ada67b24 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackContributionQuestionE2ETest.java @@ -32,6 +32,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java index 6f0ba01f58a..a135e2785d6 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackMcqQuestionE2ETest.java @@ -31,6 +31,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java index f949a098eef..115b89f566d 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackMsqQuestionE2ETest.java @@ -33,6 +33,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java index 7a7f9b59c70..00019d8a830 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackNumScaleQuestionE2ETest.java @@ -28,6 +28,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java index 3c974d0833f..7cfed14473a 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRankOptionQuestionE2ETest.java @@ -33,6 +33,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java index b2eca8c5293..e6428106ac6 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRankRecipientQuestionE2ETest.java @@ -33,6 +33,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java index 08e6ed45155..1c1091bb024 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackRubricQuestionE2ETest.java @@ -32,6 +32,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java index 65d485bab15..61cd61d3c7f 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackSubmitPageE2ETest.java @@ -46,6 +46,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_SESSION_SUBMISSION_PAGE) .withUserId(instructor.getGoogleId()) diff --git a/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java index 4fd3d58e8c6..4127d7d62c3 100644 --- a/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/FeedbackTextQuestionE2ETest.java @@ -28,6 +28,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { testEditPage(); testSubmitPage(); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java index a2c925edf28..e04f5707cb1 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseDetailsPageE2ETest.java @@ -45,7 +45,8 @@ public void classSetup() { } @Test - public void allTests() { + @Override + public void testAll() { AppUrl detailsPageUrl = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_DETAILS_PAGE) .withUserId(testData.instructors.get("ICDet.instr").googleId) .withCourseId(course.getId()); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java index 296200041f6..17eb1a6f036 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseEditPageE2ETest.java @@ -32,6 +32,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("verify cannot edit without privilege"); // log in as instructor with no edit privilege diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java index c5931cbdb47..d3c6e2d68fc 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseEnrollPageE2ETest.java @@ -19,6 +19,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_ENROLL_PAGE) .withUserId(testData.instructors.get("ICEnroll.teammates.test").googleId) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java index b0ba7665113..baeeddf327b 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseJoinConfirmationPageE2ETest.java @@ -26,6 +26,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("Click join link: invalid key"); String invalidEncryptedKey = "invalidKey"; diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java index 571d38b0997..68a8376b276 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsEditPageE2ETest.java @@ -29,6 +29,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl editPageUrl = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSE_STUDENT_DETAILS_EDIT_PAGE) .withUserId(testData.instructors.get("ICSDetEdit.instr").googleId) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java index bed7c0a92c6..f924684d5a7 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCourseStudentDetailsPageE2ETest.java @@ -21,6 +21,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("verify loaded details - student with profile"); StudentAttributes student = testData.students.get("ICSDet.jose.tmms"); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java index a87fd8fca65..ea4caaef80c 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorCoursesPageE2ETest.java @@ -43,6 +43,7 @@ public void classSetup() { } @Test + @Override public void testAll() { String instructorId = testData.accounts.get("instructor").getGoogleId(); AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_COURSES_PAGE) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java index 578c08a0c2f..6872a5e761d 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackEditPageE2ETest.java @@ -39,7 +39,8 @@ protected void prepareTestData() { } @Test - public void allTests() throws Exception { + @Override + public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_SESSION_EDIT_PAGE) .withUserId(instructor.googleId) .withCourseId(course.getId()) diff --git a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java index 3a402dec4ca..225a4ccd394 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorFeedbackSessionsPageE2ETest.java @@ -74,7 +74,8 @@ public void classSetup() { } @Test - public void allTests() { + @Override + public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_SESSIONS_PAGE).withUserId(instructor.googleId); InstructorFeedbackSessionsPage feedbackSessionsPage = loginAdminToPage(url, InstructorFeedbackSessionsPage.class); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java index f4a778a89cc..0078d5bd234 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorHomePageE2ETest.java @@ -66,7 +66,8 @@ public void classSetup() { } @Test - public void allTests() { + @Override + public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.INSTRUCTOR_HOME_PAGE).withUserId(instructor.googleId); InstructorHomePage homePage = loginAdminToPage(url, InstructorHomePage.class); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorSearchPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorSearchPageE2ETest.java index 8209d6d940a..ff2742c503c 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorSearchPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorSearchPageE2ETest.java @@ -27,7 +27,8 @@ protected void prepareTestData() { } @Test - public void allTests() { + @Override + public void testAll() { String instructorId = testData.accounts.get("instructor1OfCourse1").googleId; AppUrl searchPageUrl = createUrl(Const.WebPageURIs.INSTRUCTOR_SEARCH_PAGE).withUserId(instructorId); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorStudentListPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorStudentListPageE2ETest.java index 86a3eecbcab..749e173e4bb 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorStudentListPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorStudentListPageE2ETest.java @@ -28,6 +28,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("verify loaded data"); diff --git a/src/e2e/java/teammates/e2e/cases/InstructorStudentRecordsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/InstructorStudentRecordsPageE2ETest.java index 1665f9f9a5d..858e7b06645 100644 --- a/src/e2e/java/teammates/e2e/cases/InstructorStudentRecordsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/InstructorStudentRecordsPageE2ETest.java @@ -21,6 +21,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("verify loaded data: student details"); diff --git a/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java index 47dc0cdd283..28fa4d1b04c 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentCourseDetailsPageE2ETest.java @@ -21,6 +21,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.STUDENT_COURSE_DETAILS_PAGE) diff --git a/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java index b07e66f9895..c196252aa65 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentCourseJoinConfirmationPageE2ETest.java @@ -26,6 +26,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("Click join link: invalid key"); String courseId = testData.courses.get("SCJoinConf.CS2104").getId(); diff --git a/src/e2e/java/teammates/e2e/cases/StudentFeedbackResultsPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentFeedbackResultsPageE2ETest.java index 8483dacd5d9..6babc47149e 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentFeedbackResultsPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentFeedbackResultsPageE2ETest.java @@ -41,6 +41,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("unregistered student: can access results"); diff --git a/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java index 86cbba35a7d..ccbed4e7cdd 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentHomePageE2ETest.java @@ -25,6 +25,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { AppUrl url = createUrl(Const.WebPageURIs.STUDENT_HOME_PAGE).withUserId("tm.e2e.SHome.student"); diff --git a/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java b/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java index d4a61459efa..47ffed81eab 100644 --- a/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/StudentProfilePageE2ETest.java @@ -19,6 +19,7 @@ protected void prepareTestData() { } @Test + @Override public void testAll() { ______TS("Typical case: Log in with filled profile values"); diff --git a/src/e2e/java/teammates/e2e/cases/SystemErrorEmailReportE2ETest.java b/src/e2e/java/teammates/e2e/cases/SystemErrorEmailReportE2ETest.java index df316cd9197..c9cf2095bae 100644 --- a/src/e2e/java/teammates/e2e/cases/SystemErrorEmailReportE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/SystemErrorEmailReportE2ETest.java @@ -26,6 +26,7 @@ protected void prepareBrowser() { } @Test + @Override public void testAll() { testAssertionError(); testNullPointerException(); diff --git a/src/e2e/java/teammates/e2e/cases/TimezoneSyncerTest.java b/src/e2e/java/teammates/e2e/cases/TimezoneSyncerTest.java index 7d4e4855301..cb6baf224a0 100644 --- a/src/e2e/java/teammates/e2e/cases/TimezoneSyncerTest.java +++ b/src/e2e/java/teammates/e2e/cases/TimezoneSyncerTest.java @@ -12,7 +12,6 @@ import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import teammates.common.util.Const; @@ -37,15 +36,13 @@ public void classSetup() { loginAdmin(); } - @BeforeMethod - public void navigateToTimezonePage() { + @Test + @Override + public void testAll() { browser.driver.get(createUrl(Const.WebPageURIs.ADMIN_TIMEZONE_PAGE).toAbsoluteString()); browser.waitForPageLoad(); - } - @Test - public void testFrontendBackendTimezoneDatabasesAreConsistent() { - // ensure the front-end and the back-end have the same timezone database version + ______TS("ensure the front-end and the back-end have the same timezone database version"); Document pageSource = Jsoup.parse(browser.driver.getPageSource()); String javaOffsets = processOffsets(pageSource.getElementById("tz-java").text()); String momentOffsets = processOffsets(pageSource.getElementById("tz-moment").text()); @@ -56,11 +53,8 @@ public void testFrontendBackendTimezoneDatabasesAreConsistent() { assertEquals("" + System.lineSeparator() + javaOffsets + "", "" + System.lineSeparator() + momentOffsets + ""); } - } - @Test - public void testTimezoneDatabasesAreUpToDate() { - // ensure the timezone databases are up-to-date + ______TS("ensure the timezone databases are up-to-date"); String currentTzVersion = Jsoup.parse(browser.driver.getPageSource()).getElementById("tzversion-moment").text(); browser.driver.get(IANA_TIMEZONE_DATABASE_URL); Document tzReleasePage = Jsoup.parse(browser.driver.getPageSource()); From 0035a687ae6a94771afcab75c1241abacfbd1710 Mon Sep 17 00:00:00 2001 From: Jessica Rairigh <67874354+jfrairigh@users.noreply.github.com> Date: Tue, 3 Nov 2020 01:35:14 -0600 Subject: [PATCH 4/6] [#10580] Student view team page: Loading Indicator for loading teammates not centralised (#10790) * centralised loading indicator on Student view team page #10580 * fixed indidation for solution that centralized Student view team page loading indicator #10790 * fixed indidation for solution that centralized Student view team page loading indicator #10790 * snap updated after fixing indentation for solution in PR 10790 Co-authored-by: Ahmed Bahajjaj --- ...course-details-page.component.spec.ts.snap | 36 +++++++------------ ...student-course-details-page.component.html | 4 +-- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/src/web/app/pages-student/student-course-details-page/__snapshots__/student-course-details-page.component.spec.ts.snap b/src/web/app/pages-student/student-course-details-page/__snapshots__/student-course-details-page.component.spec.ts.snap index 3c62b3336bc..e2cf8d81878 100644 --- a/src/web/app/pages-student/student-course-details-page/__snapshots__/student-course-details-page.component.spec.ts.snap +++ b/src/web/app/pages-student/student-course-details-page/__snapshots__/student-course-details-page.component.spec.ts.snap @@ -29,31 +29,21 @@ exports[`StudentCourseDetailsPageComponent should snap when all data are still l -
+
- - - -
-
-
- Loading... -
-
- +
+
+ Loading... +
-
+
`; @@ -93,7 +83,6 @@ exports[`StudentCourseDetailsPageComponent should snap with default fields 1`] = class="row top-padded" > -
@@ -366,7 +355,6 @@ exports[`StudentCourseDetailsPageComponent should snap with populated fields 1`] Your teammates:
-
diff --git a/src/web/app/pages-student/student-course-details-page/student-course-details-page.component.html b/src/web/app/pages-student/student-course-details-page/student-course-details-page.component.html index 3edd042144d..709d036602c 100644 --- a/src/web/app/pages-student/student-course-details-page/student-course-details-page.component.html +++ b/src/web/app/pages-student/student-course-details-page/student-course-details-page.component.html @@ -85,12 +85,12 @@
Sort By:
-
+
Your teammates:
-
+
From dda027eb5200cdf4fdf99d12374c27aa54f47a67 Mon Sep 17 00:00:00 2001 From: Ahmed Bahajjaj Date: Thu, 5 Nov 2020 19:01:58 +0800 Subject: [PATCH 5/6] [#10828] MCQ questions: submitted comments not shown (#10831) * Refactor loop to use responses * Add test for comment retrieval --- .../ui/output/FeedbackResponsesData.java | 9 +++++ .../ui/webapi/GetFeedbackResponsesAction.java | 25 +++++++++----- .../GetFeedbackResponsesActionTest.java | 34 +++++++++++++++++++ 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/main/java/teammates/ui/output/FeedbackResponsesData.java b/src/main/java/teammates/ui/output/FeedbackResponsesData.java index 215987ccdcd..74db4703828 100644 --- a/src/main/java/teammates/ui/output/FeedbackResponsesData.java +++ b/src/main/java/teammates/ui/output/FeedbackResponsesData.java @@ -1,5 +1,6 @@ package teammates.ui.output; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -16,6 +17,14 @@ public FeedbackResponsesData(List responses) { this.responses = responses.stream().map(FeedbackResponseData::new).collect(Collectors.toList()); } + public FeedbackResponsesData() { + responses = Collections.emptyList(); + } + + public void setResponses(List responses) { + this.responses = responses; + } + public List getResponses() { return responses; } diff --git a/src/main/java/teammates/ui/webapi/GetFeedbackResponsesAction.java b/src/main/java/teammates/ui/webapi/GetFeedbackResponsesAction.java index 2280d5601f9..5ca09ae8e49 100644 --- a/src/main/java/teammates/ui/webapi/GetFeedbackResponsesAction.java +++ b/src/main/java/teammates/ui/webapi/GetFeedbackResponsesAction.java @@ -1,5 +1,6 @@ package teammates.ui.webapi; +import java.util.LinkedList; import java.util.List; import teammates.common.datatransfer.attributes.FeedbackQuestionAttributes; @@ -14,6 +15,7 @@ import teammates.common.exception.InvalidHttpParameterException; import teammates.common.util.Const; import teammates.ui.output.FeedbackResponseCommentData; +import teammates.ui.output.FeedbackResponseData; import teammates.ui.output.FeedbackResponsesData; import teammates.ui.request.Intent; @@ -77,18 +79,23 @@ JsonResult execute() { throw new InvalidHttpParameterException("Unknown intent " + intent); } - FeedbackResponsesData result = new FeedbackResponsesData(responses); - result.getResponses().forEach(response -> { - if (questionAttributes.getQuestionType() != FeedbackQuestionType.MCQ) { + List responsesData = new LinkedList<>(); + responses.forEach(response -> { + FeedbackResponseData data = new FeedbackResponseData(response); + if (questionAttributes.getQuestionType() == FeedbackQuestionType.MCQ) { // Only MCQ questions can have participant comment - return; - } - FeedbackResponseCommentAttributes comment = - logic.getFeedbackResponseCommentForResponseFromParticipant(response.getFeedbackResponseId()); - if (comment != null) { - response.setGiverComment(new FeedbackResponseCommentData(comment)); + FeedbackResponseCommentAttributes comment = + logic.getFeedbackResponseCommentForResponseFromParticipant(response.getId()); + if (comment != null) { + data.setGiverComment(new FeedbackResponseCommentData(comment)); + } } + responsesData.add(data); }); + FeedbackResponsesData result = new FeedbackResponsesData(); + if (!responsesData.isEmpty()) { + result.setResponses(responsesData); + } return new JsonResult(result); } diff --git a/src/test/java/teammates/ui/webapi/GetFeedbackResponsesActionTest.java b/src/test/java/teammates/ui/webapi/GetFeedbackResponsesActionTest.java index 966cb954690..d9523a0fae9 100644 --- a/src/test/java/teammates/ui/webapi/GetFeedbackResponsesActionTest.java +++ b/src/test/java/teammates/ui/webapi/GetFeedbackResponsesActionTest.java @@ -5,9 +5,11 @@ import org.apache.http.HttpStatus; import org.testng.annotations.Test; +import teammates.common.datatransfer.DataBundle; import teammates.common.datatransfer.FeedbackParticipantType; import teammates.common.datatransfer.attributes.FeedbackQuestionAttributes; import teammates.common.datatransfer.attributes.FeedbackResponseAttributes; +import teammates.common.datatransfer.attributes.FeedbackResponseCommentAttributes; import teammates.common.datatransfer.attributes.FeedbackSessionAttributes; import teammates.common.datatransfer.attributes.InstructorAttributes; import teammates.common.datatransfer.attributes.StudentAttributes; @@ -17,6 +19,7 @@ import teammates.common.util.Const; import teammates.common.util.JsonUtils; import teammates.common.util.StringHelper; +import teammates.ui.output.FeedbackResponseCommentData; import teammates.ui.output.FeedbackResponseData; import teammates.ui.output.FeedbackResponsesData; import teammates.ui.request.Intent; @@ -123,6 +126,29 @@ protected void testExecute_instructorSubmission_shouldGetResponseSuccessfully() verifyFeedbackResponseEquals(expected, actualResponse); } + @Test + protected void testExecute_commentSubmission_shouldGetCommentsSuccessfully() throws InvalidParametersException { + DataBundle dataBundle = loadDataBundle("/FeedbackResponseCommentCRUDTest.json"); + removeAndRestoreDataBundle(dataBundle); + StudentAttributes student1InCourse1 = dataBundle.students.get("student1InCourse1"); + FeedbackQuestionAttributes qn3InSession1 = dataBundle.feedbackQuestions.get("qn3InSession1"); + FeedbackResponseAttributes response1ForQ3 = dataBundle.feedbackResponses.get("response1ForQ3"); + FeedbackResponseCommentAttributes comment1FromStudent1 = + dataBundle.feedbackResponseComments.get("comment1FromStudent1"); + + loginAsStudent(student1InCourse1.getGoogleId()); + String[] params = { + Const.ParamsNames.FEEDBACK_QUESTION_ID, qn3InSession1.getId(), + Const.ParamsNames.INTENT, Intent.STUDENT_SUBMISSION.toString(), + }; + FeedbackResponsesData actualData = getFeedbackResponse(params); + List actualResponses = actualData.getResponses(); + + assertEquals(1, actualResponses.size()); + verifyFeedbackResponseEquals(response1ForQ3, actualResponses.get(0)); + verifyFeedbackCommentEquals(comment1FromStudent1, actualResponses.get(0).getGiverComment()); + } + @Test @Override protected void testAccessControl() throws Exception { @@ -261,4 +287,12 @@ private void verifyFeedbackResponseEquals(FeedbackResponseAttributes expected, F assertEquals(JsonUtils.toJson(expected.getResponseDetails()), JsonUtils.toJson(actual.getResponseDetails())); } + + private void verifyFeedbackCommentEquals( + FeedbackResponseCommentAttributes expected, FeedbackResponseCommentData actual) { + assertNotNull(actual); + assertEquals(expected.getCommentGiver(), actual.getCommentGiver()); + assertEquals(expected.getCommentText(), actual.getCommentText()); + assertEquals(expected.getLastEditorEmail(), actual.getLastEditorEmail()); + } } From d3d2ba86fc181c7f116052e727c0495bf6b629c8 Mon Sep 17 00:00:00 2001 From: Ahmed Bahajjaj Date: Sun, 8 Nov 2020 22:12:50 +0800 Subject: [PATCH 6/6] [#10834] Update developers.json (#10837) --- src/web/data/developers.json | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/web/data/developers.json b/src/web/data/developers.json index bcb2634e30d..59c55528dc1 100644 --- a/src/web/data/developers.json +++ b/src/web/data/developers.json @@ -704,6 +704,11 @@ "name": "Jeffery Luangpakham", "username": "Jefferysan" }, + { + "multiple": true, + "name": "Jessica Rairigh", + "username": "jfrairigh" + }, { "multiple": true, "name": "Jiang Sheng", @@ -1204,6 +1209,10 @@ "name": "Phan Thi Quynh Trang", "username": "quynhtrang" }, + { + "name": "Phong Bach", + "username": "jasonbch" + }, { "username": "plucht" }, @@ -1461,6 +1470,10 @@ "name": "Shyam Gaurav Venkatesh", "username": "SamVenkatesh" }, + { + "name": "Si Tang", + "username": "IndeedSi" + }, { "multiple": true, "name": "Siddhant Gupta", @@ -1813,14 +1826,6 @@ { "name": "Zhu Yilun", "username": "yilun-zhu" - }, - { - "name": "Phong Bach", - "username": "jasonbch" - }, - { - "name": "Si Tang", - "username": "IndeedSi" } ], "committers": [