use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteDocumentPageVisitHistoryTest.
/**
* Site document page visit history test.
*
* @throws Exception
* the exception
*/
@Test
public void siteDocumentPageVisitHistoryTest() 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.DOCUMENT_VIEW_NAME, PageMode.PAGEVISITHISTORY, "GZ02C343"));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method sitePartyCurrentLeadersTest.
/**
* Site party current leaders test.
*
* @throws Exception
* the exception
*/
@Test
public void sitePartyCurrentLeadersTest() 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.CURRENTLEADERS.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 sitePoliticianRankingViewDataGridNavigationTest.
/**
* Site politician ranking view data grid navigation test.
*
* @throws Exception
* the exception
*/
@Test
public void sitePoliticianRankingViewDataGridNavigationTest() 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_RANKING_VIEW_NAME, PageMode.DATAGRID));
clickFirstRowInGrid(userPageVisit);
userPageVisit.validatePage(new PageModeMenuCommand(UserViews.POLITICIAN_VIEW_NAME, ""));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteMinistryDocumentHistoryTest.
/**
* Site ministry document history test.
*
* @throws Exception
* the exception
*/
@Test
public void siteMinistryDocumentHistoryTest() 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.MINISTRY_VIEW_NAME, MinistryPageMode.DOCUMENTHISTORY.toString(), "N%C3%A4ringsdepartementet"));
}
use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.
the class UserRoleSystemTest method siteLoginUserDisableGoogleAuthenticatorTest.
@Test
public void siteLoginUserDisableGoogleAuthenticatorTest() 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.disableGoogleAuthenticator();
userLoginPageVisit.logoutUser();
}
Aggregations