Search in sources :

Example 56 with PageModeMenuCommand

use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.

the class UserRoleSystemTest method siteCommitteeRankingViewCurrentCommitteePartiesChartsTest.

/**
 * Site committee ranking view current committee parties charts test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteCommitteeRankingViewCurrentCommitteePartiesChartsTest() 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.COMMITTEE_RANKING_VIEW_NAME, PageMode.CHARTS, ChartIndicators.CURRENTCOMMITTEESBYPARTYDAYSSERVED.toString()));
}
Also used : WebDriver(org.openqa.selenium.WebDriver) PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) Test(org.junit.Test)

Example 57 with PageModeMenuCommand

use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.

the class UserRoleSystemTest method siteParliamentRuleViolationsTest.

/**
 * Site parliament rule violations test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteParliamentRuleViolationsTest() 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.RULE_VIOLATIONS.toString()));
}
Also used : WebDriver(org.openqa.selenium.WebDriver) PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) Test(org.junit.Test)

Example 58 with PageModeMenuCommand

use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.

the class UserRoleSystemTest method siteLoginUserCheckUserVisitsTest.

/**
 * Site login user check user visits test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteLoginUserCheckUserVisitsTest() 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 userVisitsMenuItem = userLoginPageVisit.getMenuItem("User Visits");
    assertNotNull(userVisitsMenuItem);
    userLoginPageVisit.performClickAction(userVisitsMenuItem);
    userLoginPageVisit.logoutUser();
}
Also used : WebDriver(org.openqa.selenium.WebDriver) PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) WebElement(org.openqa.selenium.WebElement) Test(org.junit.Test)

Example 59 with PageModeMenuCommand

use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.

the class UserRoleSystemTest method sitePartyRankingViewOverviewTest.

/**
 * Site party ranking view overview test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void sitePartyRankingViewOverviewTest() 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_RANKING_VIEW_NAME, PageMode.OVERVIEW));
}
Also used : WebDriver(org.openqa.selenium.WebDriver) PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) Test(org.junit.Test)

Example 60 with PageModeMenuCommand

use of com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand in project cia by Hack23.

the class UserRoleSystemTest method siteParliamentChartViewPartyAgeTest.

/**
 * Site parliament chart view party age test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteParliamentChartViewPartyAgeTest() 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.PARTYAGE.toString()));
}
Also used : WebDriver(org.openqa.selenium.WebDriver) PageModeMenuCommand(com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand) Test(org.junit.Test)

Aggregations

PageModeMenuCommand (com.hack23.cia.web.impl.ui.application.views.common.pagelinks.api.PageModeMenuCommand)151 Test (org.junit.Test)135 WebDriver (org.openqa.selenium.WebDriver)135 WebElement (org.openqa.selenium.WebElement)12 ResponsiveRow (com.jarektoro.responsivelayout.ResponsiveRow)7 MenuItem (com.vaadin.ui.MenuBar.MenuItem)7 ViewWorldbankIndicatorDataCountrySummary (com.hack23.cia.model.internal.application.data.impl.ViewWorldbankIndicatorDataCountrySummary)1 ViewWorldbankIndicatorDataCountrySummary_ (com.hack23.cia.model.internal.application.data.impl.ViewWorldbankIndicatorDataCountrySummary_)1 WorldbankIndicatorDataCountrySummaryEmbeddedId (com.hack23.cia.model.internal.application.data.impl.WorldbankIndicatorDataCountrySummaryEmbeddedId)1 WorldbankIndicatorDataCountrySummaryEmbeddedId_ (com.hack23.cia.model.internal.application.data.impl.WorldbankIndicatorDataCountrySummaryEmbeddedId_)1 ApplicationManager (com.hack23.cia.service.api.ApplicationManager)1 DataContainer (com.hack23.cia.service.api.DataContainer)1 ApplicationMenuItemFactory (com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.ApplicationMenuItemFactory)1 CountryMenuItemFactory (com.hack23.cia.web.impl.ui.application.views.common.menufactory.api.CountryMenuItemFactory)1 ContentRatio (com.hack23.cia.web.impl.ui.application.views.common.sizing.ContentRatio)1 PageMode (com.hack23.cia.web.impl.ui.application.views.common.viewnames.PageMode)1 UserViews (com.hack23.cia.web.impl.ui.application.views.common.viewnames.UserViews)1 VaadinIcons (com.vaadin.icons.VaadinIcons)1 Alignment (com.vaadin.ui.Alignment)1 MenuBar (com.vaadin.ui.MenuBar)1