Search in sources :

Example 1 with AppUrl

use of teammates.common.util.AppUrl in project teammates by TEAMMATES.

the class InstructorFeedbackEditPageUiTest method getFeedbackEditPageOfCourseWithoutQuestions.

private InstructorFeedbackEditPage getFeedbackEditPageOfCourseWithoutQuestions() {
    String instructor = testData.instructors.get("teammates.test.instructor3").googleId;
    String courseWithoutQuestion = testData.courses.get("course2").getId();
    String sessionWithoutQuestions = testData.feedbackSessions.get("openSession3").getFeedbackSessionName();
    AppUrl feedbackPageLink = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_EDIT_PAGE).withUserId(instructor).withCourseId(courseWithoutQuestion).withSessionName(sessionWithoutQuestions).withEnableSessionEditDetails(true);
    return loginAdminToPage(feedbackPageLink, InstructorFeedbackEditPage.class);
}
Also used : AppUrl(teammates.common.util.AppUrl)

Example 2 with AppUrl

use of teammates.common.util.AppUrl in project teammates by TEAMMATES.

the class InstructorFeedbackSessionsPageUiTest method getFeedbackPageForInstructor.

private InstructorFeedbackSessionsPage getFeedbackPageForInstructor(String instructorId) {
    AppUrl feedbackPageLink = createUrl(Const.ActionURIs.INSTRUCTOR_FEEDBACK_SESSIONS_PAGE).withUserId(instructorId);
    InstructorFeedbackSessionsPage page = loginAdminToPage(feedbackPageLink, InstructorFeedbackSessionsPage.class);
    page.waitForElementPresence(By.id("table-sessions"));
    return page;
}
Also used : InstructorFeedbackSessionsPage(teammates.test.pageobjects.InstructorFeedbackSessionsPage) AppUrl(teammates.common.util.AppUrl)

Example 3 with AppUrl

use of teammates.common.util.AppUrl in project teammates by TEAMMATES.

the class InstructorHomePageUiTest method loginAsInstructor.

private void loginAsInstructor(String googleId) {
    AppUrl editUrl = createUrl(Const.ActionURIs.INSTRUCTOR_HOME_PAGE).withUserId(googleId);
    homePage = loginAdminToPage(editUrl, InstructorHomePage.class);
}
Also used : AppUrl(teammates.common.util.AppUrl) InstructorHomePage(teammates.test.pageobjects.InstructorHomePage)

Example 4 with AppUrl

use of teammates.common.util.AppUrl in project teammates by TEAMMATES.

the class InstructorStudentListPageUiTest method testShowPhoto.

private void testShowPhoto() throws Exception {
    // Mouseover actions do not work on Selenium-Chrome
    if ("chrome".equals(TestProperties.BROWSER)) {
        return;
    }
    if (System.getenv("APPVEYOR") != null) {
        // TODO fix this
        return;
    }
    String instructorId = testData.instructors.get("instructorOfCourse2").googleId;
    AppUrl viewPageUrl = createUrl(Const.ActionURIs.INSTRUCTOR_STUDENT_LIST_PAGE).withUserId(instructorId);
    viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
    ______TS("default image");
    StudentAttributes student = testData.students.get("Student1Course2");
    viewPage.checkCourse(0);
    viewPage.checkCourse(1);
    viewPage.clickShowPhoto(student.course, student.name);
    viewPage.verifyProfilePhoto(student.course, student.name, Const.SystemParams.DEFAULT_PROFILE_PICTURE_PATH);
    ______TS("student has uploaded an image");
    StudentAttributes student2 = testData.students.get("Student3Course3");
    viewPage.clickShowPhoto(student2.course, student2.name);
    String photoUrl = createUrl(Const.ActionURIs.STUDENT_PROFILE_PICTURE).withStudentEmail(StringHelper.encrypt(student2.email)).withCourseId(StringHelper.encrypt(student2.course)).withUserId(instructorId).toAbsoluteString();
    viewPage.verifyProfilePhoto(student2.course, student2.name, photoUrl);
    viewPage.verifyHtmlMainContent("/instructorStudentListPageWithPicture.html");
}
Also used : AppUrl(teammates.common.util.AppUrl) InstructorStudentListPage(teammates.test.pageobjects.InstructorStudentListPage) StudentAttributes(teammates.common.datatransfer.attributes.StudentAttributes)

