Author: ldimaggio
Date: 2011-11-09 23:43:58 -0500 (Wed, 09 Nov 2011)
New Revision: 36259
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
Log:
Added initial 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-10
01:11:28 UTC (rev 36258)
+++
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2011-11-10
04:43:58 UTC (rev 36259)
@@ -1,6 +1,9 @@
package org.jboss.tools.esb.ui.bot.tests;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+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.Annotations.*;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
@@ -21,14 +24,33 @@
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.comboBoxInGroup("JBoss ESB
version").setSelection(SWTTestExt.configuredState.getServer().bundledESBVersion);
+
wiz.button(IDELabel.Button.NEXT).click();
wiz.button(IDELabel.Button.NEXT).click();
- assertTrue(wiz.comboBox(0).getText().equals(SWTTestExt.configuredState.getEsb().name));
+
+ /* Radio button indicating that server supplied ESB runtime is used */
+ //System.out.println ("DEBUG = " + wiz.radio(0).isSelected() );
+ assertTrue(wiz.radio(0).isSelected());
+
open.finish(wiz);
+
+ 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");
+
+ wiz.sleep(3000l);
+ bot.button("OK").click();
+ wiz.sleep(3000l);
+
assertTrue(projectExplorer.existsResource(projectName));
assertTrue(projectExplorer.existsResource(projectName, "JBoss ESB Runtime
["+configuredState.getServer().name+"]"));
assertTrue(bot.editorByTitle("jboss-esb.xml")!=null);
+ // Now - deploy the project!
+
}
}