Search in sources :

Example 6 with InstructorFeedbackSessionsPage

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);
}
Also used : InstructorFeedbackSessionsPage(teammates.test.pageobjects.InstructorFeedbackSessionsPage) InstructorCourseEditPage(teammates.test.pageobjects.InstructorCourseEditPage) InstructorCourseEnrollPage(teammates.test.pageobjects.InstructorCourseEnrollPage) InstructorCourseDetailsPage(teammates.test.pageobjects.InstructorCourseDetailsPage)

Aggregations

InstructorFeedbackSessionsPage (teammates.test.pageobjects.InstructorFeedbackSessionsPage)6 AppUrl (teammates.common.util.AppUrl)2 Text (com.google.appengine.api.datastore.Text)1 FeedbackResponseAttributes (teammates.common.datatransfer.attributes.FeedbackResponseAttributes)1 InstructorCourseDetailsPage (teammates.test.pageobjects.InstructorCourseDetailsPage)1 InstructorCourseEditPage (teammates.test.pageobjects.InstructorCourseEditPage)1 InstructorCourseEnrollPage (teammates.test.pageobjects.InstructorCourseEnrollPage)1