Example 5 with AppUrl

use of teammates.common.util.AppUrl in project teammates by TEAMMATES.

the class InstructorStudentListPageUiTest method testDisplayArchive.

private void testDisplayArchive() throws Exception {
    String instructorId = testData.instructors.get("instructorOfCourse4").googleId;
    AppUrl viewPageUrl = createUrl(Const.ActionURIs.INSTRUCTOR_STUDENT_LIST_PAGE).withUserId(instructorId);
    viewPage = loginAdminToPage(viewPageUrl, InstructorStudentListPage.class);
    ______TS("action: display archive");
    viewPage.clickDisplayArchiveOptions();
    viewPage.checkCourse(0);
    viewPage.checkCourse(1);
    viewPage.checkCourse(2);
    viewPage.verifyHtmlMainContent("/instructorStudentListPageDisplayArchivedCourses.html");
    ______TS("action: hide archive");
    viewPage.clickDisplayArchiveOptions();
    viewPage.checkCourse(0);
    viewPage.checkCourse(1);
    viewPage.verifyHtmlMainContent("/instructorStudentListPageHideArchivedCourses.html");
    ______TS("action: re-display archive");
    viewPage.clickDisplayArchiveOptions();
    viewPage.checkCourse(0);
    viewPage.checkCourse(1);
    viewPage.checkCourse(2);
    viewPage.verifyHtmlMainContent("/instructorStudentListPageDisplayArchivedCourses.html");
}
Also used : AppUrl(teammates.common.util.AppUrl) InstructorStudentListPage(teammates.test.pageobjects.InstructorStudentListPage)

Aggregations

AppUrl (teammates.common.util.AppUrl)52 Test (org.testng.annotations.Test)7 InstructorCourseEnrollPage (teammates.test.pageobjects.InstructorCourseEnrollPage)6 InstructorStudentListPage (teammates.test.pageobjects.InstructorStudentListPage)6 StudentHomePage (teammates.test.pageobjects.StudentHomePage)6 InstructorAttributes (teammates.common.datatransfer.attributes.InstructorAttributes)4 StudentAttributes (teammates.common.datatransfer.attributes.StudentAttributes)3 InstructorCourseDetailsPage (teammates.test.pageobjects.InstructorCourseDetailsPage)3 InstructorCourseStudentDetailsEditPage (teammates.test.pageobjects.InstructorCourseStudentDetailsEditPage)3 InstructorHomePage (teammates.test.pageobjects.InstructorHomePage)3 Stopwatch (teammates.client.scripts.util.Stopwatch)2 AdminHomePage (teammates.test.pageobjects.AdminHomePage)2 InstructorCourseStudentDetailsViewPage (teammates.test.pageobjects.InstructorCourseStudentDetailsViewPage)2 InstructorCoursesPage (teammates.test.pageobjects.InstructorCoursesPage)2 InstructorFeedbackResultsPage (teammates.test.pageobjects.InstructorFeedbackResultsPage)2 InstructorFeedbackSessionsPage (teammates.test.pageobjects.InstructorFeedbackSessionsPage)2 InstructorStudentRecordsPage (teammates.test.pageobjects.InstructorStudentRecordsPage)2 StudentCourseDetailsPage (teammates.test.pageobjects.StudentCourseDetailsPage)2 BlobInfo (com.google.appengine.api.blobstore.BlobInfo)1 BlobKey (com.google.appengine.api.blobstore.BlobKey)1