use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class InstructorCoursesPageUiTest method getCoursesPage.
private InstructorCoursesPage getCoursesPage() {
AppUrl coursesUrl = createUrl(Const.ActionURIs.INSTRUCTOR_COURSES_PAGE).withUserId(instructorId);
InstructorCoursesPage page = loginAdminToPage(coursesUrl, InstructorCoursesPage.class);
page.waitForAjaxLoadCoursesSuccess();
return page;
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class StudentCourseDetailsPageUiTest method verifyContent.
private void verifyContent(String courseObjectId, String studentObjectId, String filePath, boolean isFullPageChecked) throws Exception {
AppUrl detailsPageUrl = createUrl(Const.ActionURIs.STUDENT_COURSE_DETAILS_PAGE).withUserId(testData.students.get(studentObjectId).googleId).withCourseId(testData.courses.get(courseObjectId).getId());
StudentCourseDetailsPage detailsPage = loginAdminToPage(detailsPageUrl, StudentCourseDetailsPage.class);
if (isFullPageChecked) {
detailsPage.verifyHtml(filePath);
} else {
detailsPage.verifyHtmlMainContent(filePath);
}
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class StudentHomePageUiTest method testContentAndLogin.
private void testContentAndLogin() throws Exception {
______TS("content: no courses, 'welcome stranger' message");
String unregUserId = TestProperties.TEST_UNREG_ACCOUNT;
String unregPassword = TestProperties.TEST_UNREG_PASSWORD;
// delete account if it exists
BackDoor.deleteAccount(unregUserId);
logout();
studentHome = getHomePage().clickStudentLogin().loginAsStudent(unregUserId, unregPassword);
// this test uses the accounts from test.properties
// do not do full HTML verification here as the unregistered username is not predictable
studentHome.verifyHtmlMainContent("/studentHomeHTMLEmpty.html");
______TS("persistence check");
loginWithPersistenceProblem();
// This is the full HTML verification for Student Home Page, the rest can all be verifyMainHtml
studentHome.verifyHtml("/studentHomeHTMLPersistenceCheck.html");
______TS("login");
studentHome = getHomePage().clickStudentLogin().loginAsStudent(TestProperties.TEST_STUDENT1_ACCOUNT, TestProperties.TEST_STUDENT1_PASSWORD);
______TS("content: multiple courses");
// this test uses the accounts from test.properties
studentHome.verifyHtmlMainContent("/studentHomeHTML.html");
AppUrl detailsPageUrl = createUrl(Const.ActionURIs.STUDENT_HOME_PAGE).withUserId(testData.students.get("SHomeUiT.charlie.d@SHomeUiT.CS2104").googleId);
StudentHomePage studentHomePage = loginAdminToPage(detailsPageUrl, StudentHomePage.class);
studentHomePage.verifyHtmlMainContent("/studentHomeTypicalHTML.html");
______TS("content: requires sanitization");
detailsPageUrl = createUrl(Const.ActionURIs.STUDENT_HOME_PAGE).withUserId(testData.students.get("SHomeUiT.student1InTestingSanitizationCourse").googleId);
studentHomePage = loginAdminToPage(detailsPageUrl, StudentHomePage.class);
studentHomePage.verifyHtmlMainContent("/studentHomeTypicalTestingSanitization.html");
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class StudentHomePageUiTest method loginWithPersistenceProblem.
private void loginWithPersistenceProblem() {
AppUrl homeUrl = ((AppUrl) createUrl(Const.ActionURIs.STUDENT_HOME_PAGE).withParam(Const.ParamsNames.CHECK_PERSISTENCE_COURSE, "SHomeUiT.CS2104")).withUserId("unreg_user");
studentHome = loginAdminToPage(homeUrl, StudentHomePage.class);
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class SystemErrorEmailReportTest method testAssertionError.
private void testAssertionError() {
______TS("AssertionError testing");
AppUrl url = createUrl(Const.ActionURIs.ADMIN_EXCEPTION_TEST).withParam(Const.ParamsNames.ERROR, AssertionError.class.getSimpleName());
page.navigateTo(url);
print("AssertionError triggered, please check your crash report at " + Config.SUPPORT_EMAIL);
}
Aggregations