Examples of EmbJoprTestException


Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

            HtmlInput input = (HtmlInput) getFirstElementByXPath(
                    getTabMenuBoxElement(),
                    ".//td[contains(text(),'"+sRowName+"')]/following-sibling::td[@class='property-value-cell']//input"
            );
            if( null == input ){
                throw new EmbJoprTestException("Input for value "+sRowName+" not found.");
            }
            return input;
        }
        catch(EmbJoprTestException ex){
            //throw new AssertException("Row with name \""+sRowName+"\" not found.", ex);
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

        HtmlTableRow row = (HtmlTableRow) getFirstElementByXPath(
                getTabMenuBoxElement(),
                ".//td[contains(string(),'"+sRowName+"')]/ancestor::tr" );
       
        if( null == row ){
          throw new EmbJoprTestException("Row with label "+sRowName+" not found.");
        }
        return row;
    }
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

      // Check that the embedded WAR is listed.
      ContentTableRow embWarLink = ejtt.tabMenu.getTabContentBox()
              .findLinkRowInDataTableUsingPagination(EAR_WITH_WAR_EMB__WAR_NAME);
      if( null == embWarLink )
        throw new EmbJoprTestException("Embedded WAR '"+EAR_WITH_WAR_EMB__WAR_NAME+"' not listed.");

      ejtt.deployment.waitActivelyForDeployment(APP_TYPE, EAR_WITH_WAR_EMB__WAR_NAME, 5000, 30);

    }
    finally {
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

      String fileSrcPath = ejtt.getTestDataDir() +"/war/"+ BASIC_WAR;

      String destDir = ejtt.getTempDir() + "/appPagination";
      new File(destDir).mkdirs();
      if( ! new File(destDir).isDirectory() )
        throw new EmbJoprTestException("Couldn't create directory: "+destDir);

      // Deploy the same APP multiple times.
      for (int i = 0; i < DEPLOYED_WARS_COUNT; i++) {
        String fileDestPath = destDir+"/appPagination"+i+".war";
        FileUtils.copyFile( new File(fileSrcPath), new File(fileDestPath) );
        ejtt.deployment.deployViaEmbJoprRepeatedly( DeployableTypes.WAR, fileDestPath );
        succesfullyDeployed = i+1;
      }
     


      // Navigate to apps summary tab
      NavTreeNode appsNode = ejtt.navTree.getNodeByLabel(NAV_APPLICATIONS);
      assertNotNull(appsNode);
      appsNode.click();
      ejtt.tabMenu.clickTab("Summary");

      ejtt.sleep(1000);

      // Get and check total items count.
      int itemsCount = ejtt.tabMenu.getTabContentBox().getPagination().getTotalItemsCount();

      // Returns null, skipping.
      //Number serverCount = (Number) server.getManagedBeanValue("#{paginationDataModel.size}");
      //assertEquals("Items count reported in page differs from server's.", serverCount, itemsCount);

      // Check whether trinomial equation fits
      int itemsPerPage = ejtt.tabMenu.getTabContentBox().getPagination().getItemsPerPage();
      int expectedPages = itemsCount / itemsPerPage;
      if( itemsCount % itemsPerPage > 0 )
        expectedPages++;
      int pageCount = ejtt.tabMenu.getTabContentBox().getPagination().getPageCount();
      assertEquals("Expected number of pages: "+itemsCount+" / "+itemsPerPage, expectedPages, pageCount);


      int page = 0;
      while( ejtt.tabMenu.getTabContentBox().getPagination().goNext() ){

        page++;
        if( page > expectedPages )
          throw new EmbJoprTestException("Got too far when clicking Next" +
                  " - to "+page+"th page, expected only "+expectedPages+".");

        // Get rows.
        ContentTable table = ejtt.tabMenu.getTabContentBox().getFirstTable();
        List<ContentTableRow> rows = table.getRows();
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

    String fileSrcPath = ejtt.getTestDataDir() +"/war/"+ BASIC_WAR;

    String destDir = ejtt.getTempDir() + "/appPagination";
    new File(destDir).mkdirs();
    if( ! new File(destDir).isDirectory() )
      throw new EmbJoprTestException("Couldn't create directory: "+destDir);

    // Deploy the same APP multiple times.
    for (int i = 0; i < 8; i++) {
      String fileDestPath = destDir+"/testAppsListing"+i+".war";
      FileUtils.copyFile( new File(fileSrcPath), new File(fileDestPath) );
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

    for( DeployableTypes type : DeployableTypes.values() ){
      if( desc.toUpperCase().contains( type.name() )){
        return type;
      }
    }
    throw new EmbJoprTestException("Unrecognized deployable type: "+desc);
  }
View Full Code Here

Examples of org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException

  {
    for( DeployableTypes type : DeployableTypes.values() ){
      if( StringUtils.endsWith(name, type.getSuffix() ) ) return type;
      if( StringUtils.endsWith(name, type.getExtension() ) ) return type;
    }
    throw new EmbJoprTestException("Unrecognized deployable type: "+name);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.