[embjopr-commits] EMBJOPR SVN: r536 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: util and 1 other directory.

embjopr-commits at lists.jboss.org embjopr-commits at lists.jboss.org
Wed Jun 17 13:00:08 EDT 2009


Author: ozizka at redhat.com
Date: 2009-06-17 13:00:08 -0400 (Wed, 17 Jun 2009)
New Revision: 536

Modified:
   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
Log:
ServiceBindingManager test updated.

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-06-17 16:22:59 UTC (rev 535)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java	2009-06-17 17:00:08 UTC (rev 536)
@@ -74,7 +74,7 @@
 		props.setProperty("activeBindingSetName", "ports-01");
 		fillOutForm(props);
 
-		ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+		ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
 
 		String expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
 		checkClientAndServerMessages(expMsg, expMsg, false);
@@ -91,7 +91,7 @@
 		props.setProperty("Active Binding Set Name", "ports-default");
 		fillOutForm(props);
 
-		ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+		ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
 
 		expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
 		checkClientAndServerMessages(expMsg, expMsg, false);

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-06-17 16:22:59 UTC (rev 535)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java	2009-06-17 17:00:08 UTC (rev 536)
@@ -787,22 +787,28 @@
 
 		/**
 		 * Finds first button with given label inside this tab box.
-		 * @param label
-		 * @return
-		 * @throws org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException
-		 * @throws org.jboss.jopr.jsfunit.exceptions.ActionOutOfSyncException
 		 */
 		public HtmlButtonInput getButtonByLabel( String label )
-						throws HtmlElementNotFoundException, ActionOutOfSyncException {
-
+						throws HtmlElementNotFoundException, ActionOutOfSyncException
+		{
 			checkIfStillValid();
-
 			HtmlButtonInput button = this.element.getFirstByXPath(".//input[normalize-space(@value)='"+label+"']");
 			if( null == button )
 				throw new HtmlElementNotFoundException("Button labelled '"+label+"' not found.", currentTest);
+			return button;
+		}
 
+		/**
+		 * Finds first button with given label inside this tab box.
+		 */
+		public HtmlSubmitInput getSubmitButtonByLabel( String label )
+						throws HtmlElementNotFoundException, ActionOutOfSyncException
+		{
+			checkIfStillValid();
+			HtmlSubmitInput button = this.element.getFirstByXPath(".//input[normalize-space(@value)='"+label+"']");
+			if( null == button )
+				throw new HtmlElementNotFoundException("Submit button labelled '"+label+"' not found.", currentTest);
 			return button;
-
 		}
 
 		/**




More information about the embjopr-commits mailing list