use of teammates.test.pageobjects.InstructorCourseStudentDetailsEditPage in project teammates by TEAMMATES.
the class InstructorCourseDetailsPageUiTest method testLinks.
private void testLinks() {
StudentAttributes student1 = testData.students.get("CCDetailsUiT.alice.tmms@CCDetailsUiT.CS2104");
StudentAttributes student2 = testData.students.get("charlie.tmms@CCDetailsUiT.CS2104");
______TS("link: view");
InstructorCourseStudentDetailsViewPage studentDetailsPage = detailsPage.clickViewStudent(student1.name);
studentDetailsPage.verifyIsCorrectPage(student1.email);
studentDetailsPage.closeCurrentWindowAndSwitchToParentWindow();
______TS("link: edit");
InstructorCourseStudentDetailsEditPage studentEditPage = detailsPage.clickEditStudent(student2.name);
studentEditPage.verifyIsCorrectPage(student2.email);
studentEditPage.closeCurrentWindowAndSwitchToParentWindow();
______TS("link: all records");
InstructorStudentRecordsPage studentAllRecordsPage = detailsPage.clickAllRecordsLink(student2.name);
studentAllRecordsPage.verifyIsCorrectPage(student2.name);
studentAllRecordsPage.closeCurrentWindowAndSwitchToParentWindow();
studentAllRecordsPage = detailsPage.clickAllRecordsLink(student1.name);
studentAllRecordsPage.verifyIsCorrectPage(student1.name.replaceAll("<", "<").replaceAll(">", ">"));
studentAllRecordsPage.closeCurrentWindowAndSwitchToParentWindow();
______TS("link: download student list");
AppUrl studentListDownloadUrl = createUrl(Const.ActionURIs.INSTRUCTOR_COURSE_STUDENT_LIST_DOWNLOAD).withUserId("CCDetailsUiT.instr").withCourseId("CCDetailsUiT.CS2104");
detailsPage.verifyDownloadLink(studentListDownloadUrl);
}
use of teammates.test.pageobjects.InstructorCourseStudentDetailsEditPage in project teammates by TEAMMATES.
the class InstructorStudentListPageUiTest method testLinks.
private void testLinks() {
String instructorId = testData.instructors.get("instructorOfCourse2").googleId;
AppUrl viewPageUrl = createUrl(Const.ActionURIs.INSTRUCTOR_STUDENT_LIST_PAGE).withUserId(instructorId);
viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
______TS("link: enroll");
String courseId = testData.courses.get("course2").getId();
InstructorCourseEnrollPage enrollPage = viewPage.clickEnrollStudents(courseId);
enrollPage.verifyIsCorrectPage(courseId);
viewPage = enrollPage.goToPreviousPage(InstructorStudentListPage.class);
______TS("link: view");
StudentAttributes student1 = testData.students.get("Student2Course2");
viewPage.checkCourse(0);
viewPage.checkCourse(1);
ThreadHelper.waitFor(500);
InstructorCourseStudentDetailsViewPage studentDetailsPage = viewPage.clickViewStudent(student1.course, student1.name);
studentDetailsPage.verifyIsCorrectPage(student1.email);
studentDetailsPage.closeCurrentWindowAndSwitchToParentWindow();
viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
______TS("link: edit");
StudentAttributes student2 = testData.students.get("Student3Course3");
viewPage.checkCourse(0);
viewPage.checkCourse(1);
ThreadHelper.waitFor(500);
InstructorCourseStudentDetailsEditPage studentEditPage = viewPage.clickEditStudent(student2.course, student2.name);
studentEditPage.verifyIsCorrectPage(student2.email);
studentEditPage.submitButtonClicked();
studentEditPage.closeCurrentWindowAndSwitchToParentWindow();
viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
______TS("link: view records");
viewPage.checkCourse(0);
viewPage.checkCourse(1);
ThreadHelper.waitFor(500);
InstructorStudentRecordsPage studentRecordsPage = viewPage.clickViewRecordsStudent(student2.course, student2.name);
studentRecordsPage.verifyIsCorrectPage(student2.name);
studentRecordsPage.closeCurrentWindowAndSwitchToParentWindow();
viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
}
Aggregations