JBoss Tools SVN: r27458 - in trunk/seam/tests/org.jboss.tools.seam.ui.bot.test: META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dpospisi(a)redhat.com
Date: 2010-12-14 11:54:27 -0500 (Tue, 14 Dec 2010)
New Revision: 27458
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/ReverseEngineering.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java
Removed:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamRuntimes.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateServerRuntimes.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/.classpath
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/resources/jbossEAPRuntime.properties
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateConversations.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateEntities.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/DeleteSeamProjects.java
Log:
Updated Seam bot tests.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/.classpath 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/.classpath 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,8 +1,8 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="resources"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/META-INF/MANIFEST.MF 2010-12-14 16:54:27 UTC (rev 27458)
@@ -11,10 +11,10 @@
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
- org.junit4;bundle-version="4.5.0",
+ org.junit4;bundle-version="4.8.1",
org.eclipse.datatools.connectivity;bundle-version="1.1.2",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0"
Eclipse-RegisterBuddy: org.apache.log4j
Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/resources/jbossEAPRuntime.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/resources/jbossEAPRuntime.properties 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/resources/jbossEAPRuntime.properties 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,5 +1,6 @@
runtimeGroup=JBoss Enterprise Middleware
-runtimeItem=JBoss Enterprise Application Platform 4.3
+runtimeItem=JBoss Enterprise Application Platform 5.0
runtimeName=jboss-eap Runtime
runtimePath=${jbosstools.test.jboss.home}
-serverName=jboss-eap
\ No newline at end of file
+serverName=jboss-eap
+javaHome=${jbosstools.test.java.home}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,33 +1,51 @@
package org.jboss.tools.seam.ui.bot.test;
-import org.jboss.tools.seam.ui.bot.test.create.CreateSeamRuntimes;
-import org.jboss.tools.seam.ui.bot.test.create.CreateSeamProjects;
-import org.jboss.tools.seam.ui.bot.test.create.CreateForms;
import org.jboss.tools.seam.ui.bot.test.create.CreateActions;
import org.jboss.tools.seam.ui.bot.test.create.CreateConversations;
import org.jboss.tools.seam.ui.bot.test.create.CreateEntities;
-import org.jboss.tools.seam.ui.bot.test.create.CreateServerRuntimes;
+import org.jboss.tools.seam.ui.bot.test.create.CreateSeamProjects;
+import org.jboss.tools.seam.ui.bot.test.create.CreateForms;
+import org.jboss.tools.seam.ui.bot.test.create.DeleteSeamProjects;
+import org.jboss.tools.seam.ui.bot.test.misc.GotoComponent;
+import org.jboss.tools.seam.ui.bot.test.misc.ReverseEngineering;
+import org.jboss.tools.seam.ui.bot.test.validate.ComponentsValidator;
+import org.jboss.tools.seam.ui.bot.test.validate.ELExprValidator;
+import org.junit.experimental.categories.Categories.ExcludeCategory;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
-
-
/**
*
* This is a swtbot testcase for an eclipse application.
*
*/
+
+(a)RunWith(RequirementAwareSuite.class)
+(a)ExcludeCategory(WARTests.class)
+(a)Suite.SuiteClasses({
+ //CreateServerRuntimes.class,
+ //CreateSeamRuntimes.class,
+ CreateSeamProjects.class,
+ //ReverseEngineering.class,
+ //ComponentsValidator.class,
+ //ELExprValidator.class,
+ CreateForms.class,
+ CreateActions.class,
+ CreateConversations.class,
+ CreateEntities.class,
+ GotoComponent.class,
+ DeleteSeamProjects.class
+ })
public class SeamAllBotTests {
- public static Test suite(){
- TestSuite suite = new TestSuite("Seam tests");
- suite.addTestSuite(CreateServerRuntimes.class);
- suite.addTestSuite(CreateSeamRuntimes.class);
- suite.addTestSuite(CreateSeamProjects.class);
- suite.addTestSuite(CreateForms.class);
- suite.addTestSuite(CreateActions.class);
- suite.addTestSuite(CreateConversations.class);
- suite.addTestSuite(CreateEntities.class);
- return suite;
- }
+
+ /*
+ @Parameters
+ public static List<Properties[]> data() {
+ return TestControl.getParameters();
+
+ }
+ */
+
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -3,7 +3,9 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.util.List;
import java.util.Properties;
+import java.util.Vector;
import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.swtbot.swt.finder.SWTBot;
@@ -29,14 +31,16 @@
protected static Properties seam2fpSettings;
protected static Properties seam22Settings;
+ protected static List<Properties[]> parameters = new Vector<Properties[]>();
+
+ protected SWTUtilExt util = new SWTUtilExt(bot);
+
private static final String PROJECT_PROPERTIES = "projectProperties.properties";
private static final String EAP_RUNTIME = "jbossEAPRuntime.properties";
private static final String SEAM_SET_12 = "seam12Settings.properties";
private static final String SEAM_SET_2FP = "seam2fpSettings.properties";
private static final String SEAM_SET_22 = "seam22Settings.properties";
- protected static final String VALIDATION = "Validation";
- protected static final String DEPLOY_SOURCE = "Deploying datasource to server";
- protected static final String REG_IN_SERVER = "Register in server";
+
public static String JBOSS_EAP_HOME;
public static String SEAM_12_SETTINGS_HOME;
@@ -106,6 +110,11 @@
SEAM_22_SETTINGS_HOME = seam22Settings.getProperty("seamRuntimePath");
SEAM_2FP_SETTINGS_HOME = seam2fpSettings.getProperty("seamRuntimePath");
createConnectionProfile(seam22Settings.getProperty("seamRuntimePath"),"DefaultDS");
+
+ //parameters.add(new Properties[] {seam12Settings});
+ parameters.add(new Properties[] {seam22Settings});
+ //parameters.add(new Properties[] {seam2fpSettings});
+
}
/*Pre-launch operations here:*/
@@ -134,45 +143,7 @@
public static String TYPE_WAR = "WAR";
public static String TYPE_EAR = "EAR";
-/**Creates any Server Runtime + Server. */
- protected void createServerRuntime(Properties serverType){
-
- if (!SWTJBTExt.isServerRuntimeDefined(bot,serverType.getProperty("runtimeName"))){
- bot.menu("File").menu("New").menu("Other...").click();
- bot.shell(IDELabel.Shell.NEW).activate();
- SWTBotTree tree = bot.tree();
- delay();
- tree.expandNode("Server").select("Server");
- bot.button("Next >").click();
- SWTBotTree tree2 = bot.tree();
- tree2.expandNode(serverType.getProperty("runtimeGroup")).select(serverType.getProperty("runtimeItem"));
- bot.textWithLabel("Server name:").setText(serverType.getProperty("serverName"));
- bot.button("Next >").click();
- bot.textWithLabel("Name").setText(serverType.getProperty("runtimeName"));
- bot.textWithLabel("Home Directory").setText(serverType.getProperty("runtimePath"));
- bot.button("Finish").click();
- }
-
- }
-/** Creates any Seam runtime. */
- protected void createSeamRuntime(Properties runtimeSet, String homeFolder){
- bot.menu("Window").menu("Preferences").click();
- bot.shell(IDELabel.Shell.PREFERENCES).activate();
- SWTBotTree tree = bot.tree();
- delay();
- tree.expandNode("JBoss Tools")
- .expandNode("Web")
- .expandNode("Seam")
- .select();
-
- bot.button("Add").click();
- bot.textWithLabel("Home Folder:").setText(homeFolder);
- bot.textWithLabel("Name:").setText(runtimeSet.getProperty("seamRuntimeName"));
- bot.button("Finish").click();
- bot.button("OK").click();
- }
-
/**Creates any Seam project. */
protected void createSeamProject(Properties runtimeSet, Properties serverType,
String type ){
@@ -191,20 +162,6 @@
bot.button("Finish").click();
}
-/**Creates any Seam Action, Form etc. */
- protected void createSeamUnit(String unitType,
- Properties runtimeSet, String type){
- bot.menu("File").menu("New").menu("Seam " +unitType).click();
- SWTBotShell shell = bot.activeShell();
- bot.textWithLabel("Seam Project:").setText(runtimeSet.getProperty("testProjectName")+ type);
- if ("Entity".equals(unitType)) {
- bot.textWithLabel("Seam entity class name:").setText("seam"+unitType);
- } else {
- bot.textWithLabel("Seam component name:").setText("seam"+unitType);
- }
- bot.button("Finish").click();
- bot.waitUntil(Conditions.shellCloses(shell),15000);
- }
/**Deletes any Seam project. */
protected void deleteSeamProject(Properties runtimeSet, String type){
@@ -233,6 +190,18 @@
}
}
+ public static List<Properties[]> getParameters() {
+ return parameters;
+ }
+
+ public static Properties getJbossEAPRuntime() {
+ return jbossEAPRuntime;
+ }
+
+ public static Properties getProjectProperties() {
+ return projectProperties;
+ }
+
/**
* Creates connection profile in case it's not defined yet
* @param pathToSeamRuntime
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,33 +1,44 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import java.util.Properties;
+
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class CreateActions extends TestControl{
+public class CreateActions extends AbstractSeamTestBase {
private static String TEST_TYPE = "Action";
- public void testCreateActionFor12war(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_WAR);
- }
+ public CreateActions() {
+ }
- public void testCreateActionFor12ear(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_EAR);
+ @Test
+ @Category(WARTests.class)
+ public void testCreateActionForWar(){
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
- public void testCreateActionFor2fpwar(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_WAR);
+ @Test
+ @Category(WARTests.class)
+ public void checkCreateActionForWar(){
+ checkSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
- public void testCreateActionFor2fpear(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_EAR);
+ @Test
+ @Category(EARTests.class)
+ public void testCreateActionForEar(){
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
-
- public void testCreateActionFor22war(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_WAR);
- }
- public void testCreateActionFor22ear(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_EAR);
+ @Test
+ @Category(EARTests.class)
+ public void checkCreateActionForEar(){
+ checkSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
+
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateConversations.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateConversations.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateConversations.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,33 +1,31 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import java.util.Properties;
+
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class CreateConversations extends TestControl{
-
+public class CreateConversations extends AbstractSeamTestBase {
+
private static String TEST_TYPE = "Conversation";
-
- public void testCreateConversationFor12war(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_WAR);
+
+ public CreateConversations() {
}
-
- public void testCreateConversationFor12ear(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_EAR);
- }
- public void testCreateConversationFor2fpwar(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_WAR);
+ @Test
+ @Category(WARTests.class)
+ public void testCreateConversationFor12war() {
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
-
- public void testCreateConversationFor2fpear(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_EAR);
- }
-
- public void testCreateConversationFor22war(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_WAR);
- }
- public void testCreateConversationFor22ear(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_EAR);
+ @Test
+ @Category(EARTests.class)
+ public void testCreateConversationFor12ear() {
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
+
}
-
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateEntities.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateEntities.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateEntities.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,34 +1,33 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import java.util.Properties;
+
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class CreateEntities extends TestControl{
+public class CreateEntities extends AbstractSeamTestBase {
private static String TEST_TYPE = "Entity";
+ public CreateEntities() {
+ }
+
+ @Test
+ @Category(WARTests.class)
public void testCreateEntityFor12war(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_WAR);
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
+ @Test
+ @Category(EARTests.class)
public void testCreateEntityFor12ear(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_EAR);
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
- public void testCreateEntityFor2fpwar(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_WAR);
- }
- public void testCreateEntityFor2fpear(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_EAR);
- }
-
- public void testCreateEntityFor22war(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_WAR);
- }
-
- public void testCreateEntityFor22ear(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_EAR);
- }
-
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,33 +1,44 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import java.util.Properties;
+
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class CreateForms extends TestControl{
+public class CreateForms extends AbstractSeamTestBase {
private static String TEST_TYPE = "Form";
- public void testCreateFormFor12war(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_WAR);
- }
+ public CreateForms() {
+ }
- public void testCreateFormFor12ear(){
- createSeamUnit(TEST_TYPE, seam12Settings, TYPE_EAR);
+ @Test
+ @Category(WARTests.class)
+ public void testCreateFormForWar(){
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
-
- public void testCreateFormFor2fpwar(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_WAR);
- }
- public void testCreateFormFor2fpear(){
- createSeamUnit(TEST_TYPE, seam2fpSettings, TYPE_EAR);
+ @Test
+ @Category(WARTests.class)
+ public void checkCreateFormForWar(){
+ checkSeamUnit(TEST_TYPE, TestControl.TYPE_WAR);
}
- public void testCreateFormFor22war(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_WAR);
+ @Test
+ @Category(EARTests.class)
+ public void testCreateFormForEar(){
+ createSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
- public void testCreateFormFor22ear(){
- createSeamUnit(TEST_TYPE, seam22Settings, TYPE_EAR);
+ @Test
+ @Category(EARTests.class)
+ public void checkCreateFormForEar(){
+ checkSeamUnit(TEST_TYPE, TestControl.TYPE_EAR);
}
+
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,71 +1,116 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+
+import java.util.Properties;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
+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.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
+import org.jboss.tools.ui.bot.test.SWTJBTBot;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class CreateSeamProjects extends TestControl{
+
+//@SWTBotTestRequires(server=(a)Server(state=ServerState.NotRunning),perspective="Seam",seam=@Seam())
+@SWTBotTestRequires(server=@Server,perspective="Seam",seam=@Seam(),db=@DB)
+public class CreateSeamProjects extends AbstractSeamTestBase {
- private SWTJBTExt swtJbtExt = new SWTJBTExt(bot);
+ protected static final String VALIDATION = "Validation";
+ protected static final String DEPLOY_SOURCE = "Deploying datasource to server";
+ protected static final String REG_IN_SERVER = "Register in server";
+ protected static final String CONN_PROFILE = "hsqldb18_internal";
- public void testCreateSeamProject12war(){
- createSeamProject(seam12Settings, jbossEAPRuntime, TYPE_WAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam12Settings.getProperty("testProjectName")
- +TYPE_WAR, DEPLOY_SOURCE, REG_IN_SERVER);
- //TODO: This is eclipse bug already fixed in newer versions of Elipse so this should be removed
- // when JBDS will use never version of Eclipse
- Throwable exception = getException();
- if (exception != null
- && exception instanceof NullPointerException
- && exception.getStackTrace().length > 0
- && exception.getStackTrace()[0].getClassName().equals("org.eclipse.wst.server.core.internal.Server")
- && exception.getStackTrace()[0].getLineNumber() == 783){
- // Reset returned exception
- setException(null);
- }
- swtJbtExt.removeSeamProjectFromServers(seam12Settings.getProperty("testProjectName"));
+
+ public CreateSeamProjects() {
}
+
+ private SWTJBTExt swtJbtExt = new SWTJBTExt(bot);
- public void testCreateSeamProject12ear(){
- createSeamProject(seam12Settings, jbossEAPRuntime, TYPE_EAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam12Settings.getProperty("testProjectName")
- +TYPE_EAR, DEPLOY_SOURCE, REG_IN_SERVER);
- swtJbtExt.removeSeamProjectFromServers(seam12Settings.getProperty("testProjectName"));
+ @Test
+ @Category(WARTests.class)
+ public void testCreateSeamProjectWar(){
+ createSeamProject(TestControl.TYPE_WAR);
+ util.waitForNonIgnoredJobs();
}
+
+ @Test
+ @Category(WARTests.class)
+ public void testCheckSeamProjectWar(){
+ checkSeamProject(TestControl.TYPE_WAR);
+ }
- public void testCreateSeamProject2fpwar(){
- createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_WAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam2fpSettings.getProperty("testProjectName")
- +TYPE_WAR, DEPLOY_SOURCE, REG_IN_SERVER);
- swtJbtExt.removeSeamProjectFromServers(seam2fpSettings.getProperty("testProjectName"));
+ @Test
+ @Category(EARTests.class)
+ public void testCreateSeamProjectEar(){
+ createSeamProject(TestControl.TYPE_EAR);
+ util.waitForNonIgnoredJobs();
}
+
+ @Test
+ @Category(EARTests.class)
+ public void testCheckSeamProjectEar(){
+ checkSeamProject(TestControl.TYPE_EAR);
+ }
+
- public void testCreateSeamProject2fpear(){
- createSeamProject(seam2fpSettings, jbossEAPRuntime, TYPE_EAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam2fpSettings.getProperty("testProjectName")
- +TYPE_EAR, DEPLOY_SOURCE, REG_IN_SERVER);
- swtJbtExt.removeSeamProjectFromServers(seam2fpSettings.getProperty("testProjectName"));
+ protected void createSeamProject(String type) {
+ SWTJBTBot bot = new SWTJBTBot();
+ bot.menu("File").menu("New").menu("Seam Web Project").click();
+ bot.textWithLabel("Project name:").setText(AbstractSeamTestBase.testProjectName + type);
+ bot.comboBoxInGroup("Target runtime").setSelection(SWTTestExt.configuredState.getServer().name);
+ bot.comboBoxInGroup("Target Server").setSelection(SWTTestExt.configuredState.getServer().name);
+ bot.comboBoxInGroup("Configuration").setSelection(
+ AbstractSeamTestBase.seamConfigPrefix +
+ SWTTestExt.configuredState.getSeam().version);
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.button("Next >").click();
+ bot.comboBoxWithLabel("Seam Runtime:").setSelection(SWTTestExt.configuredState.getSeam().name);
+ bot.radio(type).click();
+ bot.comboBoxWithLabel("Connection profile:").setSelection(CONN_PROFILE);
+
+ SWTBotShell seamPrjShell = bot.activeShell();
+ bot.button("Finish").click();
+ bot.waitUntil(shellCloses(seamPrjShell), 480000);
+ log.info("Seam shell closed.");
+ bot.shells()[0].activate();
+
}
- public void testCreateSeamProject22war(){
- createSeamProject(seam22Settings, jbossEAPRuntime, TYPE_WAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam22Settings.getProperty("testProjectName")
- +TYPE_WAR, DEPLOY_SOURCE, REG_IN_SERVER);
- swtJbtExt.removeSeamProjectFromServers(seam22Settings.getProperty("testProjectName"));
+ protected void checkSeamProject(String type) {
+
+ problems.show();
+ SWTBotTreeItem[] errors = ProblemsView.getFilteredErrorsTreeItems(bot, null, null, null, null);
+ assertNull("Errors in problem view.", errors);
+
+ open.viewOpen(ActionItem.View.GeneralInternalWebBrowser.LABEL);
+
+ bot.sleep(20000);
+ SWTBotBrowserExt bBrowser = bot.browserExt();
+ bBrowser.goURL("http://localhost:8080/" + AbstractSeamTestBase.testProjectName + type + "/home.seam");
+ util.waitForBrowserLoadsPage(bBrowser);
+ assertContains("Welcome to Seam", bBrowser.getText());
}
-
- public void testCreateSeamProject22ear(){
- createSeamProject(seam22Settings, jbossEAPRuntime, TYPE_EAR);
- waitForBlockingJobsAcomplished(240000, BUILDING_WS, VALIDATION +
- " " + seam22Settings.getProperty("testProjectName")
- +TYPE_EAR, DEPLOY_SOURCE, REG_IN_SERVER);
- swtJbtExt.removeSeamProjectFromServers(seam22Settings.getProperty("testProjectName"));
- new SWTUtilExt(bot).waitForAll(60 * 1000L);
- }
-
+
}
\ No newline at end of file
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamRuntimes.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamRuntimes.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamRuntimes.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,18 +0,0 @@
-package org.jboss.tools.seam.ui.bot.test.create;
-
-import org.jboss.tools.seam.ui.bot.test.TestControl;
-
-public class CreateSeamRuntimes extends TestControl{
-
- public void testCreateSeamRuntime12(){
- createSeamRuntime(seam12Settings, SEAM_12_SETTINGS_HOME);
- }
-
- public void testCreateSeamRuntime2fp(){
- createSeamRuntime(seam2fpSettings, SEAM_2FP_SETTINGS_HOME);
- }
-
- public void testCreateSeamRuntime22(){
- createSeamRuntime(seam22Settings, SEAM_22_SETTINGS_HOME);
- }
-}
Deleted: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateServerRuntimes.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateServerRuntimes.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateServerRuntimes.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,10 +0,0 @@
-package org.jboss.tools.seam.ui.bot.test.create;
-
-import org.jboss.tools.seam.ui.bot.test.TestControl;
-
-public class CreateServerRuntimes extends TestControl{
-
- public void testCreateEAPServerRuntime(){
- createServerRuntime(jbossEAPRuntime);
- }
-}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/DeleteSeamProjects.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/DeleteSeamProjects.java 2010-12-14 16:43:23 UTC (rev 27457)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/DeleteSeamProjects.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -1,32 +1,43 @@
package org.jboss.tools.seam.ui.bot.test.create;
+import java.util.Properties;
+
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.test.SWTJBTBot;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-public class DeleteSeamProjects extends TestControl{
+public class DeleteSeamProjects extends AbstractSeamTestBase {
+
+ protected static final String VALIDATION = "Validation";
+ protected static final String DEPLOY_SOURCE = "Deploying datasource to server";
+ protected static final String REG_IN_SERVER = "Register in server";
-/*
- public void testDeleteSeamProject12war(){
- deleteSeamProject(seam12Settings, TYPE_WAR);
+ public DeleteSeamProjects() {
}
+
+ private SWTJBTExt swtJbtExt = new SWTJBTExt(bot);
- public void testDeleteSeamProject12ear(){
- deleteSeamProject(seam12Settings, TYPE_EAR);
+ @Test
+ @Category(WARTests.class)
+ public void testDeleteSeamProjectWar(){
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_WAR);
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_WAR + "-test");
}
- public void testDeleteSeamProject2fpwar(){
- deleteSeamProject(seam2fpSettings, TYPE_WAR);
+ @Test
+ @Category(EARTests.class)
+ public void testDeleteSeamProjectEar(){
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_EAR);
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_EAR + "-ear");
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_EAR + "-ejb");
+ swtJbtExt.deleteProject(testProjectName + TestControl.TYPE_EAR + "-test");
}
-
- public void testDeleteSeamProject2fpear(){
- deleteSeamProject(seam2fpSettings, TYPE_EAR);
- }
-
- public void testDeleteSeamProject21war(){
- deleteSeamProject(seam21Settings, TYPE_WAR);
- }
-
- public void testDeleteSeamProject21ear(){
- deleteSeamProject(seam21Settings, TYPE_EAR);
- }*/
-}
+
+}
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -0,0 +1,45 @@
+package org.jboss.tools.seam.ui.bot.test.misc;
+
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
+import org.eclipse.ui.part.EditorActionBarContributor;
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
+import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.jboss.tools.ui.bot.test.SWTJBTBot;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+
+public class GotoComponent {
+
+ @Test
+ @Category(WARTests.class)
+ public void testGotoComponentWar() {
+ testGotoComponent(TestControl.TYPE_WAR);
+ }
+
+ @Test
+ @Category(EARTests.class)
+ public void testGotoComponentEar() {
+ testGotoComponent(TestControl.TYPE_EAR);
+ }
+
+ private void testGotoComponent(String type) {
+ SWTJBTBot bot = new SWTJBTBot();
+ bot.menu("Navigate").menu("Open Seam Component").click();
+ bot.text().setText("authenticator");
+ SWTBotTableItem tabItem = bot.table().getTableItem("authenticator - " + AbstractSeamTestBase.testProjectName + type +
+ ((type == TestControl.TYPE_EAR) ? "-ejb" : ""));
+ tabItem.select();
+ bot.button("OK").click();
+
+ SWTBotEditor editor = bot.activeEditor();
+ assertTrue("Authenticator component not activated.", editor.getTitle().equals("Authenticator.java"));
+ editor.close();
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/ReverseEngineering.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/ReverseEngineering.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/ReverseEngineering.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -0,0 +1,80 @@
+package org.jboss.tools.seam.ui.bot.test.misc;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
+import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
+import org.jboss.tools.ui.bot.test.SWTJBTBot;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+public class ReverseEngineering extends AbstractSeamTestBase {
+
+ private static final String[] ENTITIES = new String[] {
+ "Customers", "Employees", "Offices", "Orderdetails", "Orders", "Payments", "Productlines", "Products"
+ };
+
+ @Test
+ @Category(WARTests.class)
+ public void testRevEngFromDBWar() {
+ testRevEngFromDB(TestControl.TYPE_WAR);
+ }
+
+ @Test
+ @Category(EARTests.class)
+ public void testRevEngFromDBEar() {
+ testRevEngFromDB(TestControl.TYPE_EAR);
+ }
+
+ private void testRevEngFromDB(String type) {
+
+ // launch reveng
+
+ SWTJBTBot bot = new SWTJBTBot();
+ bot.menu("New").menu("Seam Generate Entities").click();
+ bot.text().setText(AbstractSeamTestBase.testProjectName + type);
+ bot.radio("Reverse engineer from database").click();
+ bot.button("Next >").click();
+ bot.button("Refresh").click();
+
+ SWTBotTree schemaTree = bot.tree();
+ schemaTree.select("<Default caalog>", "PUBLIC");
+
+ bot.button("Include...").click();
+ bot.button("Finish").click();
+
+ // wait for reveng to complete
+ SWTTestExt.util.waitForNonIgnoredJobs(60000);
+
+ // check that the entities are present
+ projectExplorer.show();
+ String[] path;
+ if (type == TestControl.TYPE_EAR)
+ path = new String[] {testProjectName + type + "-ejb",
+ "ejbModule", "org.domain.seamprjear.entity"};
+ else
+ path = new String[] {testProjectName + type,
+ "src", "main", "org", "domain", "seamprjwar", "session"};
+
+ for (String entity: ENTITIES) {
+ projectExplorer.selectTreeItem(entity + ".java", path);
+ }
+
+ // check that associated web pages are present
+ path = new String[] {testProjectName + type , "Web Resources : WebContent"};
+ for (String entity: ENTITIES) {
+ projectExplorer.selectTreeItem(entity + ".page.xml", path);
+ projectExplorer.selectTreeItem(entity + ".xhtml", path);
+ projectExplorer.selectTreeItem(entity + "Edit.page.xml", path);
+ projectExplorer.selectTreeItem(entity + "Edit.xhtml", path);
+ projectExplorer.selectTreeItem(entity + "List.page.xml", path);
+ projectExplorer.selectTreeItem(entity + "List.xhtml", path);
+ }
+
+ }
+
+
+}
Added: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java 2010-12-14 16:54:27 UTC (rev 27458)
@@ -0,0 +1,96 @@
+package org.jboss.tools.seam.ui.bot.test.validate;
+
+import java.util.Properties;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
+import org.jboss.tools.seam.ui.bot.test.EARTests;
+import org.jboss.tools.seam.ui.bot.test.TestControl;
+import org.jboss.tools.seam.ui.bot.test.WARTests;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.view.ProblemsView;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+public class ComponentsValidator extends AbstractSeamTestBase {
+
+ public static String NL = System.getProperty("line.separator");
+
+ public ComponentsValidator() {
+ }
+
+ @Test
+ @Category(WARTests.class)
+ public void testAddComponentPropertyWar() {
+ testAddComponentProperty(TestControl.TYPE_WAR);
+
+ }
+
+ @Test
+ @Category(EARTests.class)
+ public void testAddComponentPropertyEar() {
+ testAddComponentProperty(TestControl.TYPE_EAR);
+ }
+
+ private void testAddComponentProperty(String type) {
+ // open components.xml
+ SWTBotEclipseEditor cEditor = projectExplorer.openFile(testProjectName + type,
+ "Web Resources : WebContent", "WEB-INF", "components.xml").toTextEditor();
+
+
+ // add non-existing property
+ int idx = 0;
+ for(String line : cEditor.getLines()) {
+ if (line.contains("</components")) {
+ cEditor.insertText(idx, 0, "<component name=\"authenticator\">" + NL);
+ cEditor.insertText(idx + 1, 0, "<property name=\"foo\">TEST</property>" + NL);
+ cEditor.insertText(idx + 2, 0, "</component>" + NL);
+ }
+ idx++;
+ }
+ cEditor.save();
+ SWTTestExt.util.waitForNonIgnoredJobs(60000);
+
+ // check that Seam Problem exists
+ SWTBotView pBotView = problems.show();
+ SWTBotTreeItem[] sProblems = problems.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
+ "/" + testProjectName, "components.xml", "Seam Problem");
+ assertTrue("No Seam problem found.", ( (sProblems != null) && (sProblems.length > 0) ));
+ assertTrue("More than one Seam problem found.", sProblems.length <= 1);
+
+ // add property
+
+ SWTBotEclipseEditor aEditor;
+ if (type == TestControl.TYPE_EAR)
+ aEditor = projectExplorer.openFile(testProjectName + type + "-ejb",
+ "ejbModule", "org.domain.seamprjear.session", "Authenticator.java").toTextEditor();
+ else
+ aEditor = projectExplorer.openFile(testProjectName + type,
+ "src", "hot", "org", "domain", "seamprjwar", "session", "Authenticator.java").toTextEditor();
+
+ idx = 0;
+ for(String line : aEditor.getLines()) {
+ if (line.contains("public boolean authenticate()")) {
+ aEditor.insertText(idx, 0, "public String foo; \n");
+ break;
+ }
+ idx++;
+ }
+ aEditor.save();
+ SWTTestExt.util.waitForNonIgnoredJobs(60000);
+
+ // check that Seam Problem disappeared
+ problems.show();
+ sProblems = problems.getFilteredErrorsTreeItems(bot, "does not have a setter or a field",
+ "/" + testProjectName, "components.xml", "Seam Problem");
+ assertTrue("Seam problem still exists.", sProblems == null);
+
+ cEditor.close();
+ aEditor.close();
+
+ }
+
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ComponentsValidator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 1 month
JBoss Tools SVN: r27457 - trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-14 11:43:23 -0500 (Tue, 14 Dec 2010)
New Revision: 27457
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
Log:
jbide-7754 - big ups to snjezana, now awaits full model load
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2010-12-14 16:05:39 UTC (rev 27456)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSELaunchDelegate.java 2010-12-14 16:43:23 UTC (rev 27457)
@@ -173,6 +173,7 @@
public void shellOutputChanged(IHostShellChangeEvent event) {
IHostOutput[] out = event.getLines();
for(int i = 0; i < out.length; i++ ) {
+ System.out.println(out[i]);
if( saving[0] ) {
output[0] = out[i].getString();
saving[0] = false;
@@ -313,6 +314,7 @@
}
protected static IShellService findShellService(JBossServerBehavior behaviour) throws CoreException {
+ RSEUtils.waitForFullInit();
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
IHost host = RSEUtils.findHost(connectionName);
if( host == null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-12-14 16:05:39 UTC (rev 27456)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2010-12-14 16:43:23 UTC (rev 27457)
@@ -135,6 +135,7 @@
}
protected void loadRemoteDeploymentDetails() throws CoreException{
+ RSEUtils.waitForFullInit();
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
IDeployableServer ds = ServerConverter.getDeployableServer(behaviour.getServer());
this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(ds));
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-12-14 16:05:39 UTC (rev 27456)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEUtils.java 2010-12-14 16:43:23 UTC (rev 27457)
@@ -10,8 +10,11 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.wst.server.core.IServer;
@@ -104,4 +107,13 @@
return null;
}
+ public static void waitForFullInit() throws CoreException {
+ try {
+ RSECorePlugin.waitForInitCompletion();
+ } catch (InterruptedException e) {
+ throw new CoreException(new Status(IStatus.ERROR, org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.PLUGIN_ID,
+ "The RSE model initialization has been interrupted."));
+ }
+ }
+
}
14 years, 1 month
JBoss Tools SVN: r27456 - trunk/deltacloud/features.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 11:05:39 -0500 (Tue, 14 Dec 2010)
New Revision: 27456
Modified:
trunk/deltacloud/features/pom.xml
Log:
refactor G:A values
Modified: trunk/deltacloud/features/pom.xml
===================================================================
--- trunk/deltacloud/features/pom.xml 2010-12-14 16:03:56 UTC (rev 27455)
+++ trunk/deltacloud/features/pom.xml 2010-12-14 16:05:39 UTC (rev 27456)
@@ -2,10 +2,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools.deltacloud</groupId>
- <artifactId>features</artifactId>
- <version>0.1.0-SNAPSHOT</version>
+ <artifactId>org.jboss.tools.deltacloud.features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>deltacloud.features</name>
+ <name>org.jboss.tools.deltacloud.features</name>
<modules>
<module>org.jboss.tools.deltacloud.feature</module>
<!-- <module>org.jboss.tools.deltacloud.test.feature</module> -->
14 years, 1 month
JBoss Tools SVN: r27455 - trunk/deltacloud/plugins.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 11:03:56 -0500 (Tue, 14 Dec 2010)
New Revision: 27455
Modified:
trunk/deltacloud/plugins/pom.xml
Log:
refactor G:A values; add org.jboss.tools.deltacloud.integration module to reactor
Modified: trunk/deltacloud/plugins/pom.xml
===================================================================
--- trunk/deltacloud/plugins/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
+++ trunk/deltacloud/plugins/pom.xml 2010-12-14 16:03:56 UTC (rev 27455)
@@ -2,9 +2,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools.deltacloud</groupId>
- <artifactId>plugins</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- <name>deltacloud.plugins</name>
+ <artifactId>org.jboss.tools.deltacloud.plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>org.jboss.tools.deltacloud.plugins</name>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.deltacloud.ui</module>
14 years, 1 month
JBoss Tools SVN: r27454 - in trunk/deltacloud: features/org.jboss.tools.deltacloud.feature and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-14 11:03:47 -0500 (Tue, 14 Dec 2010)
New Revision: 27454
Modified:
trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml
trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.docs/pom.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml
trunk/deltacloud/pom.xml
trunk/deltacloud/site/pom.xml
trunk/deltacloud/tests/pom.xml
Log:
refactor G:A values
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -1,12 +1,12 @@
<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools.deltacloud.features</groupId>
+ <groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.feature</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.test.feature/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -1,12 +1,12 @@
<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools.deltacloud.features</groupId>
+ <groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.test.feature</artifactId>
<name>org.jboss.tools.deltacloud.test.feature</name>
<version>1.0.0-SNAPSHOT</version>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -1,12 +1,12 @@
<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools.deltacloud.plugins</groupId>
+ <groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.core</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.docs/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.docs/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.docs/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -1,12 +1,12 @@
<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools.deltacloud.plugins</groupId>
+ <groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.docs</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -1,12 +1,12 @@
<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools.deltacloud.plugins</groupId>
+ <groupId>org.jboss.tools.deltacloud</groupId>
<artifactId>org.jboss.tools.deltacloud.ui</artifactId>
<version>0.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/deltacloud/pom.xml
===================================================================
--- trunk/deltacloud/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools</groupId>
- <artifactId>deltacloud</artifactId>
- <name>deltacloud.all</name>
+ <artifactId>org.jboss.tools.deltacloud.all</artifactId>
+ <name>org.jboss.tools.deltacloud.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/deltacloud/site/pom.xml
===================================================================
--- trunk/deltacloud/site/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/site/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -7,8 +7,8 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.deltacloud</groupId>
- <artifactId>deltacloud.site</artifactId>
- <name>deltacloud.site</name>
+ <artifactId>org.jboss.tools.deltacloud.site</artifactId>
+ <name>org.jboss.tools.deltacloud.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/deltacloud/tests/pom.xml
===================================================================
--- trunk/deltacloud/tests/pom.xml 2010-12-14 15:58:12 UTC (rev 27453)
+++ trunk/deltacloud/tests/pom.xml 2010-12-14 16:03:47 UTC (rev 27454)
@@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.tools.deltacloud</groupId>
- <artifactId>tests</artifactId>
- <name>deltacloud.tests</name>
+ <artifactId>org.jboss.tools.deltacloud.tests</artifactId>
+ <name>org.jboss.tools.deltacloud.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- <modules>
14 years, 1 month
JBoss Tools SVN: r27453 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 10:58:12 -0500 (Tue, 14 Dec 2010)
New Revision: 27453
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
Log:
removed bogus comment
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2010-12-14 15:52:39 UTC (rev 27452)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2010-12-14 15:58:12 UTC (rev 27453)
@@ -30,7 +30,6 @@
protected void executeInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action,
DeltaCloudInstance.State expectedState, String title, String message) {
if (instance != null) {
- // TODO internationalize strings
new InstanceActionJob(message, instance, action, expectedState)
.schedule();
}
14 years, 1 month
JBoss Tools SVN: r27452 - trunk/deltacloud/plugins.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 10:52:39 -0500 (Tue, 14 Dec 2010)
New Revision: 27452
Modified:
trunk/deltacloud/plugins/pom.xml
Log:
[JBIDE-7889] renamed org.jboss.tools.deltacloud.as to org.jboss.tools.deltacloud.integration
Modified: trunk/deltacloud/plugins/pom.xml
===================================================================
--- trunk/deltacloud/plugins/pom.xml 2010-12-14 15:45:51 UTC (rev 27451)
+++ trunk/deltacloud/plugins/pom.xml 2010-12-14 15:52:39 UTC (rev 27452)
@@ -9,7 +9,7 @@
<modules>
<module>org.jboss.tools.deltacloud.ui</module>
<module>org.jboss.tools.deltacloud.core</module>
- <module>org.jboss.tools.deltacloud.as</module>
+ <module>org.jboss.tools.deltacloud.integration</module>
<module>org.jboss.tools.deltacloud.docs</module>
</modules>
</project>
14 years, 1 month
JBoss Tools SVN: r27451 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 10:45:51 -0500 (Tue, 14 Dec 2010)
New Revision: 27451
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
Log:
[JBIDe-7889] moved the job to AbstractInstanceJob to have consistent scheduling rules for all jobs in DeltaCloud
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2010-12-14 15:45:07 UTC (rev 27450)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2010-12-14 15:45:51 UTC (rev 27451)
@@ -25,8 +25,8 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Widget;
-import org.jboss.tools.common.jobs.ChainedJob;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.core.job.AbstractInstanceJob;
import org.jboss.tools.deltacloud.integration.DeltaCloudIntegrationPlugin;
import org.jboss.tools.deltacloud.integration.Messages;
import org.jboss.tools.deltacloud.integration.rse.util.RSEUtils;
@@ -47,13 +47,13 @@
private Button createServer;
private final static String CREATE_RSE_PREF_KEY = "org.jboss.tools.deltacloud.integration.wizard.RSEandASWizard.CREATE_RSE_PREF_KEY";
private final static String CREATE_SERVER_PREF_KEY = "org.jboss.tools.deltacloud.integration.wizard.RSEandASWizard.CREATE_SERVER_PREF_KEY";
-
+
public RSEandASWizardPage() {
super("Blah Wizard Page");
setTitle("Blah Title");
setDescription("Blah Desc");
}
-
+
public void createControl(Composite parent) {
Composite c2 = new Composite(parent, SWT.NONE);
c2.setLayout(new FormLayout());
@@ -63,18 +63,19 @@
createServer = new Button(c2, SWT.CHECK);
createServer.setText("Create Server Adapter");
createServer.setLayoutData(UIUtils.createFormData(createRSE, 5, null, 0, 0, 5, 100, -5));
-
+
IEclipsePreferences prefs = new InstanceScope().getNode(DeltaCloudIntegrationPlugin.PLUGIN_ID);
boolean initRSE, initServer;
initRSE = prefs.getBoolean(CREATE_RSE_PREF_KEY, true);
initServer = prefs.getBoolean(CREATE_SERVER_PREF_KEY, true);
createRSE.setSelection(initRSE);
createServer.setSelection(initServer);
-
- SelectionListener listener = new SelectionListener(){
+
+ SelectionListener listener = new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
handleSelection(e.widget);
}
+
public void widgetDefaultSelected(SelectionEvent e) {
handleSelection(e.widget);
}
@@ -86,8 +87,8 @@
}
private void handleSelection(Widget w) {
- if( w == createRSE ) {
- if( !createRSE.getSelection()) {
+ if (w == createRSE) {
+ if (!createRSE.getSelection()) {
createServer.setEnabled(false);
createServer.setSelection(false);
} else {
@@ -95,8 +96,8 @@
}
}
}
-
- public ChainedJob getPerformFinishJob(final DeltaCloudInstance instance) {
+
+ public AbstractInstanceJob getPerformFinishJob(final DeltaCloudInstance instance) {
IEclipsePreferences prefs = new InstanceScope().getNode(DeltaCloudIntegrationPlugin.PLUGIN_ID);
prefs.putBoolean(CREATE_RSE_PREF_KEY, createRSE.getSelection());
prefs.putBoolean(CREATE_SERVER_PREF_KEY, createServer.getSelection());
@@ -105,16 +106,16 @@
} catch (BackingStoreException e1) {
// ignore
}
-
- ChainedJob j = new ChainedJob("Register RSE Connection", INewInstanceWizardPage.NEW_INSTANCE_FAMILY) {
- public IStatus run(IProgressMonitor monitor) {
+
+ AbstractInstanceJob j = new AbstractInstanceJob(
+ "Register RSE Connection", instance, INewInstanceWizardPage.NEW_INSTANCE_FAMILY) {
+ public IStatus doRun(IProgressMonitor monitor) {
return runJob(instance, monitor);
}
};
return j;
}
-
private IStatus runJob(DeltaCloudInstance instance, IProgressMonitor monitor) {
String hostname = RSEUtils.createHostName(instance);
if (hostname != null && hostname.length() > 0 && isAutoconnect()) {
@@ -133,7 +134,7 @@
}
return Status.OK_STATUS;
}
-
+
private boolean isAutoconnect() {
Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
boolean autoConnect = prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
14 years, 1 month
JBoss Tools SVN: r27450 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 10:45:07 -0500 (Tue, 14 Dec 2010)
New Revision: 27450
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractInstanceJob.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudElementJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceStateJob.java
Log:
[JBIDe-7889] added family to the various job constructors
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudElementJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudElementJob.java 2010-12-14 15:25:42 UTC (rev 27449)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudElementJob.java 2010-12-14 15:45:07 UTC (rev 27450)
@@ -25,9 +25,12 @@
private CLOUDELEMENT cloudElement;
public AbstractCloudElementJob(String name, DeltaCloud cloud, CLOUDELEMENT cloudElement) {
- super(name, cloud);
+ this(name, cloud, cloudElement, null);
+ }
+
+ public AbstractCloudElementJob(String name, DeltaCloud cloud, CLOUDELEMENT cloudElement, String family) {
+ super(name, cloud, family);
this.cloudElement = cloudElement;
- // setUser(true);
}
@Override
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java 2010-12-14 15:25:42 UTC (rev 27449)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java 2010-12-14 15:45:07 UTC (rev 27450)
@@ -29,7 +29,11 @@
private DeltaCloud cloud;
public AbstractCloudJob(String name, DeltaCloud cloud) {
- super(name);
+ this(name, cloud, null);
+ }
+
+ public AbstractCloudJob(String name, DeltaCloud cloud, String family) {
+ super(name, family);
this.cloud = cloud;
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractInstanceJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractInstanceJob.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractInstanceJob.java 2010-12-14 15:45:07 UTC (rev 27450)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.job;
+
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+
+/**
+ * @author André Dietisheim
+ */
+public abstract class AbstractInstanceJob extends AbstractCloudElementJob {
+
+ private DeltaCloudInstance instance;
+
+ public AbstractInstanceJob(String name, DeltaCloudInstance instance) {
+ this(name, instance, null);
+ }
+
+ public AbstractInstanceJob(String name, DeltaCloudInstance instance, String family) {
+ super(name, instance.getDeltaCloud(), CLOUDELEMENT.INSTANCES, family);
+ this.instance = instance;
+ }
+
+ @Override
+ protected ISchedulingRule getSchedulingRule() {
+ return new InstanceSchedulingRule(getCloud(), getCloudElement(), instance);
+ }
+
+ protected DeltaCloudInstance getInstance() {
+ return instance;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractInstanceJob.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceStateJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceStateJob.java 2010-12-14 15:25:42 UTC (rev 27449)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/InstanceStateJob.java 2010-12-14 15:45:07 UTC (rev 27450)
@@ -13,40 +13,28 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance.State;
/**
* @author André Dietisheim
*/
-public class InstanceStateJob extends AbstractCloudElementJob {
+public class InstanceStateJob extends AbstractInstanceJob {
- private DeltaCloudInstance instance;
private State expectedState;
public InstanceStateJob(String name, DeltaCloudInstance instance, State expectedState) {
- super(name, instance.getDeltaCloud(), CLOUDELEMENT.INSTANCES);
- this.instance = instance;
+ super(name, instance);
this.expectedState = expectedState;
}
@Override
protected IStatus doRun(IProgressMonitor monitor) throws Exception {
- String id = instance.getId();
+ String id = getInstance().getId();
getCloud().waitForState(id, expectedState, monitor);
return Status.OK_STATUS;
}
- @Override
- protected ISchedulingRule getSchedulingRule() {
- return new InstanceSchedulingRule(getCloud(), getCloudElement(), instance);
- }
-
- protected DeltaCloudInstance getInstance() {
- return instance;
- }
-
protected State getExpectedState() {
return expectedState;
}
14 years, 1 month
JBoss Tools SVN: r27449 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test: src/org/jboss/tools/vpe/ui/bot/test/editor and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-12-14 10:25:42 -0500 (Tue, 14 Dec 2010)
New Revision: 27449
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/HideBorderForUnknownTag.xml
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/ShowBorderForUnknownTag.xml
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/XhtmlFilePerformanceTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ManagePaletteGroupsTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameFacesConfigFileTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
Log:
Fixes for JBDS 4.0.0.Beta2
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/HideBorderForUnknownTag.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/HideBorderForUnknownTag.xml 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/HideBorderForUnknownTag.xml 2010-12-14 15:25:42 UTC (rev 27449)
@@ -12,9 +12,11 @@
Hello Demo Application
</SPAN>
</H1>
-<DIV class="__any__tag__caption" style="-moz-user-modify: read-only;" title="tagunknown" >
+<DIV style="-moz-user-modify: read-only;" title="tagunknown" >
+<DIV class="__any__tag__caption" style="" title="tagunknown" >
tagunknown
-<BR style="font-style: italic; color: green; -moz-user-modify: read-only;" >
+</DIV>
+<BR vpe:pseudo-element="yes" style="font-style: italic; color: green; -moz-user-modify: read-only;" >
</BR>
</DIV>
<UL style="color: red; -moz-user-modify: read-only;" title="h:messages style: color: red" >
@@ -41,6 +43,6 @@
</TABLE>
</DIV>
</DIV>
-<IMG vpetemporarydndelement="true" id="dragIcon" src="file:////opt/jbdevstudio4.0.0.M2/studio/eclipse/plugins/org.jboss.tools.vpe_3.2.0.v201008232021N-H413-M2/ve/dragIcon.gif" style="position: absolute; cursor: move; left: 16px ! important; top: 17px ! important;" >
+<IMG vpetemporarydndelement="true" id="dragIcon" src="file:////opt/jbdevstudio4.0.0.Beta2/studio/eclipse/plugins/org.jboss.tools.vpe_3.2.0.v201012070137R-H33-Beta2/ve/dragIcon.gif" style="position: absolute; cursor: move; left: 16px ! important; top: 17px ! important;" >
</IMG>
</BODY>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/ShowBorderForUnknownTag.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/ShowBorderForUnknownTag.xml 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/resources/preferences/ShowBorderForUnknownTag.xml 2010-12-14 15:25:42 UTC (rev 27449)
@@ -12,9 +12,11 @@
Hello Demo Application
</SPAN>
</H1>
-<DIV class="__any__tag__caption" style="border: 1px solid green; -moz-user-modify: read-only;" title="tagunknown" >
+<DIV style="border: 1px solid green; -moz-user-modify: read-only;" title="tagunknown" >
+<DIV class="__any__tag__caption" style="" title="tagunknown" >
tagunknown
-<BR style="font-style: italic; color: green; -moz-user-modify: read-only;" >
+</DIV>
+<BR vpe:pseudo-element="yes" style="font-style: italic; color: green; -moz-user-modify: read-only;" >
</BR>
</DIV>
<UL style="color: red; -moz-user-modify: read-only;" title="h:messages style: color: red" >
@@ -41,4 +43,6 @@
</TABLE>
</DIV>
</DIV>
+<IMG vpetemporarydndelement="true" id="dragIcon" src="file:////opt/jbdevstudio4.0.0.Beta2/studio/eclipse/plugins/org.jboss.tools.vpe_3.2.0.v201012070137R-H33-Beta2/ve/dragIcon.gif" style="position: absolute; cursor: move; left: 16px ! important; top: 17px ! important;" >
+</IMG>
</BODY>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/InsertActionsTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -158,7 +158,7 @@
botExt.sleep(Timing.time3S());
nsIDOMNode node = webBrowser.getDomNodeByTagName(nodeText, 0);
webBrowser.selectDomNode(node, 0);
- botExt.sleep(Timing.time1S());
+ botExt.sleep(Timing.time2S());
return node;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -53,16 +53,16 @@
SWTBotWebBrowser swtBotWebBrowser = new SWTBotWebBrowser(TEST_PAGE, botExt);
nsIDOMNode node = swtBotWebBrowser.getDomNodeByTagName("INPUT", 1);
swtBotWebBrowser.selectDomNode(node, 0);
- botExt.sleep(Timing.time1S());
-
+ botExt.sleep(Timing.time2S());
swtBotWebBrowser.clickContextMenu(node,
SWTBotWebBrowser.INSERT_AFTER_MENU_LABEL,
SWTBotWebBrowser.JSF_MENU_LABEL, SWTBotWebBrowser.HTML_MENU_LABEL,
SWTBotWebBrowser.H_OUTPUT_TEXT_TAG_MENU_LABEL);
-
+ botExt.sleep(Timing.time2S());
final SWTBotEclipseEditor jspTextEditor = botExt.editorByTitle(TEST_PAGE)
.toTextEditor();
jspTextEditor.save();
+ botExt.sleep(Timing.time2S());
// Check if tag h:outputText was properly added
String editorText = jspTextEditor.getText();
assertTrue("File " + TEST_PAGE
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -76,7 +76,7 @@
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
editor.setText(editorText);
editor.save();
- bot.sleep(Timing.time2S());
+ bot.sleep(Timing.time3S());
}
super.tearDown();
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/XhtmlFilePerformanceTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/XhtmlFilePerformanceTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/XhtmlFilePerformanceTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -55,8 +55,10 @@
packageExplorer.openFile(JBT_TEST_PROJECT_NAME,IDELabel.JsfProjectTree.WEB_CONTENT,XhtmlFilePerformanceTest.TEST_PAGE_NAME);
final SWTBotEclipseEditor xhtmlTextEditor = bot.editorByTitle(XhtmlFilePerformanceTest.TEST_PAGE_NAME).toTextEditor();
String insertText = "!!!123 Test Title Inserted 321!!!";
+ String origText = xhtmlTextEditor.getText();
xhtmlTextEditor.insertText(9, 5, "<h1>" + insertText + "<h1/>");
xhtmlTextEditor.save();
+ bot.sleep(Timing.time2S());
bot.toolbarButtonWithTooltip(IDELabel.Button.REFRESH).click();
SWTBotEditorExt multiPageEditor = swtBotExt.swtBotEditorExtByTitle(XhtmlFilePerformanceTest.TEST_PAGE_NAME);
multiPageEditor.selectPage(IDELabel.VisualPageEditor.PREVIEW_TAB_LABEL);
@@ -69,9 +71,13 @@
// Ignore
}
multiPageEditor.selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
- assertTrue("Web Browser has to contain text " + insertText + " but it doesn't.",swtBotWebBrowserExt.containsNodeWithValue(swtBotWebBrowserExt.getNsIDOMDocument(), insertText));
+ boolean isOK = swtBotWebBrowserExt.containsNodeWithValue(swtBotWebBrowserExt.getNsIDOMDocument(), insertText);
+ xhtmlTextEditor.setText(origText);
+ xhtmlTextEditor.save();
xhtmlTextEditor.close();
+ assertTrue("Web Browser has to contain text " + insertText + " but it doesn't.",isOK);
+
}
@Override
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/EditingELValueTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -114,7 +114,7 @@
optionsDialogBot = bot.shell(IDELabel.Shell.PAGE_DESIGN_OPTIONS).activate().bot();
optionsDialogBot.tabItem(IDELabel.PageDesignOptionsDialog.SUBSTITUTED_EL_EXPRESSIONS_TAB).activate();
assertTrue ("EL Substitution for EL Name " + EditingELValueTest.EL_VARIABLE_NAME + " is not defined.",
- SWTEclipseExt.isItemInTableColumn(optionsDialogBot.table(), EditingELValueTest.EL_VARIABLE_NAME, 0));
+ SWTEclipseExt.isItemInTableColumn(optionsDialogBot.table(), EditingELValueTest.EL_VARIABLE_NAME, 1));
optionsDialogBot.button(IDELabel.Button.OK).click();
}
@@ -131,16 +131,18 @@
protected void tearDown() throws Exception {
if (jspGreetingPageEditor != null){
+ jspGreetingPageEditor.show();
+ deleteAllELSubstitutions();
jspGreetingPageEditor.setText(greetingPageOrigText);
jspGreetingPageEditor.saveAndClose();
}
if (jspInputNamePageEditor != null){
+ jspInputNamePageEditor.show();
+ deleteAllELSubstitutions();
jspInputNamePageEditor.setText(inputNamePageOrigText);
jspInputNamePageEditor.saveAndClose();
}
- deleteAllELSubstitutions();
-
super.tearDown();
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -2,6 +2,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -31,11 +32,13 @@
bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).setFocus();
//Check if the tab changed
- WidgetNotFoundException exception = null;
+ Exception exception = null;
try {
bot.toolbarButtonWithTooltip("Refresh").click(); //$NON-NLS-1$
- } catch (WidgetNotFoundException e) {
- exception = e;
+ } catch (WidgetNotFoundException wnfe) {
+ exception = wnfe;
+ } catch (TimeoutException te){
+ exception = te;
}
assertNotNull(exception);
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ManagePaletteGroupsTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ManagePaletteGroupsTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ManagePaletteGroupsTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -37,6 +37,15 @@
openPage();
openPalette();
+ hideShowPaletteGroup();
+ // Put palette changes back
+ hideShowPaletteGroup();
+
+ }
+ /**
+ * Hide or Show Pallete Group dependent on current Palette Group visibility
+ */
+ private void hideShowPaletteGroup(){
bot.toolbarButtonWithTooltip(IDELabel.JBossToolsPalette.SHOW_HIDE_TOOL_ITEM).click();
SWTBot dialogBot = bot.shell(IDELabel.Shell.SHOW_HIDE_DRAWERS).activate().bot();
SWTBotTreeItem tiTestPaletteGroup = dialogBot.tree().getTreeItem(ManagePaletteGroupsTest.TEST_PALETTE_TREE_GROUP_LABEL);
@@ -46,7 +55,7 @@
dialogBot.button("Ok").click();
assertTrue("Palette Group " + ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL +
" has to be hidden but is visible.",
- !SWTBotWebBrowser.paletteContainsPaletteEntry(botExt, ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL));
+ !SWTBotWebBrowser.paletteContainsRootPaletteCotnainer(botExt, ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL));
}
else{
// Check Palette Group showing
@@ -54,10 +63,8 @@
dialogBot.button("Ok").click();
assertTrue("Palette Group " + ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL +
" has to be visible but is hidden.",
- SWTBotWebBrowser.paletteContainsPaletteEntry(botExt, ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL));
- }
-
-
+ SWTBotWebBrowser.paletteContainsRootPaletteCotnainer(botExt, ManagePaletteGroupsTest.TEST_PALETTE_GROUP_LABEL));
+ }
}
@Override
protected void closeUnuseDialogs() {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/EditorSynchronizationTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -15,6 +15,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
@@ -57,7 +58,7 @@
KeyboardHelper.pressKeyCode(bot.getDisplay(), SWT.ARROW_LEFT);
- delay();
+ bot.sleep(Timing.time2S());
assertTrue("h:messages node is not selected within Outline View",
bot.viewByTitle(WidgetVariables.OUTLINE).bot().tree().selection().get(0).get(0).startsWith("h:messages "));
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameFacesConfigFileTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameFacesConfigFileTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/RenameFacesConfigFileTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -74,5 +74,9 @@
+ OLD_FACES_CONFIG_FILE_NAME
+ " file was not changed in web.xml file.",
fullConfigFileName.endsWith(NEW_FACES_CONFIG_FILE_NAME));
+ // put changes back
+ checkResult = FileRenameHelper.checkFileRenamingWithinWebProjects(bot, NEW_FACES_CONFIG_FILE_NAME, OLD_FACES_CONFIG_FILE_NAME,
+ new String[]{JBT_TEST_PROJECT_NAME,IDELabel.WebProjectsTree.CONFIGURATION});
+ assertNull(checkResult,checkResult);
}
}
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/tools/SWTBotWebBrowser.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -14,6 +14,7 @@
import static org.junit.Assert.assertNotNull;
import java.util.Arrays;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -381,8 +382,8 @@
public static void activatePaletteTool (SWTBotExt bot , String toolLabel){
PaletteViewer paletteViewer = SWTBotWebBrowser.getPaletteViewer(bot);
- PaletteEntry peJsfHtml = SWTBotWebBrowser.getPaletteEntry(paletteViewer , toolLabel);
- paletteViewer.setActiveTool((ToolEntry) peJsfHtml);
+ PaletteEntry paletteEntry = SWTBotWebBrowser.getPaletteEntry(paletteViewer , toolLabel);
+ paletteViewer.setActiveTool((ToolEntry) paletteEntry);
}
/**
@@ -558,7 +559,7 @@
}
/**
- * Returns true if JBoss Tools Palette Contains Palette Entry with label paletteENtryLabel
+ * Returns true if JBoss Tools Palette Contains Palette Entry with label paletteEntryLabel
* @param paletteEntryLabel
* @return
*/
@@ -729,4 +730,23 @@
return result;
}
+ /**
+ * Returns true if JBoss Tools Palette Contains Root Palette Container with label paletteContainerLabel
+ * @param paletteContainerLabel
+ * @return
+ */
+ public static boolean paletteContainsRootPaletteCotnainer (SWTBotExt bot,String paletteContainerLabel){
+ boolean result = false;
+ List<PaletteContainer> paletteContainers = SWTBotWebBrowser.getPaletteRootContainers(bot);
+ if (paletteContainers != null){
+ Iterator<PaletteContainer> pcIterator = paletteContainers.iterator();
+ while (pcIterator.hasNext() && !result){
+ if (pcIterator.next().getLabel().equals(paletteContainerLabel)){
+ result = true;
+ }
+ }
+ }
+ return result;
+ }
+
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2010-12-14 15:23:25 UTC (rev 27448)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2010-12-14 15:25:42 UTC (rev 27449)
@@ -23,6 +23,7 @@
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -390,7 +391,7 @@
/*
* Select some text
*/
- editor.toTextEditor().selectRange(13, 0, 1);
+ editor.toTextEditor().selectRange(13, 15, 1);
/*
* There is an exception caused by the fact that
* line delimiter was selected.
@@ -400,7 +401,7 @@
/*
* Check that the toolbar buttion is disabled
*/
- assertFalse("Toolbar buttion should be disabled", bot //$NON-NLS-1$
+ assertFalse("Toolbar button should be disabled", bot //$NON-NLS-1$
.toolbarButtonWithTooltip(TOOL_TIP)
.isEnabled());
/*
@@ -410,6 +411,7 @@
/*
* Send key press event to fire VPE listeners
*/
+ editor.setFocus();
KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_LEFT);
/*
* Activate the dialog
@@ -685,6 +687,7 @@
bot.button(WidgetVariables.OK_BUTTON).isEnabled());
bot.button(WidgetVariables.OK_BUTTON).click();
isUnusedDialogOpened = false;
+ bot.sleep(Timing.time2S());
/*
* Check that the text was replaced
*/
14 years, 1 month