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);
}
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;
}
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);
}
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");
}
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");
}
Aggregations