use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method sitePartyCurrentMembersTest.
/**
* Site party current members test.
*
* @throws Exception
* the exception
*/
@Test
public void sitePartyCurrentMembersTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
userPageVisit.visitDirectPage(new PageModeMenuCommand(UserViews.PARTY_VIEW_NAME, PartyPageMode.CURRENTMEMBERS.toString(), "S"));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method sitePoliticanRoleSummaryTest.
/**
* Site politican role summary test.
*
* @throws Exception
* the exception
*/
@Test
public void sitePoliticanRoleSummaryTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
userPageVisit.visitDirectPage(new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, PoliticianPageMode.ROLESUMMARY.toString(), "0980681611418"));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteParliamentRulesRiskSummaryTest.
/**
* Site parliament rules risk summary test.
*
* @throws Exception
* the exception
*/
@Test
public void siteParliamentRulesRiskSummaryTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
userPageVisit.visitDirectPage(new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.RULES, RiskIndicators.RISK_SUMMARY.toString()));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteParliamentChartViewDocumentActivityByTypeTest.
/**
* Site parliament chart view document activity by type test.
*
* @throws Exception
* the exception
*/
@Test
public void siteParliamentChartViewDocumentActivityByTypeTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
userPageVisit.visitDirectPage(new PageModeMenuCommand(UserViews.PARLIAMENT_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.DOCUMENTACTIVITYBYTYPE.toString()));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteLoginUserEnableGoogleAuthenticatorTest.
/**
* Site login user enable google authenticator test.
*
* @throws Exception
* the exception
*/
@Test
public void siteLoginUserEnableGoogleAuthenticatorTest() throws Exception {
final WebDriver driver = getWebDriver();
assertNotNull(NO_WEBDRIVER_EXIST_FOR_BROWSER + browser, driver);
final UserPageVisit userPageVisit = new UserPageVisit(driver, browser);
userPageVisit.visitDirectPage(new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, ApplicationPageMode.REGISTER.toString()));
final String username = UUID.randomUUID().toString();
final String password = generatePassword();
userPageVisit.registerNewUser(username, password);
userPageVisit.logoutUser();
driver.quit();
final WebDriver loginDriver = getWebDriver();
final UserPageVisit userLoginPageVisit = new UserPageVisit(loginDriver, browser);
userLoginPageVisit.visitDirectPage(new PageModeMenuCommand(CommonsViews.MAIN_VIEW_NAME, ApplicationPageMode.LOGIN.toString()));
userLoginPageVisit.loginUser(username + "@test.com", password);
final WebElement userAccountMenuItem = userLoginPageVisit.getMenuItem("Useraccount");
assertNotNull(userAccountMenuItem);
userLoginPageVisit.performClickAction(userAccountMenuItem);
Thread.sleep(1000);
final WebElement securitySettingMenuItem = userLoginPageVisit.getMenuItem("Security settings");
assertNotNull(securitySettingMenuItem);
userLoginPageVisit.performClickAction(securitySettingMenuItem);
userLoginPageVisit.enableGoogleAuthenticator();
userLoginPageVisit.logoutUser();
}
Aggregations