Author: ozizka(a)redhat.com
Date: 2009-07-28 13:54:05 -0400 (Tue, 28 Jul 2009)
New Revision: 606
Added:
trunk/jsfunit/testdata/hbn/
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
trunk/jsfunit/testdata/ejb3/info.txt
Log:
* ServiceBindingManagerTest updated
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-07-28
17:31:09 UTC (rev 605)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-07-28
17:54:05 UTC (rev 606)
@@ -138,8 +138,8 @@
public static final String NAV_EMB_RAR = "Embedded RARs";
// Non-app resource types.
- public static final String NAV_SBMS = "Service Binding Managers";
- public static final String NAV_SBM = "ServiceBindingManager";
+ public static final String NAV_SBM = "Service Binding Manager";
+ public static final String NAV_SBM_SETS = "Service Binding Sets";
public static final String NAV_JBCACHE = "JBoss Cache";
public static final String NAV_JBCACHES = "JBoss Caches";
public static final String NAV_HBN = "Hibernate";
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-07-28
17:31:09 UTC (rev 605)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-07-28
17:54:05 UTC (rev 606)
@@ -29,23 +29,23 @@
public void testServiceBindingManagerTest() throws IOException, EmbJoprTestException {
// Go to Service Binding Managers node.
- ejtt.navTree.getNodeByLabel(NAV_SBMS).click();
+ ejtt.navTree.getNodeByLabel(NAV_SBM).click();
// Check that SBM is UP.
- ContentTableRow row =
ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(NAV_SBM);
- assertEquals(NAV_SBM+" should be UP", "UP",
row.getCellTextByColumnName("Status") );
+ ContentTableRow row =
ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(NAV_SBM_SETS);
+ assertEquals(NAV_SBM_SETS+" should be UP", "UP",
row.getCellTextByColumnName("Status") );
// Go to SBM.
- row.getLinkByLabel(NAV_SBM).click();
+ row.getLinkByLabel(NAV_SBM_SETS).click();
// Summary tab
- ContentTable table = ejtt.tabMenu.getTabContentBox().getTableUnderHeader("General
Properties");
+ ContentTable table =
ejtt.tabMenu.getTabContentBox().getTableUnderHeader(LABEL_GENERAL_PROPERTIES);
ContentInfoTable infoTable = ejtt.getContentInfoTable(table.getElement());
Properties props = infoTable.getProperties();
// Name
- assertEquals("Name should be "+NAV_SBM, NAV_SBM,
props.getProperty("Name"));
+ assertEquals("Name should be "+NAV_SBM_SETS, NAV_SBM_SETS,
props.getProperty("Name"));
// Version is currently "--"
// Description: The Service Binding Manager manages the ports of the deployed
services
@@ -64,7 +64,7 @@
// Go to Service Binding Managers node.
- ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+ ejtt.navTree.getNodeByLabel(NAV_SBM_SETS).click();
// -- Update -- //
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-07-28
17:31:09 UTC (rev 605)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-07-28
17:54:05 UTC (rev 606)
@@ -1604,7 +1604,7 @@
private static final String ID_PAGINATION_TOTAL_ITEMS =
"paginationTotalItems";
/** Returns the HTML element of the bar with "First | Prev | 1 2 | Next Last"
controls. */
- public HtmlDivision getPageContols() throws HtmlElementNotFoundException {
+ public HtmlDivision findPageContols() throws HtmlElementNotFoundException {
//return (HtmlDivision) client.getElement(ID_PAGE_CONTROLS);
HtmlDivision div = (HtmlDivision) getTabMenu().getTabContentBox().getElement()
.getFirstByXPath(".//*[contains(@id,
'SummaryForm:dataTableScroller')]");
@@ -1622,6 +1622,13 @@
return div;
}
+ public HtmlDivision getPageContols() throws HtmlElementNotFoundException {
+ HtmlDivision div = findPageContols();
+ if( null == div)
+ throw new HtmlElementNotFoundException("Page controls not found.",
currentTest);
+ return div;
+ }
+
/** Returns the HTML Select element of page size selection. */
public HtmlSelect getPageSizeSelect() throws HtmlElementNotFoundException {
//return (HtmlSelect) client.getElement(ID_PAGE_SIZE_SELECT);
@@ -1638,6 +1645,7 @@
{
Element e = client.getElement(ID_PAGINATION_TOTAL_ITEMS);
String textContent = e.getTextContent();
+ log.debug("Element #"+ID_PAGINATION_TOTAL_ITEMS+" content:
"+textContent);
String[] parts = textContent.split(":");
if( parts.length < 2 )
throw new ActionNotAvailableException("Total pagination items count expected
after 'Total:' or similar.");
Modified: trunk/jsfunit/testdata/ejb3/info.txt
===================================================================
--- trunk/jsfunit/testdata/ejb3/info.txt 2009-07-28 17:31:09 UTC (rev 605)
+++ trunk/jsfunit/testdata/ejb3/info.txt 2009-07-28 17:54:05 UTC (rev 606)
@@ -2,5 +2,8 @@
* entity-test.jar
* stateless-test.jar
-and some from the EJB3 tutorials:
http://www.jboss.org/ejb3/docs.html :
+some from the EJB3 tutorials:
http://www.jboss.org/ejb3/docs.html :
* jboss-ejb3-tutorial-mdb.jar
+
+and some from the JBoss Messaging project examples (
http://labs.jboss.com/jbossmessaging/
, jbm-examples-1.4.3.zip):
+ * mdb-example.jar
\ No newline at end of file