use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserHomeMenuItemFactoryImpl method createOverviewPage.
@Override
public void createOverviewPage(final VerticalLayout overviewLayout) {
final ResponsiveRow grid = createGridLayout(overviewLayout);
createButtonLink(grid, SECURITY_SETTING_TEXT, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.SECURITY_SETTINGS.toString(), ""), "Security settings, enable MFA");
createButtonLink(grid, USER_VISITS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_VISITS.toString()), "All past visits");
createButtonLink(grid, USER_EVENTS, VaadinIcons.USER, new PageModeMenuCommand(UserViews.USERHOME_VIEW_NAME, UserHomePageMode.USER_EVENTS.toString()), "All past events");
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AbstractRoleSystemTest method loginAsAdmin.
/**
* Login as admin.
*
* @param userPageVisit
* the user page visit
* @throws Exception
* the exception
*/
protected final void loginAsAdmin(final UserPageVisit userPageVisit) throws Exception {
userPageVisit.visitDirectPage(new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, ApplicationPageMode.LOGIN.toString()));
userPageVisit.loginUser(systemTestTargetAdminEmail, systemTestTargetAdminPassword);
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminPortalTest.
/**
* Site admin portal test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminPortalTest() 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_PORTAL_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("Portal"));
clickFirstRowInGrid(userPageVisit);
userPageVisit.validatePage(new PageModeMenuCommand(AdminViews.ADMIN_PORTAL_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 visitAdminDataSummaryViewRemoveApplicationHistoryTest.
/**
* Visit admin data summary view remove application history test.
*
* @throws Exception
* the exception
*/
@Test
public void visitAdminDataSummaryViewRemoveApplicationHistoryTest() 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 removeApplicationHistoryButton = userPageVisit.findButton("Remove Application History");
assertNotNull("Expect to find a Button", removeApplicationHistoryButton);
// userPageVisit.performClickAction(removeApplicationHistoryButton);
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class AdminRoleSystemTest method siteAdminLanguageTest.
/**
* Site admin language test.
*
* @throws Exception
* the exception
*/
@Test
public void siteAdminLanguageTest() 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_LANGUAGE_VIEW_NAME, ""));
assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("Language"));
clickFirstRowInGrid(userPageVisit);
userPageVisit.validatePage(new PageModeMenuCommand(AdminViews.ADMIN_LANGUAGE_VIEW_NAME, ""));
}
Aggregations