Author: ljelinko
Date: 2011-11-23 04:41:50 -0500 (Wed, 23 Nov 2011)
New Revision: 36563
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/entity/FacetDefinition.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ProjectFacetsMatcher.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/AbstractFacetTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/FacetsSelectionTask.java
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java
Log:
added facet version selection
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/create/CreateJavaPortletProject.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -60,6 +60,7 @@
private FacetsSelectionTask getSelectFacetsTask() {
FacetsSelectionTask task = new FacetsSelectionTask();
+ task.addFacet(new FacetDefinition("Java", null, "1.6"));
task.addFacet(new FacetDefinition(FACET_NAME, FACET_CATEGORY));
return task;
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/entity/FacetDefinition.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/entity/FacetDefinition.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/entity/FacetDefinition.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -6,6 +6,8 @@
private String name;
+ private String version;
+
public FacetDefinition(String name) {
super();
this.name = name;
@@ -16,6 +18,13 @@
this.category = category;
this.name = name;
}
+
+ public FacetDefinition(String name, String category, String version) {
+ super();
+ this.category = category;
+ this.name = name;
+ this.version = version;
+ }
public String getCategory() {
return category;
@@ -32,4 +41,12 @@
public void setName(String name) {
this.name = name;
}
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
}
\ No newline at end of file
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ProjectFacetsMatcher.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ProjectFacetsMatcher.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/matcher/workspace/ProjectFacetsMatcher.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -59,7 +59,7 @@
private boolean allChecked = true;
@Override
- protected void processFacet(SWTBotTreeItem facetItem) {
+ protected void processFacet(FacetDefinition facet, SWTBotTreeItem facetItem) {
allChecked = allChecked && facetItem.isChecked();
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/AbstractFacetTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/AbstractFacetTask.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/AbstractFacetTask.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -28,13 +28,13 @@
facets = new ArrayList<FacetDefinition>();
}
- protected abstract void processFacet(SWTBotTreeItem facetItem);
+ protected abstract void processFacet(FacetDefinition facet, SWTBotTreeItem
facetTreewItem);
@Override
public void perform() {
SWTBotTree tree = getTree();
for (FacetDefinition facet : facets){
- processFacet(getTreeItem(tree, facet));
+ processFacet(facet, getTreeItem(tree, facet));
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/FacetsSelectionTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/FacetsSelectionTask.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/facet/FacetsSelectionTask.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -1,9 +1,11 @@
package org.jboss.tools.portlet.ui.bot.test.task.facet;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.portlet.ui.bot.test.entity.FacetDefinition;
/**
- * Selects the given facets in the Project facetss tree.
+ * Selects the given facets in the Project facetss tree and optionaly also its version.
*
* @author ljelinko
*
@@ -11,7 +13,16 @@
public class FacetsSelectionTask extends AbstractFacetTask {
@Override
- protected void processFacet(SWTBotTreeItem facetItem) {
- facetItem.check();
+ protected void processFacet(FacetDefinition facet, SWTBotTreeItem facetTreeItem) {
+ facetTreeItem.check();
+
+ if (facet.getVersion() != null){
+ SWTBotMenu menu = facetTreeItem.contextMenu("Change Version...");
+ menu.click();
+
+ getBot().shell("Change Version").activate();
+ getBot().comboBoxWithLabel("Version:").setSelection(facet.getVersion());
+ getBot().button("OK").click();
+ }
}
}
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java
===================================================================
---
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java 2011-11-23
09:22:17 UTC (rev 36562)
+++
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/test/task/server/RunninngProjectOnServerTask.java 2011-11-23
09:41:50 UTC (rev 36563)
@@ -2,10 +2,6 @@
import org.jboss.tools.portlet.ui.bot.test.task.AbstractSWTTask;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
/**
* Performs Run on Server on the specified project.
Show replies by date