Author: jjankovi
Date: 2012-02-22 08:31:24 -0500 (Wed, 22 Feb 2012)
New Revision: 38978
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/launchers/WSAllBotTestsMaven.launch
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
Log:
Some fixes and modification f.e. default runtime type is not set to particular type
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/launchers/WSAllBotTestsMaven.launch
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/launchers/WSAllBotTestsMaven.launch 2012-02-22
13:30:10 UTC (rev 38977)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/launchers/WSAllBotTestsMaven.launch 2012-02-22
13:31:24 UTC (rev 38978)
@@ -4,7 +4,7 @@
<stringAttribute key="M2_GOALS" value="clean install"/>
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
<booleanAttribute key="M2_OFFLINE" value="false"/>
-<stringAttribute key="M2_PROFILES" value=""/>
+<stringAttribute key="M2_PROFILES" value="-P default"/>
<listAttribute key="M2_PROPERTIES">
<listEntry value="swtbot.test.skip=false"/>
<listEntry value="swtbot.properties=/home/jjankovi/swtbot.properties"/>
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-02-22 13:30:10 UTC (rev
38977)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/pom.xml 2012-02-22 13:31:24 UTC (rev
38978)
@@ -13,6 +13,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
+ <!-- <systemProperties>-Xdebug
-Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y
-Dswtbot.test.properties.file=${swtbot.properties}</systemProperties> -->
<systemProperties>-Dswtbot.test.properties.file=${swtbot.properties}</systemProperties>
</properties>
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-02-22
13:30:10 UTC (rev 38977)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2012-02-22
13:31:24 UTC (rev 38978)
@@ -11,6 +11,7 @@
package org.jboss.tools.ws.ui.bot.test;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ws.ui.bot.test.annotation.AnnotationPropertiesTest;
import org.jboss.tools.ws.ui.bot.test.rest.completion.RESTfulCompletionTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulSupportTest;
@@ -53,7 +54,7 @@
SampleRESTWebServiceTest.class,
SimpleSoapWebServiceTest.class,
SimpleRESTWebServiceTest.class,
-// AnnotationPropertiesTest.class,
+ AnnotationPropertiesTest.class,
RESTfulSupportTest.class,
RESTfulExplorerTest.class,
RESTfulValidationTest.class,
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-02-22
13:30:10 UTC (rev 38977)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSTestBase.java 2012-02-22
13:31:24 UTC (rev 38978)
@@ -18,7 +18,6 @@
import org.jboss.tools.ui.bot.ext.SWTTestExt;
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.ServerType;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.WsWizardBase.Slider_Level;
import org.jboss.tools.ws.ui.bot.test.utils.DeploymentHelper;
import org.jboss.tools.ws.ui.bot.test.utils.ProjectHelper;
@@ -34,7 +33,8 @@
* @author jjankovi
*
*/
-@Require(server=(a)Server(type=ServerType.EAP), perspective="Java EE")
+//@Require(server=(a)Server(type=ServerType.EAP), perspective="Java EE")
+@Require(server=@Server(), perspective="Java EE")
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({ WSAllBotTests.class })
public class WSTestBase extends SWTTestExt {
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java 2012-02-22
13:30:10 UTC (rev 38977)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/annotation/AnnotationPropertiesTest.java 2012-02-22
13:31:24 UTC (rev 38978)
@@ -11,7 +11,10 @@
package org.jboss.tools.ws.ui.bot.test.annotation;
+import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ws.ui.bot.test.rest.RESTfulTestBase;
+import org.jboss.tools.ws.ui.bot.test.rest.explorer.RESTfulExplorerTest;
+import org.jboss.tools.ws.ui.bot.test.uiutils.views.AnnotationProperties;
import org.junit.Test;
/**
@@ -44,6 +47,17 @@
@Test
public void testAbsenceOfAnnotation() {
+ /*
+ resourceHelper.copyResourceToClass(bot.editorByTitle(getWsName() + ".java"),
+ RESTfulExplorerTest.class.
+ getResourceAsStream(BASIC_WS_RESOURCE),
+ false, getWsPackage(), getWsName());
+
+ SWTJBTExt.selectTextInSourcePane(bot, getWsName() + ".java", getWsName(), 0,
0);
+
+ AnnotationProperties annotProperties = new AnnotationProperties();
+ */
+
}
/**
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java 2012-02-22
13:30:10 UTC (rev 38977)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/views/AnnotationProperties.java 2012-02-22
13:31:24 UTC (rev 38978)
@@ -14,10 +14,6 @@
import java.util.ArrayList;
import java.util.List;
-import javax.jws.WebService;
-
-
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
@@ -26,64 +22,76 @@
/**
*
* @author jjankovi
- *
+ *
*/
-@WebService(targetNamespace =
"http://views.uiutils.test.bot.ui.ws.tools.jboss.org/", portName =
"AnnotationPropertiesPort", serviceName =
"AnnotationPropertiesService")
public class AnnotationProperties extends ViewBase {
public AnnotationProperties() {
viewObject = ActionItem.View.JAXWSAnnotationProperties.LABEL;
}
-
+
public List<SWTBotTreeItem> getAllAnnotations() {
-
+
List<SWTBotTreeItem> annotations = new ArrayList<SWTBotTreeItem>();
SWTBotTree annotationViewTree = null;
- try {
- annotationViewTree = show().bot().tree();
- for (SWTBotTreeItem ti : annotationViewTree.getAllItems()) {
- annotations.add(ti);
- }
- } catch (WidgetNotFoundException exc) {
- log.warn("There are no web service annotations in Annotation Properties
view");
+
+ annotationViewTree = show().bot().tree();
+ for (SWTBotTreeItem ti : annotationViewTree.getAllItems()) {
+ annotations.add(ti);
}
-
+
return annotations;
}
-
+
public List<SWTBotTreeItem> getAnnotationValues(SWTBotTreeItem annotation) {
-
+
List<SWTBotTreeItem> annotValues = new ArrayList<SWTBotTreeItem>();
for (SWTBotTreeItem ti : annotValues) {
annotValues.add(ti);
}
return annotValues;
-
+
}
-
+
+ //!!!not working
public boolean isAnnotationPresence(SWTBotTreeItem annotation) {
return annotation.isChecked();
}
-
+
+ //!!!not working
+ public List<SWTBotTreeItem> getAllActiveAnnotation() {
+
+ List<SWTBotTreeItem> activeAnnotations = new ArrayList<SWTBotTreeItem>();
+ for (SWTBotTreeItem ti : getAllAnnotations()) {
+ if (isAnnotationPresence(ti)) {
+ activeAnnotations.add(ti);
+ }
+ }
+ return activeAnnotations;
+
+ }
+
+ //!!!not working
public SWTBotTreeItem activateAnnotation(SWTBotTreeItem annotation) {
annotation.check();
return annotation;
}
-
+
+ //!!!not working
public SWTBotTreeItem deactivateAnnotation(SWTBotTreeItem annotation) {
annotation.uncheck();
return annotation;
}
-
- public SWTBotTreeItem changeAnnotationParamValue(SWTBotTreeItem annotation, String
param,
- String newValue) {
+
+ public SWTBotTreeItem changeAnnotationParamValue(SWTBotTreeItem annotation,
+ String param, String newValue) {
for (SWTBotTreeItem parameter : getAnnotationValues(annotation)) {
if (parameter.equals(param)) {
- //change value of parameter no newValue
+ // change value of parameter no newValue
break;
}
}
return annotation;
}
-
+
}
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-02-22 13:30:10 UTC (rev
38977)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/todo.txt 2012-02-22 13:31:24 UTC (rev
38978)
@@ -1,3 +1,4 @@
+* Find a way to get to checkbox in Tree/Table which is not in first column
* Fix AnnotationProperties to be able to change Annotation parameter value
* Complete AnnotationPropertiesTest
* Complete multiple tests run (against AS 7 and EAP 5.1)