Author: jlukas(a)redhat.com
Date: 2011-01-25 08:28:16 -0500 (Tue, 25 Jan 2011)
New Revision: 28594
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/actions/Action.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
Log:
update tests to 3.2cr1
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-01-25
13:18:53 UTC (rev 28593)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2011-01-25
13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -17,10 +17,21 @@
import org.junit.runners.Suite.SuiteClasses;
/**
+ * This test suite requires JBoss AS 6 or newer
+ *
* System properties:
* -Dswtbot.test.properties.file=$PATH
* -Dusage_reporting_enabled=$BOOLEAN
*
+ * Format of swtbot.properties file:
+ * SERVER=EAP|JBOSS_AS,<server version>,<jre version to run
with>|default,<server home>
+ *
+ * Sample swtbot.properties file:
+ *
+ * SERVER=JBOSS_AS,6.0,default,/home/lukas/latest/jboss-6.0.0.Final
+ * JAVA=1.6,/space/java/sdk/jdk1.6.0_22
+ *
+ *
* Suite duration: aprox. 3min
*
* @author Lukas Jungmann
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2011-01-25
13:18:53 UTC (rev 28593)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/Action.java 2011-01-25
13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -11,31 +11,19 @@
package org.jboss.tools.cdi.bot.test.uiutils.actions;
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.SWTBotMenu;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
public abstract class Action<T> {
private final SWTBotExt bot = new SWTBotExt();
private final String[] actionPath;
- private final String[] nodePath;
- private final SWTBotTree tree;
public Action(String... path) {
- this(null, null, path);
+ assert path.length > 0;
+ this.actionPath = path;
}
- public Action(SWTBotTree tree, String[] nodePath, String... actionPath) {
- assert actionPath.length > 0;
- this.tree = tree;
- this.nodePath = nodePath;
- this.actionPath = actionPath;
- }
-
public abstract T run();
protected SWTBot performMenu() {
@@ -47,20 +35,7 @@
return new SWTBot();
}
- protected SWTBot pepformPopup() {
- assert tree != null : "Tree cannot be null!";
- ContextMenuHelper.prepareTreeItemForContextMenu(tree, tree.expandNode(nodePath));
- UIThreadRunnable.syncExec(new Result<SWTBotMenu>() {
-
- public SWTBotMenu run() {
- SWTBotMenu m = new SWTBotMenu(ContextMenuHelper.getContextMenu(
- tree, actionPath[0], false));
- for (int i = 1; i < actionPath.length; i++) {
- m = m.menu(actionPath[i]);
- }
- return m;
- }
- }).click();
- return new SWTBot();
+ protected String[] getActionPath() {
+ return actionPath;
}
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2011-01-25
13:18:53 UTC (rev 28593)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/actions/NewCDIFileWizard.java 2011-01-25
13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -26,7 +26,7 @@
@Override
public CDIWizard run() {
Wizard w = super.run();
- w.selectTemplate("CDI", type.getAnnotationType());
+ w.selectTemplate("CDI (Context and Dependency Injection)",
type.getAnnotationType());
w.next();
return new CDIWizard(type);
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java 2011-01-25
13:18:53 UTC (rev 28593)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardType.java 2011-01-25
13:28:16 UTC (rev 28594)
@@ -11,8 +11,11 @@
package org.jboss.tools.cdi.bot.test.uiutils.wizards;
public enum CDIWizardType {
- INTERCEPTOR_BINDING, QUALIFIER, SCOPE, STEREOTYPE, DECORATOR, INTERCEPTOR;
+ INTERCEPTOR_BINDING, QUALIFIER, SCOPE, STEREOTYPE,
+ DECORATOR, INTERCEPTOR, BEAN, ANNOTATION_LITERAL,
+ BEANS_XML;
+
String getName() {
switch (this) {
case INTERCEPTOR_BINDING:
@@ -27,13 +30,19 @@
return "Decorator";
case INTERCEPTOR:
return "Interceptor";
+ case BEAN:
+ return "Bean";
+ case ANNOTATION_LITERAL:
+ return "Annotation Literal";
+ case BEANS_XML:
+ return "File beans.xml";
default:
throw new AssertionError("Unknown type");
}
}
public String getAnnotationType() {
- return isAnnotation() ? getName() + " Annotation Type" : getName() + "
Type";
+ return isAnnotation() ? getName() + " Annotation" : getName();
}
private boolean isAnnotation() {
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-01-25
13:18:53 UTC (rev 28593)
+++
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-01-25
13:28:16 UTC (rev 28594)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -67,7 +67,7 @@
t.expand();
// Configure Add CDI Support...
- nodeContextMenu(tree, t, "Configure", "Add CDI
support...").click();
+ nodeContextMenu(tree, t, "Configure", "Add CDI (Context and Dependency
Injection) support...").click();
bot.activeShell().bot().button("OK").click();
util.waitForNonIgnoredJobs();
}