Search in sources :

Example 76 with PageModeMenuCommand

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

the class AdminRoleSystemTest method siteAdminUseraccountTest.

/**
 * Site admin useraccount test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteAdminUseraccountTest() 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_USERACCOUNT_VIEW_NAME, ""));
    assertTrue("Expect content", userPageVisit.checkHtmlBodyContainsText("Useraccount"));
    clickFirstRowInGrid(userPageVisit);
    userPageVisit.validatePage(new PageModeMenuCommand(AdminViews.ADMIN_USERACCOUNT_VIEW_NAME, ""));
}
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 77 with PageModeMenuCommand

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

the class AdminRoleSystemTest method visitAdminDataSummaryViewRemoveDocumentsTest.

/**
 * Visit admin data summary view remove documents test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void visitAdminDataSummaryViewRemoveDocumentsTest() 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 removeDocumentsButton = userPageVisit.findButton("Remove Documents");
    assertNotNull("Expect to find a Button", removeDocumentsButton);
// userPageVisit.performClickAction(removeDocumentsButton);
}
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 78 with PageModeMenuCommand

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

the class AdminRoleSystemTest method visitAdminDataSummaryViewRefreshViewsTest.

/**
 * Visit admin data summary view refresh views test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void visitAdminDataSummaryViewRefreshViewsTest() 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 refreshViewsButton = userPageVisit.findButton("Refresh Views");
    assertNotNull("Expect to find a Refresh Views Button", refreshViewsButton);
    userPageVisit.performClickAction(refreshViewsButton);
}
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 79 with PageModeMenuCommand

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

the class AdminRoleSystemTest method visitAdminDataSummaryViewRemovePoliticianTest.

/**
 * Visit admin data summary view remove politician test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void visitAdminDataSummaryViewRemovePoliticianTest() 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 removePoliticiansButton = userPageVisit.findButton("Remove Politicians");
    assertNotNull("Expect to find a Button", removePoliticiansButton);
// userPageVisit.performClickAction(removePoliticiansButton);
}
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 80 with PageModeMenuCommand

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

the class AdminRoleSystemTest method siteAdminAgentOperationTest.

/**
 * Site admin test.
 *
 * @throws Exception
 *             the exception
 */
@Test
public void siteAdminAgentOperationTest() 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_AGENT_OPERATIONVIEW_NAME, ""));
    userPageVisit.verifyViewActions(new ViewAction[] { ViewAction.VISIT_MAIN_VIEW });
    final WebElement importWorldBankDataButton = userPageVisit.findButton("Start IMPORT MODEL_EXTERNAL_WORLDBANK");
    assertNotNull("Start IMPORT MODEL_EXTERNAL_WORLDBANK Button", importWorldBankDataButton);
    final WebElement importRiksdagenDataButton = userPageVisit.findButton("Start IMPORT MODEL_EXTERNAL_RIKSDAGEN");
    assertNotNull("Start IMPORT MODEL_EXTERNAL_RIKSDAGEN Button", importRiksdagenDataButton);
    userPageVisit.performClickAction(importRiksdagenDataButton);
}
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)

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