Author: jjankovi
Date: 2011-08-10 12:18:28 -0400 (Wed, 10 Aug 2011)
New Revision: 33772
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/B1.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
Log:
CDI: added(new resource folder for CDIQuickFixTest, util class CDIUtil for context menu),
updated(CDIQuickFixTest, CdiATWizardTest), WS: updated(TopDown test - label changed)
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/B1.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/B1.java.cdi
(rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/cdi/B1.java.cdi 2011-08-10
16:18:28 UTC (rev 33772)
@@ -0,0 +1,14 @@
+package org.cdi.test;
+
+import javax.enterprise.context.SessionScoped;
+
+@SessionScoped
+public class B1 {
+
+
+
+ public B1() {
+
+ }
+
+}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-08-10
15:55:39 UTC (rev 33771)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -11,7 +11,7 @@
package org.jboss.tools.cdi.bot.test;
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
-import org.jboss.tools.cdi.bot.test.fix.QuickFixTest;
+import org.jboss.tools.cdi.bot.test.fix.CDIQuickFixTest;
import org.jboss.tools.cdi.bot.test.wizard.CdiATWizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
@@ -41,7 +41,7 @@
@SuiteClasses({
CdiATWizardTest.class,
BeansEditorTest.class,
- QuickFixTest.class
+ CDIQuickFixTest.class
})
public class CDIAllBotTests {
}
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/CDIUtil.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -0,0 +1,29 @@
+package org.jboss.tools.cdi.bot.test.uiutils.actions;
+
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+
+public class CDIUtil {
+
+ public SWTBotMenu nodeContextMenu(final SWTBotTree tree,
+ SWTBotTreeItem item, final String... menu) {
+ assert menu.length > 0;
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ return UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
+
+ public SWTBotMenu run() {
+ SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
+ tree, menu[0], false));
+ for (int i = 1; i < menu.length; i++) {
+ m = m.menu(menu[i]);
+ }
+ return m;
+ }
+ });
+ }
+
+}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-08-10
15:55:39 UTC (rev 33771)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -15,10 +15,16 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
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.helper.ContextMenuHelper;
public class CDIWizard extends Wizard {
@@ -52,7 +58,7 @@
}
return this;
}
-
+
public CDIWizard setInherited(boolean set) {
setCheckbox("Add @Inherited", set);
return this;
@@ -214,7 +220,8 @@
public List<String> getIBindings() {
setFocus();
- return Arrays.asList(bot().listWithLabel("Interceptor
Bindings:").getItems());
+ return Arrays.asList(bot().listWithLabel("Interceptor Bindings:")
+ .getItems());
}
public CDIWizard addStereotype(String stereotype) {
@@ -251,7 +258,7 @@
Radio2(Button b) {
super(b);
}
-
+
@Override
public SWTBotRadio click() {
return (SWTBotRadio) click(true);
@@ -278,7 +285,7 @@
}
return this;
}
-
+
public CDIWizard addInterface(String intf) {
switch (type) {
case DECORATOR:
@@ -361,7 +368,7 @@
}
return this;
}
-
+
public CDIWizard setMethodName(String name) {
switch (type) {
case INTERCEPTOR:
@@ -372,6 +379,7 @@
}
return this;
}
+
private void setCheckbox(String label, boolean set) {
setFocus();
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-08-10
15:55:39 UTC (rev 33771)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -20,6 +20,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.cdi.bot.test.uiutils.actions.CDIUtil;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewCDIFileWizard;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizard;
@@ -66,7 +67,9 @@
t.expand();
// Configure Add CDI Support...
- nodeContextMenu(tree, t, "Configure", "Add CDI (Context and Dependency
Injection) support...").click();
+
+ new CDIUtil().nodeContextMenu(tree, t, "Configure",
+ "Add CDI (Context and Dependency Injection) support...").click();
bot.activeShell().bot().button("OK").click();
util.waitForNonIgnoredJobs();
}
@@ -410,23 +413,8 @@
assertTrue(code.startsWith("/**"));
}
- private static SWTBotMenu nodeContextMenu(final SWTBotTree tree,
- SWTBotTreeItem item, final String... menu) {
- assert menu.length > 0;
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
- return UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
+
- public SWTBotMenu run() {
- SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
- tree, menu[0], false));
- for (int i = 1; i < menu.length; i++) {
- m = m.menu(menu[i]);
- }
- return m;
- }
- });
- }
-
private CDIWizard qualifier(String pkg, String name, boolean inherited,
boolean comments) {
return create(CDIWizardType.QUALIFIER, pkg, name, inherited, comments);
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-08-10
15:55:39 UTC (rev 33771)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -4700,7 +4700,7 @@
* represents item : Web Services->WSDL
*/
public static final INewObject LABEL = new INewObject() {
- public String getName() { return "WSDL";}
+ public String getName() { return "WSDL File";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("Web Services");
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-10
15:55:39 UTC (rev 33771)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/jbt/SampleWSTest.java 2011-08-10
16:18:28 UTC (rev 33772)
@@ -179,7 +179,7 @@
}
private void createSampleRESTWS(String project, String name, String pkg, String cls,
String appCls) {
- SWTBotEditor ed = createSampleService(Type.REST, project, name, pkg, cls, appCls);
+ SWTBotEditor ed = createSampleService(Type.REST, project, name, pkg, cls, appCls);
SWTBotEclipseEditor st = ed.toTextEditor();
st.selectRange(0, 0, st.getText().length());
InputStream javasrc =
SampleWSTest.class.getResourceAsStream("/resources/jbossws/Rest.java.ws");