use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class SystemErrorEmailReportTest method testUnauthorizedAccessException.
// TODO: this test should be moved to the class testing access control
private void testUnauthorizedAccessException() {
______TS("UnauthorizedAccessException testing");
AppUrl url = createUrl(Const.ActionURIs.ADMIN_EXCEPTION_TEST).withParam(Const.ParamsNames.ERROR, UnauthorizedAccessException.class.getSimpleName());
page.navigateTo(url);
print("This exception is handled by system, make sure you don't receive any emails. ");
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class SystemErrorEmailReportTest method testNullPostParamException.
private void testNullPostParamException() {
______TS("NullPostParamException testing");
AppUrl url = createUrl(Const.ActionURIs.ADMIN_EXCEPTION_TEST).withParam(Const.ParamsNames.ERROR, NullPostParameterException.class.getSimpleName());
page.navigateTo(url);
page.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.NULL_POST_PARAMETER_MESSAGE.replace("<br>", "\n"));
print("This exception is handled by system, make sure you don't receive any emails. ");
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AdminActivityLogPageUiTest method testContent.
private void testContent() throws Exception {
______TS("content: typical page");
AppUrl logPageUrl = createUrl(Const.ActionURIs.ADMIN_ACTIVITY_LOG_PAGE);
logPage = loginAdminToPage(logPageUrl, AdminActivityLogPage.class);
logPage.verifyIsCorrectPage();
______TS("content: navigate to other pages to get some logs");
logPage.navigateTo(createUrl(Const.ActionURIs.ADMIN_HOME_PAGE));
logPage.waitForPageToLoad();
logPage.navigateTo(createUrl(Const.ActionURIs.ADMIN_ACCOUNT_MANAGEMENT_PAGE));
logPage.waitForPageToLoad();
logPage.navigateTo(createUrl(Const.ActionURIs.ADMIN_SEARCH_PAGE));
logPage.waitForPageToLoad();
logPage.navigateTo(createUrl(Const.ActionURIs.ADMIN_ACTIVITY_LOG_PAGE));
logPage.waitForPageToLoad();
assertNotNull(logPage.getFirstActivityLogRow());
assertTrue(logPage.isLogsTableVisible());
assertEquals(2, logPage.getNumberOfTableHeaders());
______TS("content: ensure default search period is not more than one day");
Instant yesterday = TimeHelper.getInstantDaysOffsetFromNow(-1);
assertTrue(logPage.getDateOfEarliestLog().isAfter(yesterday));
______TS("content: show the earliest log's date in both Admin Time Zone and local Time Zone");
String statusMessageText = logPage.getTextsForAllStatusMessagesToUser().get(0);
assertTrue(statusMessageText.contains("The earliest log entry checked on"));
assertTrue(statusMessageText.contains("in Admin Time Zone"));
assertTrue(statusMessageText.contains("in Local Time Zone") || statusMessageText.contains("Local Time Unavailable"));
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AdminEmailLogPageUiTest method testContent.
private void testContent() {
______TS("content: typical page");
AppUrl logPageUrl = createUrl(Const.ActionURIs.ADMIN_EMAIL_LOG_PAGE);
emailLogPage = loginAdminToPage(logPageUrl, AdminEmailLogPage.class);
emailLogPage.verifyIsCorrectPage();
assertTrue(isEmailLogDataDisplayCorrect());
}
use of teammates.common.util.AppUrl in project teammates by TEAMMATES.
the class AdminHomePageUiTest method testContent.
private void testContent() throws Exception {
______TS("content: typical page");
AppUrl homeUrl = createUrl(Const.ActionURIs.ADMIN_HOME_PAGE).withUserId(TestProperties.TEST_ADMIN_ACCOUNT);
homePage = loginAdminToPage(homeUrl, AdminHomePage.class);
homePage.verifyHtml("/adminHomePage.html");
}
Aggregations