use of teammates.test.pageobjects.InstructorCourseStudentDetailsViewPage 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.InstructorCourseStudentDetailsViewPage in project teammates by TEAMMATES.
the class InstructorCourseStudentDetailsPageUiTest method testContent.
private void testContent() throws Exception {
______TS("content: registered student");
InstructorCourseStudentDetailsViewPage viewPage = getCourseStudentDetailsPage("registeredStudent");
// This is the full HTML verification for Instructor Student Details Page, the rest can all be verifyMainHtml
viewPage.verifyHtml("/instructorCourseStudentDetailsRegistered.html");
______TS("content: unregistered student");
viewPage = getCourseStudentDetailsPage("unregisteredStudent");
viewPage.verifyHtmlMainContent("/instructorCourseStudentDetailsUnregistered.html");
______TS("content: registered student with helper view");
// the helper here is configured to be able to view studentDetailsPage
instructorId = testData.instructors.get("CCSDetailsUiT.Helper").googleId;
viewPage = getCourseStudentDetailsPage("registeredStudent");
viewPage.verifyHtmlMainContent("/instructorCourseStudentDetailsRegisteredWithHelperView.html");
______TS("content: registered student with attempted script and html injection");
instructorId = testData.instructors.get("instructor1OfTestingSanitizationCourse").googleId;
courseId = testData.courses.get("testingSanitizationCourse").getId();
viewPage = getCourseStudentDetailsPage("student1InTestingSanitizationCourse");
viewPage.verifyHtmlMainContent("/instructorCourseStudentDetailsRegisteredWithAttemptedScriptInjection.html");
// TODO: add test for the comment box in this page
}
use of teammates.test.pageobjects.InstructorCourseStudentDetailsViewPage 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