EMBJOPR SVN: r542 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: util and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-19 10:11:59 -0400 (Fri, 19 Jun 2009)
New Revision: 542
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
Log:
Scripts tests updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-18 18:10:13 UTC (rev 541)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-19 14:11:59 UTC (rev 542)
@@ -3,6 +3,7 @@
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
import com.gargoylesoftware.htmlunit.html.HtmlDivision;
+import com.gargoylesoftware.htmlunit.html.HtmlForm;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTable;
@@ -261,13 +262,18 @@
ejtt.tabMenu.getTabContentBox().getButtonByLabel(EXECUTE_OP_NAME).click();
// Command Line Arguments: "-c"
- ContentTableRow row = ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("Command Line Arguments");
- assertNotNull("'Command Line Arguments' row not found.", row);
- HtmlCheckBoxInput unsetCheckbox = row./*getCellByColumnName("Unset").*/ getElement().getFirstByXPath(".//input[@type='checkbox']");
- unsetCheckbox.setChecked(false);
- HtmlTextArea argsTA = row./*getCellByColumnName("Value").*/ getElement().getFirstByXPath(".//textarea"); // [@ondblclick='commandLineArguments']
- argsTA.setText("-c");
+ {
+ HtmlTable resultsTableElm = ((HtmlForm)client.getElement("parametersForm")).getFirstByXPath("table[@class='properties-table']");
+ ContentTable resultsTable = ejtt.getTable(resultsTableElm);
+ ContentTableRow row = ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("Command Line Arguments");
+ assertNotNull("'Command Line Arguments' row not found.", row);
+ HtmlCheckBoxInput unsetCheckbox = row./*getCellByColumnName("Unset").*/ getElement().getFirstByXPath(".//input[@type='checkbox']");
+ unsetCheckbox.setChecked(false);
+ HtmlTextArea argsTA = row./*getCellByColumnName("Value").*/ getElement().getFirstByXPath(".//textarea"); // [@ondblclick='commandLineArguments']
+ argsTA.setText("-c");
+ }
+
// Run.
//ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
((HtmlSubmitInput) client.getElement("parametersForm:okButton")).click();
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-18 18:10:13 UTC (rev 541)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2009-06-19 14:11:59 UTC (rev 542)
@@ -1039,7 +1039,8 @@
/**/ // Give it another chance, JavaScript could change it.
// Get all TH from the first THEAD row that contains TH.
- String xPath = "./thead/tr[th and position()=1]/th";
+ //String xPath = "./thead/tr[th and position()=1]/th";
+ String xPath = ".//tr[th and position()=1]/th";
List<HtmlTableHeaderCell> colHeaders = (List<HtmlTableHeaderCell>) this.element.getByXPath(xPath);
if( 0 == colHeaders.size() ){
@@ -1538,6 +1539,17 @@
/**
+ * Some of the tables are outside tab menu content box.
+ */
+ public ContentTable getTable(HtmlTable table)
+ {
+ return new ContentTable(table);
+ }
+
+
+
+
+ /**
* Finds a <a> tag inside a form that has a particular label.
*
* TODO: Create Form wrapper.
15 years, 6 months
EMBJOPR SVN: r541 - trunk/core/src/main/webapp/secure.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-06-18 14:10:13 -0400 (Thu, 18 Jun 2009)
New Revision: 541
Modified:
trunk/core/src/main/webapp/secure/resourceInstanceOperation.xhtml
Log:
part of fix for https://jira.jboss.org/jira/browse/JOPR-204
Modified: trunk/core/src/main/webapp/secure/resourceInstanceOperation.xhtml
===================================================================
--- trunk/core/src/main/webapp/secure/resourceInstanceOperation.xhtml 2009-06-17 21:00:33 UTC (rev 540)
+++ trunk/core/src/main/webapp/secure/resourceInstanceOperation.xhtml 2009-06-18 18:10:13 UTC (rev 541)
@@ -213,13 +213,15 @@
</h:panelGroup>
<h:panelGroup id="operationResults" layout="block"
rendered="#{selectedHistory.status eq 'SUCCESS' and selectedHistory.results ne null and selectedHistory.operationDefinition.resultsConfigurationDefinition ne null}">
- <onc:config
- configurationDefinition="#{selectedHistory.operationDefinition.resultsConfigurationDefinition}"
- configuration="#{selectedHistory.results}"
- readOnly="true"
- nullConfigurationDefinitionMessage="null config def!"
- nullConfigurationMessage="null config!"
- nullConfigurationStyle="InfoBlock"/>
+ <h:form>
+ <onc:config
+ configurationDefinition="#{selectedHistory.operationDefinition.resultsConfigurationDefinition}"
+ configuration="#{selectedHistory.results}"
+ readOnly="true"
+ nullConfigurationDefinitionMessage="null config def!"
+ nullConfigurationMessage="null config!"
+ nullConfigurationStyle="InfoBlock"/>
+ </h:form>
</h:panelGroup>
<h:panelGroup id="noResults" layout="block"
rendered="#{selectedHistory.status eq 'SUCCESS' and (selectedHistory.results eq null or empty selectedHistory.results.map)}">
15 years, 6 months
EMBJOPR SVN: r540 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5: scripts and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-17 17:00:33 -0400 (Wed, 17 Jun 2009)
New Revision: 540
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
Log:
ScriptTest 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 20:37:08 UTC (rev 539)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-06-17 21:00:33 UTC (rev 540)
@@ -56,9 +56,13 @@
/**
* Changes "Active Binding Set Name" property in the Conf tab, saves,
* and then changes back to original.
+ * TODO: "Server restart needed" - see JOPR-230.
*/
public void testServiceBindingManagerConfigurationTest() throws IOException, EmbJoprTestException {
+ final String PROPERTY_activeBindingSetName = "activeBindingSetName";
+
+
// Go to Service Binding Managers node.
ejtt.navTree.getNodeByLabel(NAV_SBM).click();
@@ -71,7 +75,7 @@
//ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
Properties props = new Properties();
// Carefully - setting this to non-existent leads to disfunctional AS! See
- props.setProperty("activeBindingSetName", "ports-01");
+ props.setProperty(PROPERTY_activeBindingSetName, "ports-01");
fillOutForm(props);
ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
@@ -88,7 +92,7 @@
//ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
props = new Properties();
// Carefully - setting this to non-existent leads to disfunctional AS! See
- props.setProperty("activeBindingSetName", "ports-default");
+ props.setProperty(PROPERTY_activeBindingSetName, "ports-default");
fillOutForm(props);
ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-17 20:37:08 UTC (rev 539)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-17 21:00:33 UTC (rev 540)
@@ -3,6 +3,8 @@
import com.gargoylesoftware.htmlunit.Page;
import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
import com.gargoylesoftware.htmlunit.html.HtmlDivision;
+import com.gargoylesoftware.htmlunit.html.HtmlInput;
+import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
import com.gargoylesoftware.htmlunit.html.HtmlTable;
import com.gargoylesoftware.htmlunit.html.HtmlTextArea;
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
@@ -164,6 +166,8 @@
}
+
+
/**
* Runs the classpath.sh script, without parameters.
*/
@@ -179,8 +183,19 @@
ejtt.tabMenu.clickControlTab();
// Execute the script.
ejtt.tabMenu.getTabContentBox().getButtonByLabel(EXECUTE_OP_NAME).click();
+
// Command Line Arguments - none
- ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ //ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ // No tabs here.
+ // (22:50:51) ozizka: ccrouch, ips: After clicking "Execute Script", the Control Operation page (the one where I set the arguments) doesn't have the tabs. All other pages have tabs. Is this intentional?
+ // (22:52:49) ips: ozizka: yeah probably intentional to show you're in the middle of a workflow
+ // (22:52:55) ips: ideally we should switch it over to using a modal on the original page for prompting for the params
+ /*String label = "OK";
+ HtmlInput okButton = ((HtmlDivision) client.getElement("content")).getFirstByXPath(".//input[normalize-space(@value)='" + label + "']");
+ okButton.click();*/
+ ((HtmlSubmitInput) client.getElement("parametersForm:okButton")).click();
+
+
// Wait for the operation to succesfuly finish.
ejtt.operations.waitActivelyForOperationToFinish(EXECUTE_OP_NAME, 5000, 5);
assertTrue(EXECUTE_OP_NAME+" operation wasn't successful.", ejtt.tabMenu.getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
@@ -230,7 +245,7 @@
/**
- * Runs the classpath.sh script, without parameters.
+ * Runs `classpath.sh -c`, which prints the classpath.
*/
public void testScriptsRunClasspathshWithParamTest() throws IOException, EmbJoprTestException {
@@ -254,7 +269,9 @@
argsTA.setText("-c");
// Run.
- ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ //ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ ((HtmlSubmitInput) client.getElement("parametersForm:okButton")).click();
+
// Wait for the operation to succesfuly finish.
ejtt.operations.waitActivelyForOperationToFinish(EXECUTE_OP_NAME, 5000, 5);
assertTrue(EXECUTE_OP_NAME+" operation wasn't successful.", ejtt.tabMenu.getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
@@ -278,7 +295,7 @@
String expectedOutputPart = "/client";
HtmlTextArea outputTA = resultsTable.getFirstRowContainingText("Output").getCellByColumnName("Value").getFirstByXPath(".//textarea");
- assertTrue("classpath.sh parameter-less run output should contain '"+expectedOutputPart+"'", outputTA.getText().toLowerCase().contains(expectedOutputPart));
+ assertTrue("`classpath.sh -c` run output should contain '"+expectedOutputPart+"'", outputTA.getText().toLowerCase().contains(expectedOutputPart));
}
finally {
15 years, 6 months
EMBJOPR SVN: r539 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-17 16:37:08 -0400 (Wed, 17 Jun 2009)
New Revision: 539
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
Log:
2 scripts tests added.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-17 17:11:02 UTC (rev 538)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/scripts/ScriptsTest.java 2009-06-17 20:37:08 UTC (rev 539)
@@ -1,7 +1,11 @@
package org.jboss.jopr.jsfunit.as5.scripts;
import com.gargoylesoftware.htmlunit.Page;
+import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput;
import com.gargoylesoftware.htmlunit.html.HtmlDivision;
+import com.gargoylesoftware.htmlunit.html.HtmlTable;
+import com.gargoylesoftware.htmlunit.html.HtmlTextArea;
+import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
import java.io.File;
import java.io.FileWriter;
import java.io.FilenameFilter;
@@ -13,13 +17,11 @@
import org.apache.commons.io.filefilter.SuffixFileFilter;
import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
import org.jboss.jopr.jsfunit.util.ActiveConditionChecker;
import org.jboss.jopr.jsfunit.util.DescribedCondition;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
-import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.NavTreeNode;
-import org.jboss.util.file.FilenamePrefixFilter;
-import org.jboss.util.file.FilenameSuffixFilter;
/**
*
@@ -36,6 +38,7 @@
return new TestSuite(ScriptsTest.class);
}
+ final String EXECUTE_OP_NAME = "Execute Script";
/**
* Tests whether the scripts node exists and that all the scripts are listed.
@@ -122,11 +125,11 @@
// Create the script in JBOSS_HOME/bin/
String shFilePath = ejtt.getJBossHomeDir()+"/"+SCRIPT_FILE_NAME;
- final File file = new File(shFilePath);
+ final File scriptFile = new File(shFilePath);
try {
- if( file.exists() ){
+ if( scriptFile.exists() ){
log.warn(shFilePath+" already exists, thus is already visible in EmbJopr.");
}
new FileWriter(shFilePath, false).append("echo 'Test script.'").close();
@@ -153,15 +156,139 @@
}
finally {
// Delete the test script file if it exists.
- if( file.exists() )
- file.delete();
+ if( scriptFile.exists() )
+ scriptFile.delete();
}
}
+ /**
+ * Runs the classpath.sh script, without parameters.
+ */
+ public void testScriptsRunClasspathshTest() throws IOException, EmbJoprTestException {
+ final String SCRIPT_FILE_NAME = "classpath.sh";
+
+ try {
+ // Go to the Scripts node.
+ ejtt.navTree.getNodeByLabel(NAV_SCRIPTS).click();
+ // Go to the ClassPath script.
+ ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(SCRIPT_FILE_NAME).getLinkByLabel(SCRIPT_FILE_NAME).click();
+ ejtt.tabMenu.clickControlTab();
+ // Execute the script.
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel(EXECUTE_OP_NAME).click();
+ // Command Line Arguments - none
+ ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ // Wait for the operation to succesfuly finish.
+ ejtt.operations.waitActivelyForOperationToFinish(EXECUTE_OP_NAME, 5000, 5);
+ assertTrue(EXECUTE_OP_NAME+" operation wasn't successful.", ejtt.tabMenu.getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
+
+ // Get the results table.
+ //client.getElement("historyDetailsPanel_body");
+ HtmlDivision resultsDiv = (HtmlDivision) client.getElement("operationResults");
+ if( null == resultsDiv )
+ throw new HtmlElementNotFoundException("#operationResults - a div around a results table.");
+
+ HtmlTable resultsTableElm = resultsDiv.getFirstByXPath(".//table[@class='properties-table']");
+ if( null == resultsTableElm )
+ throw new HtmlElementNotFoundException(".//table[@class='properties-table'] - a results table.");
+ ContentTable resultsTable = ejtt.getTabMenu().getTabContentBox().getTable(resultsTableElm);
+
+ // Process the results table.
+
+ // Exit Code
+ HtmlTextInput exitCodeInput = resultsTable.getFirstRowContainingText("Exit Code").getCellByColumnName("Value").getFirstByXPath(".//input");
+ assertEquals("Exit Code should be 0", "0", exitCodeInput.getTextContent().trim() );
+
+ String expectedOutputPart = "usage";
+ HtmlTextArea outputTA = resultsTable.getFirstRowContainingText("Output").getCellByColumnName("Value").getFirstByXPath(".//textarea");
+ assertTrue("classpath.sh parameter-less run output should contain '"+expectedOutputPart+"'", outputTA.getText().toLowerCase().contains(expectedOutputPart));
+
+ }
+ finally {
+ }
+
+ }
+
+
+ /*
+ usage: classpath.sh [options] <classpath>
+
+ options:
+ -h, --help Print this help message.
+ -- Stop processing options.
+ -r, --relative Use relative paths.
+
+ classpath:
+ -c, --client Client classpath (client/*).
+ -s, --server Server classpath (lib/*).
+ -b, --both Both the client and server classpaths.
+ */
+
+
+
+ /**
+ * Runs the classpath.sh script, without parameters.
+ */
+ public void testScriptsRunClasspathshWithParamTest() throws IOException, EmbJoprTestException {
+
+ final String SCRIPT_FILE_NAME = "classpath.sh";
+
+ try {
+ // Go to the Scripts node.
+ ejtt.navTree.getNodeByLabel(NAV_SCRIPTS).click();
+ // Go to the ClassPath script.
+ ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingLink(SCRIPT_FILE_NAME).getLinkByLabel(SCRIPT_FILE_NAME).click();
+ ejtt.tabMenu.clickControlTab();
+ // Execute the script.
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel(EXECUTE_OP_NAME).click();
+
+ // Command Line Arguments: "-c"
+ ContentTableRow row = ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("Command Line Arguments");
+ assertNotNull("'Command Line Arguments' row not found.", row);
+ HtmlCheckBoxInput unsetCheckbox = row./*getCellByColumnName("Unset").*/ getElement().getFirstByXPath(".//input[@type='checkbox']");
+ unsetCheckbox.setChecked(false);
+ HtmlTextArea argsTA = row./*getCellByColumnName("Value").*/ getElement().getFirstByXPath(".//textarea"); // [@ondblclick='commandLineArguments']
+ argsTA.setText("-c");
+
+ // Run.
+ ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("OK").click();
+ // Wait for the operation to succesfuly finish.
+ ejtt.operations.waitActivelyForOperationToFinish(EXECUTE_OP_NAME, 5000, 5);
+ assertTrue(EXECUTE_OP_NAME+" operation wasn't successful.", ejtt.tabMenu.getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
+
+ // Get the results table.
+ //client.getElement("historyDetailsPanel_body");
+ HtmlDivision resultsDiv = (HtmlDivision) client.getElement("operationResults");
+ if( null == resultsDiv )
+ throw new HtmlElementNotFoundException("#operationResults - a div around a results table.");
+
+ HtmlTable resultsTableElm = resultsDiv.getFirstByXPath(".//table[@class='properties-table']");
+ if( null == resultsTableElm )
+ throw new HtmlElementNotFoundException(".//table[@class='properties-table'] - a results table.");
+ ContentTable resultsTable = ejtt.getTabMenu().getTabContentBox().getTable(resultsTableElm);
+
+ // Process the results table.
+
+ // Exit Code
+ HtmlTextInput exitCodeInput = resultsTable.getFirstRowContainingText("Exit Code").getCellByColumnName("Value").getFirstByXPath(".//input");
+ assertEquals("Exit Code should be 0", "0", exitCodeInput.getTextContent().trim() );
+
+ String expectedOutputPart = "/client";
+ HtmlTextArea outputTA = resultsTable.getFirstRowContainingText("Output").getCellByColumnName("Value").getFirstByXPath(".//textarea");
+ assertTrue("classpath.sh parameter-less run output should contain '"+expectedOutputPart+"'", outputTA.getText().toLowerCase().contains(expectedOutputPart));
+
+ }
+ finally {
+ }
+
+
+ }
+
+
+
}// class
15 years, 6 months
EMBJOPR SVN: r538 - trunk/jsfunit/testdata/ejb2.
by embjopr-commits@lists.jboss.org
Author: ips
Date: 2009-06-17 13:11:02 -0400 (Wed, 17 Jun 2009)
New Revision: 538
Added:
trunk/jsfunit/testdata/ejb2/mdbsessionpoolclear.jar
Log:
add an EJB2 ejb-jar that contains an MDB
Added: trunk/jsfunit/testdata/ejb2/mdbsessionpoolclear.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsfunit/testdata/ejb2/mdbsessionpoolclear.jar
___________________________________________________________________
Name: svn:mime-type
+ application/java-archive
15 years, 6 months
EMBJOPR SVN: r537 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-17 13:06:00 -0400 (Wed, 17 Jun 2009)
New Revision: 537
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.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 17:00:08 UTC (rev 536)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-06-17 17:06:00 UTC (rev 537)
@@ -88,7 +88,7 @@
//ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
props = new Properties();
// Carefully - setting this to non-existent leads to disfunctional AS! See
- props.setProperty("Active Binding Set Name", "ports-default");
+ props.setProperty("activeBindingSetName", "ports-default");
fillOutForm(props);
ejtt.tabMenu.getTabContentBox().getSubmitButtonByLabel("Save").click();
15 years, 6 months
EMBJOPR SVN: r536 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: util and 1 other directory.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)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;
-
}
/**
15 years, 6 months
EMBJOPR SVN: r535 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-17 12:22:59 -0400 (Wed, 17 Jun 2009)
New Revision: 535
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.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 14:28:55 UTC (rev 534)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-06-17 16:22:59 UTC (rev 535)
@@ -24,6 +24,7 @@
/**
+ * Checks that SBM is listed in the tree, and verifies the Summary tab values.
*/
public void testServiceBindingManagerTest() throws IOException, EmbJoprTestException {
@@ -53,6 +54,8 @@
/**
+ * Changes "Active Binding Set Name" property in the Conf tab, saves,
+ * and then changes back to original.
*/
public void testServiceBindingManagerConfigurationTest() throws IOException, EmbJoprTestException {
@@ -68,7 +71,7 @@
//ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
Properties props = new Properties();
// Carefully - setting this to non-existent leads to disfunctional AS! See
- props.setProperty("Active Binding Set Name", "ports-01");
+ props.setProperty("activeBindingSetName", "ports-01");
fillOutForm(props);
ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
15 years, 6 months
EMBJOPR SVN: r534 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit: as5 and 1 other directories.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-17 10:28:55 -0400 (Wed, 17 Jun 2009)
New Revision: 534
Added:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
Log:
ServiceBindingManager test added.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-06-16 20:42:37 UTC (rev 533)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/AppConstants.java 2009-06-17 14:28:55 UTC (rev 534)
@@ -120,7 +120,10 @@
public static final String NAV_EMB_WAR = "Embedded WARs";
public static final String NAV_EMB_RAR = "Embedded RARs";
+ public static final String NAV_SBMS = "Service Binding Managers";
+ public static final String NAV_SBM = "ServiceBindingManager";
+
public static final String EAR_MALFORMED_APP_FILENAME = "malformed-application-xml.ear";
public static final String EAR_MALFORMED_APP_FILENAME_2 = "malformed-application-xml-2.ear";
public static final String EAR_NOT_MALFORMED_APP_FILENAME = "not-malformed-application-xml.ear";
Added: 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 (rev 0)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/sbm/ServiceBindingManagerTest.java 2009-06-17 14:28:55 UTC (rev 534)
@@ -0,0 +1,104 @@
+package org.jboss.jopr.jsfunit.as5.sbm;
+
+import java.io.IOException;
+import java.util.Properties;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.jboss.jopr.jsfunit.ApplicationTestBaseAS5;
+import org.jboss.jopr.jsfunit.exceptions.EmbJoprTestException;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentInfoTable;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
+import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
+
+/**
+ * See <JBOSS_HOME>/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
+ * and http://www.jboss.org/community/wiki/AS5ServiceBindingManager
+ *
+ * @author Ondrej Zizka
+ */
+public class ServiceBindingManagerTest extends ApplicationTestBaseAS5 {
+
+ public static Test suite(){
+ return new TestSuite(ServiceBindingManagerTest.class);
+ }
+
+
+ /**
+ */
+ public void testServiceBindingManagerTest() throws IOException, EmbJoprTestException {
+
+ // Go to Service Binding Managers node.
+ ejtt.navTree.getNodeByLabel(NAV_SBMS).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") );
+
+ // Go to SBM.
+ row.getLinkByLabel(NAV_SBM).click();
+
+
+ // Summary tab
+ ContentTable table = ejtt.tabMenu.getTabContentBox().getTableUnderHeader("General Properties");
+ ContentInfoTable infoTable = ejtt.getContentInfoTable(table.getElement());
+ Properties props = infoTable.getProperties();
+
+ // Name
+ assertEquals("Name should be "+NAV_SBM, NAV_SBM, props.getProperty("Name"));
+
+ // Version is currently "--"
+ // Description: The Service Binding Manager manages the ports of the deployed services
+
+ }
+
+
+ /**
+ */
+ public void testServiceBindingManagerConfigurationTest() throws IOException, EmbJoprTestException {
+
+ // Go to Service Binding Managers node.
+ ejtt.navTree.getNodeByLabel(NAV_SBM).click();
+
+
+ // -- Update -- //
+
+ // Go to Configuration tab.
+ ejtt.tabMenu.clickConfigurationTab();
+
+ //ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
+ Properties props = new Properties();
+ // Carefully - setting this to non-existent leads to disfunctional AS! See
+ props.setProperty("Active Binding Set Name", "ports-01");
+ fillOutForm(props);
+
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+
+ String expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
+ checkClientAndServerMessages(expMsg, expMsg, false);
+
+
+ // -- Set back to original -- //
+
+ // Go to Configuration tab.
+ ejtt.tabMenu.clickConfigurationTab();
+
+ //ejtt.tabMenu.getTabContentBox().getFirstTable().getFirstRowContainingText("")
+ props = new Properties();
+ // Carefully - setting this to non-existent leads to disfunctional AS! See
+ props.setProperty("Active Binding Set Name", "ports-default");
+ fillOutForm(props);
+
+ ejtt.tabMenu.getTabContentBox().getButtonByLabel("Save");
+
+ expMsg = "Successfully updated Service Binding Manager 'ServiceBindingManager'";
+ checkClientAndServerMessages(expMsg, expMsg, false);
+
+
+ }
+
+
+
+}// class
+
+
+
15 years, 6 months
EMBJOPR SVN: r533 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb.
by embjopr-commits@lists.jboss.org
Author: ozizka(a)redhat.com
Date: 2009-06-16 16:42:37 -0400 (Tue, 16 Jun 2009)
New Revision: 533
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java
Log:
EJB3 tests updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java 2009-06-16 20:10:07 UTC (rev 532)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ejb/Ejb30Test.java 2009-06-16 20:42:37 UTC (rev 533)
@@ -84,7 +84,11 @@
try {
String appPath = ejtt.getTestDataDir() + EJBS_SUB_DIR + DEPLOYABLE_NAME;
ejtt.deployment.deployViaEmbJopr(APP_TYPE, appPath);
+ String expectedMsg = "Resource " + DEPLOYABLE_NAME + " created successfully!";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+ expectedMsg = "Successfully deleted EJB3 JAR '"+DEPLOYABLE_NAME+"'.";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
}
finally {
}
@@ -99,7 +103,11 @@
try {
String appPath = ejtt.getTestDataDir() + EJBS_SUB_DIR + DEPLOYABLE_NAME;
ejtt.deployment.deployViaEmbJopr(APP_TYPE, appPath);
+ String expectedMsg = "Resource " + DEPLOYABLE_NAME + " created successfully!";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+ expectedMsg = "Successfully deleted EJB3 JAR '"+DEPLOYABLE_NAME+"'.";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
}
finally {
}
@@ -113,7 +121,11 @@
try {
String appPath = ejtt.getTestDataDir() + EJBS_SUB_DIR + DEPLOYABLE_NAME;
ejtt.deployment.deployViaEmbJopr(APP_TYPE, appPath);
+ String expectedMsg = "Resource " + DEPLOYABLE_NAME + " created successfully!";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+ expectedMsg = "Successfully deleted EJB3 JAR '"+DEPLOYABLE_NAME+"'.";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
}
finally {
}
@@ -126,8 +138,14 @@
try {
String appPath = ejtt.getTestDataDir() + EJBS_SUB_DIR + DEPLOYABLE_NAME;
+
ejtt.deployment.deployViaEmbJopr(APP_TYPE, appPath);
+ String expectedMsg = "Resource " + DEPLOYABLE_NAME + " created successfully!";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
+
ejtt.deployment.undeployViaEmbJopr(APP_TYPE, DEPLOYABLE_NAME);
+ expectedMsg = "Successfully deleted EJB3 JAR '"+DEPLOYABLE_NAME+"'.";
+ checkClientAndServerMessages(expectedMsg, expectedMsg, false);
}
finally {
}
15 years, 6 months