Author: ldimaggio
Date: 2011-11-11 23:21:06 -0500 (Fri, 11 Nov 2011)
New Revision: 36316
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
Log:
Finished test for JBDS-1927
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2011-11-12
01:06:27 UTC (rev 36315)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2011-11-12
04:21:06 UTC (rev 36316)
@@ -5,6 +5,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
import org.jboss.tools.ui.bot.ext.config.Annotations.*;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.ESBESBProject;
@@ -21,36 +22,52 @@
testNewProject("ESBstandalone");
}
public void testNewProject(String projectName) {
- SWTBot wiz = open.newObject(ActionItem.NewObject.ESBESBProject.LABEL);
+
+ /* This test updated for JBDS-1927 - ldimaggi - Nov 11 2011 */
+
+ SWTBot wiz = open.newObject(ActionItem.NewObject.ESBESBProject.LABEL);
wiz.textWithLabel(ESBESBProject.TEXT_PROJECT_NAME).setText(projectName);
wiz.comboBoxInGroup("Target
runtime").setSelection(configuredState.getServer().name);
wiz.comboBoxInGroup("JBoss ESB
version").setSelection(SWTTestExt.configuredState.getServer().bundledESBVersion);
-
+
wiz.button(IDELabel.Button.NEXT).click();
wiz.button(IDELabel.Button.NEXT).click();
/* Radio button indicating that server supplied ESB runtime is used */
//System.out.println ("DEBUG = " + wiz.radio(0).isSelected() );
assertTrue(wiz.radio(0).isSelected());
+
+ wiz.sleep(3000l);
+ org.jboss.tools.ui.bot.ext.SWTUtilExt.displayAllBotWidgets(wiz);
+ wiz.button("Finish").click();
+ wiz.sleep(3000l);
- open.finish(wiz);
-
+ /* Locate the SOA-P server */
SWTBot serv = servers.bot();
SWTBotTree servTree = serv.tree();
servTree.select ("SOA-5.2 [Stopped]").contextMenu("Add and
Remove...").click();
- assertTrue (bot.label(1).getText().equals("There are no resources that can be
added or removed from the server."));
- fail ("Failure - JBDS-1927");
+ /* Deploy the ESB project to the server */
+ bot.button ("Add All >>").click();
+ bot.sleep(3000l);
+ /* There should only be one project deployed to the server */
+ assertTrue (bot.tree(1).getAllItems().length == 1);
+
+ /* And it is the ESB project */
+ assertTrue (projectName.equals(bot.tree(1).getTreeItem(projectName).getText()));
+
+ bot.button("Finish").click();
+
+ /* Check for JBDS-1927 */
+ assertFalse (bot.label(1).getText().equals("There are no resources that can be
added or removed from the server."));
wiz.sleep(3000l);
- bot.button("OK").click();
- wiz.sleep(3000l);
+ /* Verify that the ESB editor can open jboss-esb.xml */
assertTrue(projectExplorer.existsResource(projectName));
- assertTrue(projectExplorer.existsResource(projectName, "JBoss ESB Runtime
["+configuredState.getServer().name+"]"));
+// assertTrue(projectExplorer.existsResource(projectName, "JBoss ESB Runtime
["+configuredState.getServer().name+"]"));
assertTrue(bot.editorByTitle("jboss-esb.xml")!=null);
- // Now - deploy the project!
-
- }
-}
+ } /* test method */
+
+} /* class */
Show replies by date