JBoss Tools SVN: r43169 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-22 10:31:11 -0400 (Wed, 22 Aug 2012)
New Revision: 43169
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:22:28 UTC (rev 43168)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:31:11 UTC (rev 43169)
@@ -50,7 +50,7 @@
e.printStackTrace();
}
robot.keyPress(KeyEvent.VK_RIGHT);
- robot.keyRelease(KeyEvent.VK_ENTER);
+ robot.keyRelease(KeyEvent.VK_RIGHT);
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
//KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT, Keystrokes.CR, Keystrokes.LF);
12 years, 4 months
JBoss Tools SVN: r43168 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-22 10:22:28 -0400 (Wed, 22 Aug 2012)
New Revision: 43168
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:21:05 UTC (rev 43167)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:22:28 UTC (rev 43168)
@@ -36,7 +36,6 @@
}
public void removeAllRuntimes(){
- SWTBotPreferences.TIMEOUT = 20000;
SWTBot bot = SWTBotFactory.getBot();
SWTBotTable table = bot.table();
12 years, 4 months
JBoss Tools SVN: r43166 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-22 10:15:14 -0400 (Wed, 22 Aug 2012)
New Revision: 43166
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:04:00 UTC (rev 43165)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:15:14 UTC (rev 43166)
@@ -36,7 +36,7 @@
}
public void removeAllRuntimes(){
- SWTBotPreferences.TIMEOUT = 10000;
+ SWTBotPreferences.TIMEOUT = 20000;
SWTBot bot = SWTBotFactory.getBot();
SWTBotTable table = bot.table();
12 years, 4 months
JBoss Tools SVN: r43165 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-22 10:04:00 -0400 (Wed, 22 Aug 2012)
New Revision: 43165
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:01:40 UTC (rev 43164)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/SeamPreferencesDialog.java 2012-08-22 14:04:00 UTC (rev 43165)
@@ -9,6 +9,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.jboss.tools.runtime.as.ui.bot.test.entity.Runtime;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
@@ -35,6 +36,7 @@
}
public void removeAllRuntimes(){
+ SWTBotPreferences.TIMEOUT = 10000;
SWTBot bot = SWTBotFactory.getBot();
SWTBotTable table = bot.table();
12 years, 4 months
JBoss Tools SVN: r43164 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-22 10:01:40 -0400 (Wed, 22 Aug 2012)
New Revision: 43164
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
Log:
Added special treatment for Windows.
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-22 13:39:59 UTC (rev 43163)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-22 14:01:40 UTC (rev 43164)
@@ -28,12 +28,18 @@
// for the confirmation dialog select OK (the dialog is native and normal swtbot functions do now work)
try {
Robot robot = new Robot();
- robot.keyPress(KeyEvent.VK_RIGHT);
- robot.keyRelease(KeyEvent.VK_RIGHT);
+ if (!isWindowsOS()){
+ robot.keyPress(KeyEvent.VK_RIGHT);
+ robot.keyRelease(KeyEvent.VK_RIGHT);
+ }
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
} catch (AWTException e) {
throw new IllegalStateException("Cannot create instance of " + Robot.class + " in order to close native dialog", e);
}
}
+
+ private boolean isWindowsOS(){
+ return System.getProperty("os.name").toLowerCase().contains("win");
+ }
}
12 years, 4 months
JBoss Tools SVN: r43163 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2012-08-22 09:39:59 -0400 (Wed, 22 Aug 2012)
New Revision: 43163
Modified:
trunk/build/parent/pom.xml
Log:
* JBIDE-12455
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-08-22 13:23:27 UTC (rev 43162)
+++ trunk/build/parent/pom.xml 2012-08-22 13:39:59 UTC (rev 43163)
@@ -21,6 +21,8 @@
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
<platformSystemProperties></platformSystemProperties>
+ <applejdkProperties></applejdkProperties>
+
<maven.antrun.plugin.version>1.3</maven.antrun.plugin.version>
<swtbot.test.skip>true</swtbot.test.skip>
@@ -81,7 +83,7 @@
<!-- JBIDE-11700, JBIDE-11865: latest stable build of m2e-apt for use with JBDS product builds -->
<m2e-apt>http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/m2e-a...</m2e-apt>
-
+
</properties>
<build>
@@ -180,7 +182,7 @@
<useUIThread>true</useUIThread>
<!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
<!-- tycho.testArgLine repeated to keep jacoco configuration for jacoco-maven-plugin -->
- <argLine>${tycho.testArgLine} ${memoryOptions1} ${memoryOptions2} ${platformSystemProperties} ${systemProperties} -Dusage_reporting_enabled=false -Dorg.jboss.tools.tests.skipPrivateRequirements=${skipPrivateRequirements}</argLine>
+ <argLine>${tycho.testArgLine} ${memoryOptions1} ${memoryOptions2} ${applejdkProperties} ${platformSystemProperties} ${systemProperties} -Dusage_reporting_enabled=false -Dorg.jboss.tools.tests.skipPrivateRequirements=${skipPrivateRequirements}</argLine>
<!-- https://docs.sonatype.org/display/TYCHO/How+to+run+SWTBot+tests+with+Tycho -->
<!-- set useUIThread=true for regular ui tests -->
<!-- set useUIThread=false for swtbot tests -->
@@ -605,32 +607,46 @@
</profile>
<profile>
- <id>osx</id>
+ <!-- JBIDE-12455 -->
+ <id>applejdk</id>
<activation>
- <os>
- <family>mac</family>
- </os>
+ <property>
+ <name>java.vendor.url</name>
+ <value>http://www.apple.com/</value>
+ </property>
</activation>
<properties>
- <!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
- <platformSystemProperties> -d32 -Dosgi.arch=x86 -XstartOnFirstThread </platformSystemProperties>
+ <applejdkProperties> -d32 -Dosgi.arch=x86 </applejdkProperties>
</properties>
- <!-- This is required to have it working by default under mac osx for swtbot tests -->
- <repositories>
- <repository>
- <id>jbosstools-target-site</id>
- <url>${jbosstools-target-site}</url>
+ </profile>
+
+ <profile>
+ <id>osx</id>
+ <activation>
+ <os>
+ <family>mac</family>
+ </os>
+ </activation>
+ <properties>
+ <!-- THE FOLLOWING LINE MUST NOT BE BROKEN BY AUTOFORMATTING -->
+ <platformSystemProperties> -XstartOnFirstThread </platformSystemProperties>
+ </properties>
+ <!-- This is required to have it working by default under mac osx for swtbot tests -->
+ <repositories>
+ <repository>
+ <id>jbosstools-target-site</id>
+ <url>${jbosstools-target-site}</url>
<layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
</repositories>
</profile>
-
+
<profile>
<id>hudson</id>
<activation>
12 years, 4 months
JBoss Tools SVN: r43162 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity.
by jbosstools-commits@lists.jboss.org
Author: psuchy
Date: 2012-08-22 09:23:27 -0400 (Wed, 22 Aug 2012)
New Revision: 43162
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java
Log:
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java 2012-08-22 12:03:14 UTC (rev 43161)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/entity/Runtime.java 2012-08-22 13:23:27 UTC (rev 43162)
@@ -1,5 +1,7 @@
package org.jboss.tools.runtime.as.ui.bot.test.entity;
+import java.io.File;
+
public class Runtime {
private String name;
@@ -8,7 +10,7 @@
private String type;
- private String location;
+ private File location;
public String getName() {
return name;
@@ -34,13 +36,17 @@
this.type = type;
}
- public String getLocation() {
+ public File getLocation() {
return location;
}
- public void setLocation(String location) {
+ public void setLocation(File location) {
this.location = location;
}
+
+ public void setLocation(String location) {
+ this.location = new File(location);
+ }
@Override
public int hashCode() {
12 years, 4 months
JBoss Tools SVN: r43161 - in trunk/central/tests/org.jboss.tools.central.test.ui.bot: src/org/jboss/tools/central/test/ui/bot and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-08-22 08:03:14 -0400 (Wed, 22 Aug 2012)
New Revision: 43161
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java
Log:
Added support for EAP testing.
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-08-22 11:58:59 UTC (rev 43160)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-08-22 12:03:14 UTC (rev 43161)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
+
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools.central</groupId>
@@ -10,16 +11,19 @@
</parent>
<groupId>org.jboss.tools.central.tests</groupId>
<artifactId>org.jboss.tools.central.test.ui.bot</artifactId>
-
+
<packaging>eclipse-test-plugin</packaging>
<properties>
<additionalSystemProperties></additionalSystemProperties>
<jbosstools.test.jbossas.home>${requirementsDirectory}/jboss-as-7.1.1.Final</jbosstools.test.jbossas.home>
- <!-- for debugging ucomment and comment next line <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home} -Dswtbot.test.properties.file=${swtbot.properties}</systemProperties> -->
- <systemProperties>${additionalSystemProperties} -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home} -Dtest.configurations.dir=${test.configurations.dir} -Deap.maven.config.file=${eap.maven.config.file}</systemProperties>
+ <jbosstools.test.eap.6.0.home>${requirementsDirectory}/jboss-eap-6.0</jbosstools.test.eap.6.0.home>
+ <!-- for debugging ucomment and comment next line <systemProperties>-Xdebug
+ -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home}
+ -Dswtbot.test.properties.file=${swtbot.properties}</systemProperties> -->
+ <systemProperties>${additionalSystemProperties} -Djbosstools.test.jbossas.home=${jbosstools.test.jbossas.home} -Djbosstools.test.eap.6.0.home=${jbosstools.test.eap.6.0.home} -Dtest.configurations.dir=${test.configurations.dir} -Deap.maven.config.file=${eap.maven.config.file} -Dorg.jboss.tools.tests.skipPrivateRequirements=${skipPrivateRequirements}</systemProperties>
<surefire.timeout>10800</surefire.timeout>
</properties>
-
+
<profiles>
<profile>
<id>debug</id>
@@ -28,7 +32,7 @@
</properties>
</profile>
</profiles>
-
+
<build>
<plugins>
<plugin>
@@ -57,6 +61,25 @@
</executions>
</plugin>
<plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>maven-download-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install-eap-6.0.0</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>http://download.devel.redhat.com/released/JBEAP-6/6.0.0/zip/jboss-eap-6.0...</url>
+ <md5>ca0e20c5523281233888c296689b7172</md5>
+ <unpack>true</unpack>
+ <skip>${skipPrivateRequirements}</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
@@ -70,11 +93,8 @@
<artifactId>org.jboss.tools.central.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
- <!--<dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.central.discovery.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>-->
+ <!--<dependency> <type>p2-installable-unit</type> <artifactId>org.jboss.tools.central.discovery.feature.feature.group</artifactId>
+ <version>0.0.0</version> </dependency> -->
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.eclipse.mylyn.commons.feature.group</artifactId>
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-08-22 11:58:59 UTC (rev 43160)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-08-22 12:03:14 UTC (rev 43161)
@@ -27,7 +27,7 @@
//TODO When testing new build try it with type=ServerType.EAP !!!!
-@Require(clearProjects=false,server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
+@Require(clearProjects=false,server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.ALL))
public class CreateProjectsWithServerTest extends SWTTestExt{
@BeforeClass
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java 2012-08-22 11:58:59 UTC (rev 43160)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java 2012-08-22 12:03:14 UTC (rev 43161)
@@ -6,7 +6,6 @@
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
12 years, 4 months
JBoss Tools SVN: r43160 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-22 07:58:59 -0400 (Wed, 22 Aug 2012)
New Revision: 43160
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
Log:
Trying to call awt Robot directly
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-22 11:56:52 UTC (rev 43159)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java 2012-08-22 11:58:59 UTC (rev 43160)
@@ -1,7 +1,9 @@
package org.jboss.tools.portlet.ui.bot.task.server;
-import org.eclipse.swtbot.swt.finder.keyboard.KeyboardFactory;
-import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes;
+import java.awt.AWTException;
+import java.awt.Robot;
+import java.awt.event.KeyEvent;
+
import org.jboss.tools.portlet.ui.bot.entity.WorkspaceFile;
import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
import org.jboss.tools.portlet.ui.bot.task.workspace.FileContextMenuSelectingTask;
@@ -24,7 +26,14 @@
public void perform() {
performInnerTask(new FileContextMenuSelectingTask(workspaceFile, "Mark as Deployable"));
// for the confirmation dialog select OK (the dialog is native and normal swtbot functions do now work)
- KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.RIGHT);
- KeyboardFactory.getAWTKeyboard().pressShortcut(Keystrokes.CR, Keystrokes.LF);
+ try {
+ Robot robot = new Robot();
+ robot.keyPress(KeyEvent.VK_RIGHT);
+ robot.keyRelease(KeyEvent.VK_RIGHT);
+ robot.keyPress(KeyEvent.VK_ENTER);
+ robot.keyRelease(KeyEvent.VK_ENTER);
+ } catch (AWTException e) {
+ throw new IllegalStateException("Cannot create instance of " + Robot.class + " in order to close native dialog", e);
+ }
}
}
12 years, 4 months