use of teammates.test.pageobjects.InstructorFeedbackSessionsPage in project teammates by TEAMMATES.
the class InstructorHomePageUiTest method testCourseLinks.
private void testCourseLinks() {
String courseId = testData.courses.get("CHomeUiT.CS1101").getId();
String instructorId = testData.accounts.get("account").googleId;
______TS("link: course enroll");
InstructorCourseEnrollPage enrollPage = homePage.clickCourseEnrollLink(courseId);
enrollPage.verifyContains("Enroll Students for CHomeUiT.CS1101");
String expectedEnrollLinkText = createUrl(Const.ActionURIs.INSTRUCTOR_COURSE_ENROLL_PAGE).withCourseId(courseId).withUserId(instructorId).toAbsoluteString();
assertEquals(expectedEnrollLinkText, browser.driver.getCurrentUrl());
homePage.goToPreviousPage(InstructorHomePage.class);
______TS("link: course view");
InstructorCourseDetailsPage detailsPage = homePage.clickCourseViewLink(courseId);
detailsPage.verifyContains("Course Details");
String expectedViewLinkText = createUrl(Const.ActionURIs.INSTRUCTOR_COURSE_DETAILS_PAGE).withCourseId(courseId).withUserId(instructorId).toAbsoluteString();
assertEquals(expectedViewLinkText, browser.driver.getCurrentUrl());
homePage.goToPreviousPage(InstructorHomePage.class);
______TS("link: course edit");
InstructorCourseEditPage editPage = homePage.clickCourseEditLink(courseId);
editPage.verifyContains("Edit Course Details");
String expectedEditLinkText = createUrl(Const.ActionURIs.INSTRUCTOR_COURSE_EDIT_PAGE).withCourseId(courseId).withUserId(instructorId).toAbsoluteString();
assertEquals(expectedEditLinkText, browser.driver.getCurrentUrl());
homePage.goToPreviousPage(InstructorHomePage.class);
______TS("link: course add session");
InstructorFeedbackSessionsPage feedbacksPage = homePage.clickCourseAddEvaluationLink(courseId);
feedbacksPage.verifyContains("Add New Feedback Session");
String expectedAddSessionLinkText = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_SESSIONS_PAGE).withUserId(instructorId).withCourseId(courseId).toAbsoluteString();
assertEquals(expectedAddSessionLinkText, browser.driver.getCurrentUrl());
homePage.goToPreviousPage(InstructorHomePage.class);
}
Aggregations