Author: rhopp
Date: 2012-05-21 10:29:39 -0400 (Mon, 21 May 2012)
New Revision: 41213
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/README
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTest.launch
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTestDebug.launch
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/RunTest.launch
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/as7.swtbot.test.properties
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/eap6.swtbot.test.properties
Removed:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/settings.xml
trunk/central/tests/org.jboss.tools.central.test.ui.bot/screenshots/
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
Log:
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/README
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/README
(rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/README 2012-05-21 14:29:39 UTC
(rev 41213)
@@ -0,0 +1,2 @@
+First import Launch configuration (RunTest for running locally via Eclipse. MavenTest for
running with maven(not working right now because of EAP))
+Specify arguments test.configurations.dir and eap.maven.config.file (should be in
/resources/server_properties and /resources/settings.xml)
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTest.launch
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTest.launch
(rev 0)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTest.launch 2012-05-21
14:29:39 UTC (rev 41213)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<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="default"/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry
value="swtbot.properties=/home/rhopp/RedHatStuff/svn/tools1/trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION"
value="false"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1.0"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="/home/rhopp/RedHatStuff/svn/tools1/trunk/central/tests/org.jboss.tools.central.test.ui.bot"/>
+</launchConfiguration>
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTestDebug.launch
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTestDebug.launch
(rev 0)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/MavenTestDebug.launch 2012-05-21
14:29:39 UTC (rev 41213)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<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="default debug"/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry
value="swtbot.properties=/home/rhopp/RedHatStuff/svn/tools1/trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION"
value="false"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1.0"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY"
value="/home/rhopp/RedHatStuff/svn/tools1/trunk/central/tests/org.jboss.tools.central.test.ui.bot"/>
+</launchConfiguration>
Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/RunTest.launch
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/RunTest.launch
(rev 0)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/RunTest.launch 2012-05-21
14:29:39 UTC (rev 41213)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"
standalone="no"?>
+<launchConfiguration
type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location"
value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry
value="/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1.0"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER"
value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR"
value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.central.test.ui.bot.CentralAllBotTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
-consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.central.test.ui.bot"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS"
value="-Dtest.configurations.dir=${project_loc}/resources/server_properties
-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product"
value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Deleted:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties 2012-05-21
14:26:31 UTC (rev 41212)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/as7.swtbot.test.properties 2012-05-21
14:29:39 UTC (rev 41213)
@@ -1 +0,0 @@
-SERVER=AS,7.1,default,${jbosstools.test.jbossas.home}
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/as7.swtbot.test.properties
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/as7.swtbot.test.properties
(rev 0)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/as7.swtbot.test.properties 2012-05-21
14:29:39 UTC (rev 41213)
@@ -0,0 +1 @@
+SERVER=AS,7.1,default,/home/rhopp/Runtimes/jboss-as-7.1.1.Final
\ No newline at end of file
Added:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/eap6.swtbot.test.properties
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/eap6.swtbot.test.properties
(rev 0)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/server_properties/eap6.swtbot.test.properties 2012-05-21
14:29:39 UTC (rev 41213)
@@ -0,0 +1 @@
+SERVER=EAP,6.0,default,/home/rhopp/Runtimes/jboss-eap-6.0-ER6/jboss-eap-6.0
\ No newline at end of file
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/settings.xml
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/settings.xml 2012-05-21
14:26:31 UTC (rev 41212)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/resources/settings.xml 2012-05-21
14:29:39 UTC (rev 41213)
@@ -1,83 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
-<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
-
- <profiles>
+<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <localRepository>${user.home}/.m2/clean-repository</localRepository>
+ <profiles>
- <!-- Configure the JBoss EAP Maven repository -->
- <!-- this is recommend additional repository which comes with JBoss EAP 6 -->
- <profile>
- <id>jboss-eap-maven-repository</id>
- <repositories>
- <repository>
- <id>jboss-eap</id>
-
<url>file:///home/rhopp/repositories/jboss-eap-6.0.0.ER3-maven-repository</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>jboss-eap-maven-plugin-repository</id>
-
<url>file:///home/rhopp/repositories/jboss-eap-6.0.0.ER3-maven-repository</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
+ <!-- Configure the JBoss EAP Maven repository -->
+ <!-- this is recommend additional repository which comes with JBoss EAP
+ 6 -->
+ <profile>
+ <id>jboss-public-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <
url>https://repository.jboss.org/nexus/content/groups/public-jboss/<...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository-group</id>
+ <name>JBoss Public Maven Repository Group</name>
+ <
url>https://repository.jboss.org/nexus/content/groups/public-jboss/<...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
- <profile>
- <id>jboss-wfk-repository</id>
- <repositories>
- <repository>
- <id>jboss-wfk-repository</id>
- <name>JBoss WFK Maven Repository</name>
-
<url>file:///home/rhopp/repositories/jboss-wfk-2.0.0.ER3-maven-repository</url>
- <layout>default</layout>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>jboss-wfk-repository-group</id>
- <name>JBoss WFK Maven Repository</name>
-
<url>file:///home/rhopp/repositories/jboss-wfk-2.0.0.ER3-maven-repository</url>
- <layout>default</layout>
- <releases>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- </profile>
+ <profile>
+ <id>jboss-eap-maven-online-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-eap</id>
+ <
url>http://download.lab.bos.redhat.com/rel-eng/repos/jb-eap-6-rhel-6-b...
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-eap-maven-plugin-repository</id>
+ <
url>http://download.lab.bos.redhat.com/rel-eng/repos/jb-eap-6-rhel-6-b...
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
- </profiles>
+ <profile>
+ <id>jboss-eap-maven-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-eap</id>
+ <url>file:///home/rhopp/repositories/jboss-eap-6.0.0.ER5-maven-repository</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-eap-maven-plugin-repository</id>
+ <url>file:///home/rhopp/repositories/jboss-eap-6.0.0.ER5-maven-repository</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
- <activeProfiles>
- <!-- Optionally, make the repository active by default -->
- <activeProfile>jboss-eap-maven-repository</activeProfile>
- <activeProfile>jboss-wfk-repository</activeProfile>
- </activeProfiles>
+ <profile>
+ <id>jboss-wfk-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-wfk-repository</id>
+ <name>JBoss WFK Maven Repository</name>
+ <url>file:///home/rhopp/repositories/jboss-wfk-2.0.0.ER5-maven-repository</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-wfk-repository-group</id>
+ <name>JBoss WFK Maven Repository</name>
+ <url>file:///home/rhopp/repositories/jboss-wfk-2.0.0.ER5-maven-repository</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>jboss-wfk-online-repository</id>
+ <repositories>
+ <repository>
+ <id>jboss-wfk-repository</id>
+ <name>JBoss WFK Maven Repository</name>
+ <
url>http://maven.repository.redhat.com/jboss-wfk/2.0.0-beta1/maven-rep...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-wfk-repository-group</id>
+ <name>JBoss WFK Maven Repository</name>
+ <
url>http://maven.repository.redhat.com/jboss-wfk/2.0.0-beta1/maven-rep...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <!-- Optionally, make the repository active by default -->
+ <!-- <activeProfile>jboss-public-repository</activeProfile> -->
+<!-- <activeProfile>jboss-eap-maven-repository</activeProfile> -->
+ <activeProfile>jboss-wfk-repository</activeProfile>
+ <activeProfile>jboss-eap-maven-online-repository</activeProfile>
+ <!-- <activeProfile>jboss-wfk-online-repository</activeProfile> -->
+ </activeProfiles>
+
</settings>
\ No newline at end of file
Property changes on: trunk/central/tests/org.jboss.tools.central.test.ui.bot/screenshots
___________________________________________________________________
Modified: svn:ignore
- default -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
Default -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
org.jboss.tools.central.test.ui.bot.CreateProjectsTest.jpeg
Default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
as7.swtbot.test -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
as7.swtbot.test -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
+ default -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
Default -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
org.jboss.tools.central.test.ui.bot.CreateProjectsTest.jpeg
Default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
as7.swtbot.test -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
as7.swtbot.test -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsTest).jpeg
Default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithServerTest).jpeg
Default -
projectExamplesSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithServerTest).jpeg
Default -
canBeDeployedTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithServerTest).jpeg
org.jboss.tools.central.test.ui.bot.CreateProjectsWithServerTest.jpeg
eap6.swtbot.test -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithServerTest).jpeg
default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithoutServerTest).jpeg
Default -
createProjectsSectionTest(org.jboss.tools.central.test.ui.bot.CreateProjectsWithoutServerTest).jpeg
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-05-21
14:26:31 UTC (rev 41212)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-05-21
14:29:39 UTC (rev 41213)
@@ -1,5 +1,11 @@
package org.jboss.tools.central.test.ui.bot;
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.utils.Traverse;
@@ -21,11 +27,11 @@
import org.junit.BeforeClass;
import org.junit.Test;
-@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
+@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.EAP))
public class CreateProjectsWithServerTest extends SWTTestExt{
@BeforeClass
- public static void setup(){
+ public static void setup() throws FileNotFoundException{
bot.menu("Window").menu("Preferences").click();
bot.waitForShell("Preferences");
bot.tree().getTreeItem("Maven").select();
@@ -33,8 +39,58 @@
bot.clickButton("OK");
bot.menu("Help").menu(IDELabel.JBossCentralEditor.JBOSS_CENTRAL).click();
util.waitForAll();
+ if (configuredState.getServer().type.equalsIgnoreCase("EAP")){
+ setupEAP();
+ }
+
}
+ /**
+ * Sets up maven configuration file with configured EAP and WFK repository and clears
~/.m2/clean-repository
+ * Clears ~/.m2/clean-repository if exists
+ * @throws FileNotFoundException
+ */
+ private static void setupEAP() throws FileNotFoundException{
+ log.info("A mame tady EAPcko !!!!!!");
+ String mvnConfigFileName = System.getProperty("eap.maven.config.file");
+ File mvnConfigFile;
+ try {
+ mvnConfigFile = new File(mvnConfigFileName);
+ } catch (NullPointerException e) {
+ throw new NullPointerException("eap.maven.config.file wasn't set");
+ }
+ if (!mvnConfigFile.exists()) throw new FileNotFoundException("File configured in
eap.maven.config.file " +
+ "property does not exist");
+ File mvnLocalRepo = new
File(System.getProperty("user.home")+"/.m2/clean-repository");
+ if (mvnLocalRepo.exists()){
+ deleteDirectory(mvnLocalRepo);
+ }
+ //Now is ~/.m2/clean-repository deleted and settings.xml exists. Next step is to tell
eclipse to use our settings.xml
+ bot.menu("Window").menu("Preferences").click();
+ bot.waitForShell("Preferences");
+ bot.tree().expandNode("Maven").select("User Settings");
+ bot.text(1).setText(mvnConfigFileName);
+ bot.clickButton("Update Settings");
+ util.waitForNonIgnoredJobs();
+ bot.clickButton("Apply");
+ bot.clickButton("OK");
+ util.waitForNonIgnoredJobs();
+ }
+ private static boolean deleteDirectory(File path) {
+ if( path.exists() ) {
+ File[] files = path.listFiles();
+ for(int i=0; i<files.length; i++) {
+ if(files[i].isDirectory()) {
+ deleteDirectory(files[i]);
+ }
+ else {
+ files[i].delete();
+ }
+ }
+ }
+ return( path.delete() );
+ }
+
@After
public void teardown(){
servers.removeAllProjectsFromServer("AS-7.0");
@@ -45,6 +101,11 @@
}
@Test
+ public void dummyTest(){
+
+ }
+
+ @Test
public void createProjectsSectionTest(){
//waitForAWhile();
// SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
@@ -118,11 +179,11 @@
projectExampleShell.close();
//check the rest of project examples
- checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, true);
- checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_PROJECT, true);
- checkExample(null, IDELabel.JBossCentralEditor.HTML5_PROJECT, true);
- checkExample(null, IDELabel.JBossCentralEditor.RICHFACES_PROJECT, true);
- checkExample(null, IDELabel.JBossCentralEditor.SPRING_MVC_PROJECT, false);
+ checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, false);
+// checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_PROJECT, true);
+// checkExample(null, IDELabel.JBossCentralEditor.HTML5_PROJECT, true);
+// checkExample(null, IDELabel.JBossCentralEditor.RICHFACES_PROJECT, true);
+// checkExample(null, IDELabel.JBossCentralEditor.SPRING_MVC_PROJECT, false);
/*checkCreateProject(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT);
checkCreateProject(IDELabel.JBossCentralEditor.JAVA_EE_PROJECT);
@@ -137,7 +198,7 @@
projectExplorer.deleteAllProjects();
}
- @Test
+// @Test
public void projectExamplesSectionTest(){
SWTBotTwistie twistieBot = bot.twistieByLabel("JBoss Quickstarts");
while (!twistieBot.isExpanded()){
@@ -159,8 +220,6 @@
/**
* Tries to deploy all projects
*/
-
- //@Test
public void canBeDeployedTest(){
servers.show();
String serverName = bot.tree().getAllItems()[0].getText().substring(0,
bot.tree().getAllItems()[0].getText().indexOf(' '));
@@ -228,7 +287,16 @@
bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
SWTBotWizard wizard = new
SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
wizard.next();
- if (wizard.canNext()) wizard.next();
+ if (wizard.canNext()){
+ bot.comboBox(2).setSelection(1);
+ try{
+ bot.link();
+ fail("There is something wrong with maven repo. Message:
\n"+bot.link().getText());
+ }catch (WidgetNotFoundException ex){
+ //everything fine
+ }
+ wizard.next();
+ }
wizard.finishWithWait();
String readmeText = bot.checkBox(1).getText();
assertFalse("Quick fix should not be enabled (Everything should be fine)",
bot.checkBox(0).isEnabled());