JBoss Tools SVN: r44670 - in branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test: src/org/jboss/tools/esb/ui/bot/tests and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2013-02-07 10:00:50 -0500 (Thu, 07 Feb 2013)
New Revision: 44670
Modified:
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBActionFactory.java
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBListener.java
branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java
Log:
Updated the ESB Bot tests for branch: http://anonsvn.jboss.org/repos/jbosstools/branches/jbosstools-3.3.x/esb/t...
The tests were out of date - they had not been updated in this branch since Oct 2012.
Also, the tests that verify the operation of an ESB runtime inside of an SOA install were restoed (see JIRA JBDS-2394)
The pom.xml file was modified to download the required ESB and SOA server/runtime .zips
https://issues.jboss.org/browse/JBIDE-13475
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2013-02-07 15:00:50 UTC (rev 44670)
@@ -9,29 +9,114 @@
</parent>
<groupId>org.jboss.tools.esb.tests</groupId>
<artifactId>org.jboss.tools.esb.ui.bot.test</artifactId>
-
+
<packaging>eclipse-test-plugin</packaging>
<properties>
- <jbosstools.test.jbossesb.home>${requirement.build.root}/jbossesb-4.11</jbosstools.test.jbossesb.home>
- <jbosstools.test.jbosssoa.home>${requirement.build.root}/jboss-soa-p-5.3/jboss-soa-p-5/jboss-as</jbosstools.test.jbosssoa.home>
+ <requirementsDirectory>${project.build.directory}</requirementsDirectory>
+ <jbosstools.test.jbossesb.home>${requirementsDirectory}/jbossesb-4.11</jbosstools.test.jbossesb.home>
+ <jbosstools.test.jbosssoa.home>${requirementsDirectory}/jboss-soa-p-5/jboss-as</jbosstools.test.jbosssoa.home>
<swtbot.test.properties.file>./org.jboss.tools.esb.ui.bot.test.properties</swtbot.test.properties.file>
<systemProperties>-Djbosstools.test.jbossesb.home=${jbosstools.test.jbossesb.home} -Djbosstools.test.jbosssoa.home=${jbosstools.test.jbosssoa.home} -Dswtbot.test.properties.file=${swtbot.test.properties.file}
</systemProperties>
</properties>
+ <profiles>
+ <profile>
+ <id>skip-tests-privateReqs</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>skipPrivateRequirements</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <properties>
+ <esb.test.skip>true</esb.test.skip>
+ </properties>
+ </profile>
+ <profile>
+ <id>skip-swtbot</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <property>
+ <name>swtbot.test.skip</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <properties>
+ <esb.test.skip>true</esb.test.skip>
+ </properties>
+ </profile>
+ </profiles>
+
+
<build>
<plugins>
<plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>install-soa-platform</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://jawa05.englab.brq.redhat.com/released/soa-5.3.0.GA/soa-p-5.3.0.GA.zip</url>
+ <md5>88129f9bee025e153687cf7e0c5966b8</md5>
+ <unpack>true</unpack>
+ <skip>${esb.test.skip}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>install-esb</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://download.jboss.org/jbossesb/4.11/binary/jbossesb-4.11.zip</url>
+ <md5>506bb7f42777cf0e524ccc37336aa137</md5>
+ <unpack>true</unpack>
+ <skip>${esb.test.skip}</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<useUIThread>false</useUIThread>
- <skip>${swtbot.test.skip}</skip>
+ <skip>${esb.test.skip}</skip>
<testSuite>org.jboss.tools.esb.ui.bot.test</testSuite>
<testClass>org.jboss.tools.esb.ui.bot.tests.ESBAllBotTests</testClass>
<forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
+
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.xulrunner.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <!-- This entry should enable creating of default JDK on Mac -->
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jdt.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+
</configuration>
</plugin>
</plugins>
</build>
</project>
+
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/ESBAllBotTests.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.esb.ui.bot.tests;
+//import org.jboss.tools.esb.ui.bot.tests.examples.SimpleMylyn;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorld;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldAction;
import org.jboss.tools.esb.ui.bot.tests.examples.HelloWorldFileAction;
@@ -31,8 +32,9 @@
CreateRuntimeFromSOA.class,
NewProjectUsingRuntime.class,
NewProjectUsingBundledInEAP.class,
+ NewProjectUsingBundledInSOA.class,
Editing.class,
- HelloWorld.class,
+ HelloWorld.class,
HelloWorldAction.class,
HelloWorldFileAction.class,
SmooksCSV2XML.class,
@@ -40,10 +42,10 @@
SmooksXML2XMLDateManipulation.class,
SmooksXML2XMLSimple.class,
WebServiceConsumer1.class,
-// WebServiceProducer.class, // http://lists.jboss.org/pipermail/jbosstools-dev/2008-December/002559.html
+ WebServiceProducer.class, // http://lists.jboss.org/pipermail/jbosstools-dev/2008-December/002559.html
WebServiceProducerHttp.class,
WebServiceProducerSocket.class
- //SimpleEAPTest.class
+// //SimpleEAPTest.class
})
@RunWith(RequirementAwareSuite.class)
public class ESBAllBotTests {
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -62,10 +62,12 @@
@BeforeClass
public static void setupProject() {
SWTBot wiz = open.newObject(ActionItem.NewObject.ESBESBProject.LABEL);
- wiz.textWithLabel(ESBESBProject.TEXT_PROJECT_NAME).setText(projectName);
+ wiz.textWithLabel(ESBESBProject.TEXT_PROJECT_NAME).setText(projectName);
+ wiz.sleep(TIME_5S);
wiz.button(IDELabel.Button.NEXT).click();
+ wiz.sleep(TIME_5S);
wiz.button(IDELabel.Button.NEXT).click();
- wiz.sleep(30000l);
+ wiz.sleep(TIME_5S);
open.finish(wiz);
}
@@ -79,8 +81,9 @@
packageExplorer.show().bot().tree().select(projectName);
SWTBot wiz = open.newObject(ESBESBFile.LABEL);
wiz.textWithLabel(ESBESBFile.TEXT_NAME).setText("another-esb-config");
- bot.sleep(30000l);
+ bot.sleep(TIME_5S);
open.finish(wiz);
+ bot.sleep(TIME_5S);
assertTrue(bot.editorByTitle("another-esb-config.xml") != null);
assertTrue("ESB Editor opened problems",
problems.getErrorsNode(bot) == null);
@@ -113,10 +116,19 @@
+ Arrays.toString(providerList.toArray()),
providerList.isEmpty());
collapseTree();
+ /* ldimaggi - August 2012 - added to make test run on Eclipse Juno */
+ getEditor().save();
}
@Test
public void listeners() {
+
+ /* Add service is failing on Jenkins - https://issues.jboss.org/browse/JBQA-7100
+ * This problem appeared in the firt week of Oct. 2012 - and is only seen when the
+ * test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
+ SWTBotEditor editor = getEditor();
+ getEditorActive(editor, "Listeners");
+
String service = "aaa";
addService(service);
List<String> listenerList = getAvailableListeners(service);
@@ -128,9 +140,20 @@
try {
log.info("Invoke " + m.getName());
ESBListener action = (ESBListener) m.invoke(null, new Object[]{});
+ log.info ("action set ");
action.setService(service);
+ log.info ("service set");
+
+ /* ldimaggi - August 2012 - added to make test run on Eclipse Juno */
+ getEditor().save();
+ log.info ("editor save");
+
action.create(getEditor(), actionPath);
+ log.info ("action created");
+
listenerList.remove(action.getMenuLabel());
+ log.info ("listenerList.remove");
+
} catch (Exception e) {
fail("Exception "+e.getMessage());
e.printStackTrace();
@@ -142,12 +165,23 @@
+ Arrays.toString(listenerList.toArray()),
listenerList.isEmpty());
collapseTree();
+ bot.sleep(TIME_5S);
+
+ /* ldimaggi - August 2012 - added to make test run on Eclipse Juno */
+ getEditor().save();
}
@Test
public void actions() {
String service = "bbb";
- addService(service);
+
+ /* Add service is failing on Jenkins - https://issues.jboss.org/browse/JBQA-7100
+ * This problem appeared in the firt week of Oct. 2012 - and is only seen when the
+ * test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
+ SWTBotEditor editor = getEditor();
+ getEditorActive(editor, "Actions");
+
+ addService(service);
String[] actionPath = new String[] { configFileFull, node_services,
"bbb", "Actions" };
// first create all actions
@@ -185,8 +219,23 @@
}
}
+
+ /* Add service is failing on Jenkins - https://issues.jboss.org/browse/JBQA-7100
+ * This problem appeared in the firt week of Oct. 2012 - and is only seen when the
+ * test is run on Jenkins - as a workaround - the editor is saved/shown - ldimaggi */
+ public void getEditorActive (SWTBotEditor theEditor, String taskType) {
+ if (!theEditor.isActive()) {
+ log.error(taskType + " Editor is active? = " + theEditor.isActive());
+ bot.sleep(30000l);
+ log.error(theEditor.getTitle());
+ theEditor.save();
+ theEditor.show();
+ log.error(taskType + " Editor is active? = " + theEditor.isActive());
+ }
+ }
private SWTBotEditor getEditor() {
+ bot.sleep(TIME_5S);
return bot.editorByTitle(configFileFull);
}
@@ -238,7 +287,7 @@
}
private void addService(String name) {
- SWTBotEditor editor = getEditor();
+ SWTBotEditor editor = getEditor();
SWTBotTreeItem services = SWTEclipseExt.selectTreeLocation(
editor.bot(), configFileFull, node_services);
ContextMenuHelper.prepareTreeItemForContextMenu(editor.bot().tree(),
@@ -247,7 +296,7 @@
menu_addService, false)).click();
SWTBotShell shell = bot.shell("Add Service");
shell.activate();
- SWTBot shellBot = shell.bot();
+ SWTBot shellBot = shell.bot();
assertFalse(bot.button(IDELabel.Button.FINISH).isEnabled());
shellBot.text(0).setText(name);
assertFalse(bot.button(IDELabel.Button.FINISH).isEnabled());
@@ -256,11 +305,24 @@
shellBot.text(2).setText(name);
assertTrue(bot.button(IDELabel.Button.FINISH).isEnabled());
open.finish(shellBot);
+
+ /* New test - for SOA-P 5.3 new feature - recordRoute - https://issues.jboss.org/browse/JBQA-6528 */
+// org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(bot);
+ assertTrue (bot.comboBoxWithLabel("Record Route:").selectionIndex() == -1);
+ assertTrue (bot.comboBoxWithLabel("Record Route:").itemCount() == 3);
+ String [] theItems = bot.comboBoxWithLabel("Record Route:").items();
+ assertTrue (theItems.length == 3);
+ assertTrue (theItems[1].equals("true"));
+ assertTrue (theItems[2].equals("false"));
+ bot.comboBoxWithLabel("Record Route:").setSelection("true");
+ assertTrue (bot.comboBoxWithLabel("Record Route:").getText().equals("true"));
+
Assertions.assertXmlContentBool(getEditor().toTextEditor().getText(),
- "count(//jbossesb/services/service[@name='" + name + "'])=1");
+ "count(//jbossesb/services/service[@name='" + name + "' and @recordRoute='true'])=1");
+
Assertions.assertTreeContent(getEditor(),configFileFullNotSaved, node_services, name);
addPropertyWithXMLContent("//jbossesb/services/service[@name='" + name
- + "']", configFileFullNotSaved, node_services, name);
+ + "']", configFileFullNotSaved, node_services, name);
editor.save();
}
@@ -340,13 +402,9 @@
/* ldimaggi - https://issues.jboss.org/browse/JBQA-5829 */
// Assertions.assertXmlContentString(getEditor().toTextEditor().getText(), xpathPath
-// + "/property[@name='" + propertyName + "']/" + propertyName
+// + "/property[@name='" + propertyName + "']/" + propertyName
// + "[@name='value']/text()", "<>@&");
}
-
-
-
-
}
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -45,7 +45,7 @@
/* Locate the SOA-P server */
SWTBot serv = servers.bot();
SWTBotTree servTree = serv.tree();
- servTree.select ("SOA-5.2 [Stopped]").contextMenu("Add and Remove...").click();
+ servTree.select ("SOA-5.3 [Stopped]").contextMenu("Add and Remove...").click();
/* Deploy the ESB project to the server */
bot.button ("Add All >>").click();
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBActionFactory.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBActionFactory.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBActionFactory.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -6,6 +6,8 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.widgets.SWTBotSection;
+import static junit.framework.Assert.assertTrue;
+
public class ESBActionFactory {
public static ESBAction customAction() {
return new ESBAction("Custom Action",null,"java.lang.Object") {
@@ -51,6 +53,8 @@
SWTBotSection section = bot.section(editor.bot(),getSectionTitle());
editTextProperty(editor, section.bot(), "Process Definition Name:", "process-definition-name", "process");
editProcess(editor,true);
+ bot.sleep(60000l);
+
}
@Override
protected void doFillForm(SWTBotShell shell) {
@@ -62,6 +66,48 @@
};
}
+
+ public static ESBAction bpm5Processor() {
+ return new ESBAction("BPM 5 Processor","BPM","org.jboss.soa.esb.services.jbpm5.actions.Bpm5Processor") {
+
+ @Override
+ public String getMenuLabel() {
+ return this.uiName;
+ }
+ @Override
+ public String getSectionTitle() {
+ return "Bpm 5 Processor Action";
+ }
+ @Override
+ protected void doEditing(SWTBotEditor editor, String... path) {
+ SWTBotSection section = bot.section(editor.bot(),getSectionTitle());
+ //org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(bot);
+ editTextProperty(editor, section.bot(), "Process Definition Name:", "process-definition-name", "edited process definition name");
+ editTextProperty(editor, section.bot(), "Process ID:", "process-id", "edited processID");
+ editProcess(editor,false);
+ }
+ @Override
+ protected void doFillForm(SWTBotShell shell) {
+ Assertions.assertButtonEnabled(shell.bot().button(getFinishButton()), false);
+ shell.bot().text(0).setText(this.uiName);
+ shell.bot().text(1).setText(this.uiName + "processDefName");
+ shell.bot().text(2).setText(this.uiName + "processID");
+ shell.bot().comboBox().setSelection(1);
+
+ /* Added for - https://issues.jboss.org/browse/JBQA-6529 - ESB Editor : create template for BPM5Processor action */
+ assertTrue (shell.bot().comboBox().selectionIndex() == 1);
+ assertTrue (shell.bot().comboBox().itemCount() == 3);
+ String [] theItems = shell.bot().comboBox().items();
+ assertTrue (theItems.length == 3);
+ assertTrue (theItems[0].equals("startProcess"));
+ assertTrue (theItems[1].equals("signalEvent"));
+ assertTrue (theItems[2].equals("abortProcessInstance"));
+ Assertions.assertButtonEnabled(shell.bot().button(getFinishButton()), true);
+ }
+
+ };
+ }
+
public static ESBAction bpmRulesProcessor() {
return new ESBAction("Business Rules Processor","BPM","org.jboss.soa.esb.actions.BusinessRulesProcessor") {
@Override
@@ -385,10 +431,9 @@
Assertions.assertButtonEnabled(shell.bot().button(getFinishButton()), false);
shell.bot().text(0).setText(this.uiName);
- System.out.println ("DEBUG - this.uiName " + this.uiName);
+ //System.out.println ("DEBUG - this.uiName " + this.uiName);
+ //org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(shell.bot());
- org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(shell.bot());
-
/* ldimaggi - Nov 4 2011 - need this to avoid an error where an array
* out of bounds is hit - as the Sync Service Invoker has combo boxes, not text fields */
if (this.uiName.equals("Sync Service Invoker")) {
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBListener.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBListener.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/ESBListener.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -1,5 +1,7 @@
package org.jboss.tools.esb.ui.bot.tests.editor;
+import static junit.framework.Assert.assertTrue;
+
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
@@ -27,11 +29,10 @@
Assertions.assertButtonEnabled(shell.bot().button(getFinishButton()), true);
}
protected void doEditing(SWTBotEditor editor, String... path) {
-
}
public void edit(SWTBotEditor editor, String... path) {
- editor.show();
+ editor.show();
SWTEclipseExt.selectTreeLocation(editor.bot(), path);
doEditing(editor, (String[])null);
editor.bot().sleep(5000);
@@ -46,6 +47,32 @@
String xpath="count("+getBaseXPath()+getXpath()+")=1";
Assertions.assertXmlContentBool(text, xpath);
editor.save();
+
+
+ /* Added test for - https://issues.jboss.org/browse/JBQA-6527 - Add support for gateway messaging priority in the ESB editor */
+ if (this.uiName.contains("Gateway")) {
+// org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(bot);
+ assertTrue (editor.bot().comboBoxWithLabel("Message Flow Priority:").selectionIndex() == -1);
+ assertTrue (bot.comboBoxWithLabel("Message Flow Priority:").itemCount() == 11);
+ String [] theItems = bot.comboBoxWithLabel("Message Flow Priority:").items();
+ assertTrue (theItems.length == 11);
+
+ assertTrue (theItems[1].equals("0"));
+ assertTrue (theItems[2].equals("1"));
+ assertTrue (theItems[3].equals("2"));
+ assertTrue (theItems[4].equals("3"));
+ assertTrue (theItems[5].equals("4"));
+ assertTrue (theItems[6].equals("5"));
+ assertTrue (theItems[7].equals("6"));
+ assertTrue (theItems[8].equals("7"));
+ assertTrue (theItems[9].equals("8"));
+ assertTrue (theItems[10].equals("9"));
+ bot.comboBoxWithLabel("Message Flow Priority:").setSelection(8);
+
+ assertTrue (bot.comboBoxWithLabel("Message Flow Priority:").getText().equals("7"));
+ editor.save();
+ }
+
}
}
Modified: branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java
===================================================================
--- branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java 2013-02-05 17:14:46 UTC (rev 44669)
+++ branches/jbosstools-3.3.x/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/editor/action/Notifier.java 2013-02-07 15:00:50 UTC (rev 44670)
@@ -101,16 +101,13 @@
xpathOrig+="/target[@auth='LDAP' and @class='NotifyEmail' and @from='a' and @host='redhat.com' and @sendTo='b' and @subject='c' and @password='thepas$w0rd' and @port='25' and @ccTo='The copier' and @message='The message' and @username='QEuser']";
Assertions.assertXmlContentExists(editor.toTextEditor().getText(), xpathOrig);
-
/* Comment out due to - https://issues.jboss.org/browse/JBDS-2167 */
-// bot.button("&Add...").click();
-// SWTBotTreeItem [] theItems = bot.tree().getAllItems();
-//
-// theItems[0].getNode("resources.jar").expand();
-// theItems[0].getNode("resources.jar").getNode("META-INF").expand();
-// theItems[0].getNode("resources.jar").getNode("META-INF").getNode("MANIFEST.MF").select();
-// bot.button("&Finish").click();
-
+ bot.button("&Add...").click();
+ SWTBotTreeItem [] theItems = bot.tree().getAllItems();
+ theItems[0].getNode("esbcontent").expand();
+ theItems[0].getNode("esbcontent").getNode("META-INF").expand();
+ theItems[0].getNode("esbcontent").getNode("META-INF").getNode("jboss-esb.xml*").select();
+ bot.button("&Finish").click();
editor.save();
}