forked from TEAMMATES/teammates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEAMMATES#12048] Migrate InstructorStudentRecordsPageE2ETest (TEAMMA…
…TES#13013) * migrate InstructorStudentRecordsPageE2ETest * Add InstructorStudentRecordsPageE2ETest to sql xml --------- Co-authored-by: Wei Qing <[email protected]>
- Loading branch information
1 parent
8ec6989
commit 63b3209
Showing
4 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
src/e2e/java/teammates/e2e/cases/sql/InstructorStudentRecordsPageE2ETest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package teammates.e2e.cases.sql; | ||
|
||
import org.testng.annotations.Test; | ||
|
||
import teammates.common.util.AppUrl; | ||
import teammates.common.util.Const; | ||
import teammates.e2e.pageobjects.InstructorStudentRecordsPage; | ||
import teammates.storage.sqlentity.Instructor; | ||
import teammates.storage.sqlentity.Student; | ||
|
||
/** | ||
* SUT: {@link Const.WebPageURIs#INSTRUCTOR_STUDENT_RECORDS_PAGE}. | ||
*/ | ||
public class InstructorStudentRecordsPageE2ETest extends BaseE2ETestCase { | ||
|
||
@Override | ||
protected void prepareTestData() { | ||
testData = removeAndRestoreDataBundle( | ||
loadSqlDataBundle("/InstructorStudentRecordsPageE2ETestSql.json")); | ||
} | ||
|
||
@Test | ||
@Override | ||
public void testAll() { | ||
|
||
______TS("verify loaded data: student details"); | ||
|
||
Instructor instructor = testData.instructors.get("teammates.test.CS2104"); | ||
Student student = testData.students.get("[email protected]"); | ||
|
||
String instructorId = instructor.getGoogleId(); | ||
String courseId = instructor.getCourseId(); | ||
String studentEmail = student.getEmail(); | ||
|
||
AppUrl recordsPageUrl = createFrontendUrl(Const.WebPageURIs.INSTRUCTOR_STUDENT_RECORDS_PAGE) | ||
.withCourseId(courseId) | ||
.withStudentEmail(studentEmail); | ||
|
||
InstructorStudentRecordsPage recordsPage = | ||
loginToPage(recordsPageUrl, InstructorStudentRecordsPage.class, instructorId); | ||
|
||
recordsPage.verifyStudentDetails(student); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
src/e2e/resources/data/InstructorStudentRecordsPageE2ETestSql.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{ | ||
"accounts": { | ||
"teammates.test": { | ||
"googleId": "tm.e2e.ISRecords.teammates.test", | ||
"name": "Teammates Test", | ||
"email": "[email protected]", | ||
"id": "00000000-0000-4000-8000-000000000001" | ||
}, | ||
"[email protected]": { | ||
"googleId": "tm.e2e.ISRecords.benny.c.tmms", | ||
"name": "Benny Charlés", | ||
"email": "[email protected]", | ||
"id": "00000000-0000-4000-8000-000000000002" | ||
} | ||
}, | ||
"accountRequests": {}, | ||
"courses": { | ||
"CS2104": { | ||
"id": "tm.e2e.ISRecords.CS2104", | ||
"name": "Programming Language Concepts", | ||
"timeZone": "UTC", | ||
"institute": "TEAMMATES Test Institute 1" | ||
} | ||
}, | ||
"sections": { | ||
"tm.e2e.ISRecords.CS2104-None": { | ||
"id": "00000000-0000-4000-8000-000000000201", | ||
"course": { | ||
"id": "tm.e2e.ISRecords.CS2104" | ||
}, | ||
"name": "None" | ||
} | ||
}, | ||
"teams": { | ||
"tm.e2e.ISRecords.CS2104-None-Team1": { | ||
"id": "00000000-0000-4000-8000-000000000301", | ||
"section": { | ||
"id": "00000000-0000-4000-8000-000000000201" | ||
}, | ||
"name": "Team 1" | ||
} | ||
}, | ||
"deadlineExtensions": {}, | ||
"instructors": { | ||
"teammates.test.CS2104": { | ||
"isDisplayedToStudents": true, | ||
"displayName": "Instructor", | ||
"role": "INSTRUCTOR_PERMISSION_ROLE_COOWNER", | ||
"privileges": { | ||
"courseLevel": { | ||
"canModifyCourse": true, | ||
"canModifyInstructor": true, | ||
"canModifySession": true, | ||
"canModifyStudent": true, | ||
"canViewStudentInSections": true, | ||
"canViewSessionInSections": true, | ||
"canSubmitSessionInSections": true, | ||
"canModifySessionCommentsInSections": true | ||
}, | ||
"sectionLevel": {}, | ||
"sessionLevel": {} | ||
}, | ||
"id": "00000000-0000-4000-8000-000000000501", | ||
"courseId": "tm.e2e.ISRecords.CS2104", | ||
"course": { | ||
"id": "tm.e2e.ISRecords.CS2104" | ||
}, | ||
"account": { | ||
"id": "00000000-0000-4000-8000-000000000001" | ||
}, | ||
"name": "Teammates Test", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"students": { | ||
"[email protected]": { | ||
"comments": "This student's name is Benny Charlés", | ||
"id": "00000000-0000-4000-8000-000000000601", | ||
"courseId": "tm.e2e.ISRecords.CS2104", | ||
"course": { | ||
"id": "tm.e2e.ISRecords.CS2104" | ||
}, | ||
"account": { | ||
"id": "00000000-0000-4000-8000-000000000002" | ||
}, | ||
"team": { | ||
"id": "00000000-0000-4000-8000-000000000301" | ||
}, | ||
"name": "Benny Charlés", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"feedbackSessions": {}, | ||
"feedbackQuestions": {}, | ||
"feedbackResponses": {}, | ||
"feedbackResponseComments": {}, | ||
"notifications": {}, | ||
"readNotifications": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters