use of teammates.test.pageobjects.UserErrorReportPage in project teammates by TEAMMATES.
the class AllAccessControlUiTests method testPubliclyAccessiblePages.
@Test
public void testPubliclyAccessiblePages() throws Exception {
______TS("log out page");
// has been covered in testUserNotLoggedIn method
______TS("unauthorized page");
AppUrl url = createUrl(Const.ViewURIs.UNAUTHORIZED);
currentPage.navigateTo(url);
currentPage.verifyHtml("/unauthorized.html");
______TS("error page");
url = createUrl(Const.ViewURIs.ERROR_PAGE);
currentPage.navigateTo(url);
currentPage.verifyHtml("/errorPage.html");
______TS("deadline exceeded error page");
url = createUrl(Const.ViewURIs.DEADLINE_EXCEEDED_ERROR_PAGE);
currentPage.navigateTo(url);
currentPage.verifyHtml("/deadlineExceededErrorPage.html");
______TS("entity not found page");
url = createUrl(Const.ViewURIs.ENTITY_NOT_FOUND_PAGE);
currentPage.navigateTo(url);
currentPage.verifyHtml("/entityNotFoundPage.html");
______TS("action not found page");
url = createUrl(Const.ViewURIs.ACTION_NOT_FOUND_PAGE);
currentPage.navigateTo(url);
currentPage.verifyHtml("/pageNotFound.html");
______TS("enable javascript page");
url = createUrl(Const.ViewURIs.ENABLE_JS);
currentPage.navigateTo(url);
currentPage.verifyHtml("/enableJs.html");
______TS("user error report form - submit successfully");
url = createUrl(Const.ViewURIs.ERROR_PAGE);
currentPage.navigateTo(url);
UserErrorReportPage errorReportPage = currentPage.changePageType(UserErrorReportPage.class);
errorReportPage.verifyErrorReportFormContents();
errorReportPage.fillFormAndClickSubmit("This is an error report.");
errorReportPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.ERROR_FEEDBACK_SUBMIT_SUCCESS);
______TS("user error report form - submit failed");
logout();
url = createUrl(Const.ViewURIs.ERROR_PAGE);
errorReportPage.navigateTo(url);
errorReportPage.verifyErrorReportFormContents();
errorReportPage.fillFormAndClickSubmit("This is an error report.");
final String failedStatusMessage = "Failed to record the error message. Please email our support team at " + Config.SUPPORT_EMAIL + ".";
errorReportPage.waitForTextsForAllStatusMessagesToUserEquals(failedStatusMessage);
}
Aggregations