use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminEmailTest.
/**
* Site admin email test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminEmailTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
loginAsAdmin(userPageVisit);
userPageVisit.visitDirectPage(new PageModeMenuCommand(AdminViews.ADMIN_EMAIL_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("email"));
userPageVisit.sendEmailOnEmailPage("james@hack23.com", "siteAdminEmailTest", "siteAdminEmailTest content");
userPageVisit.checkNotificationMessage("Email Sent");
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminApplicationEventTest.
/**
* Site admin application event test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminApplicationEventTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
loginAsAdmin(userPageVisit);
userPageVisit.visitDirectPage(new PageModeMenuCommand(AdminViews.ADMIN_APPLICATIONS_EVENTS_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("Application Action Event"));
clickFirstRowInGrid(userPageVisit);
userPageVisit.validatePage(new PageModeMenuCommand(AdminViews.ADMIN_APPLICATIONS_EVENTS_VIEW_NAME, ""));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method visitAdminDataSummaryViewUpdateSearchIndexTest.
/**
* Visit admin data summary view update search index test.
*
* @throws Exception
* the exception
*/
@Test
public void visitAdminDataSummaryViewUpdateSearchIndexTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
loginAsAdmin(userPageVisit);
userPageVisit.visitDirectPage(new PageModeMenuCommand(AdminViews.ADMIN_DATA_SUMMARY_VIEW_NAME, ""));
final WebElement updateSearchIndexButton = userPageVisit.findButton("Update Search Index");
assertNotNull("Expect to find a Update Search Index Button", updateSearchIndexButton);
userPageVisit.performClickAction(updateSearchIndexButton);
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminEmailFailedNoValidEmailTest.
/**
* Site admin email failed no valid email test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminEmailFailedNoValidEmailTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
loginAsAdmin(userPageVisit);
userPageVisit.visitDirectPage(new PageModeMenuCommand(AdminViews.ADMIN_EMAIL_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("email"));
userPageVisit.sendEmailOnEmailPage("nonvalidemail", "siteAdminEmailFailedNoValidEmailTest", "siteAdminEmailFailedNoValidEmailTest content");
// TODO check button enabled and field messsage
// userPageVisit.checkNotificationMessage("Send email failedEmail is not a valid email address");
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminCountryTest.
/**
* Site admin country test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminCountryTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
loginAsAdmin(userPageVisit);
userPageVisit.visitDirectPage(new PageModeMenuCommand(AdminViews.ADMIN_COUNTRY_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("Country"));
clickFirstRowInGrid(userPageVisit);
userPageVisit.validatePage(new PageModeMenuCommand(AdminViews.ADMIN_COUNTRY_VIEW_NAME, ""));
}
Aggregations