Author: psrna
Date: 2012-05-24 07:58:19 -0400 (Thu, 24 May 2012)
New Revision: 41350
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/EntityTest.java
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/PersistenceTest.java
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/ProjectTest.java
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java
Log:
* wait for non ignored jobs
Modified: trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml 2012-05-24 11:18:15 UTC
(rev 41349)
+++ trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/pom.xml 2012-05-24 11:58:19 UTC
(rev 41350)
@@ -22,6 +22,14 @@
<skip>${swtbot.test.skip}</skip>
<testSuite>org.jboss.tools.forge.ui.bot.test</testSuite>
<testClass>org.jboss.tools.forge.ui.bot.test.suite.ForgeAllTest</testClass>
+ <dependencies combine.children="append">
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.jboss.tools.forge.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+
</configuration>
</plugin>
</plugins>
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/EntityTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/EntityTest.java 2012-05-24
11:18:15 UTC (rev 41349)
+++
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/EntityTest.java 2012-05-24
11:58:19 UTC (rev 41350)
@@ -12,7 +12,7 @@
@Test
public void newEntity(){
- createProject(ProjectTypes.jar);
+ createProject();
createPersistence();
getStyledText().setText("entity\n");
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/PersistenceTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/PersistenceTest.java 2012-05-24
11:18:15 UTC (rev 41349)
+++
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/PersistenceTest.java 2012-05-24
11:58:19 UTC (rev 41350)
@@ -19,7 +19,7 @@
@Test
public void hibernateJBossAS7(){
- createProject(ProjectTypes.jar);
+ createProject();
getStyledText().setText("persistence setup\n");
getStyledText().setText("HIBERNATE\n");
@@ -48,7 +48,7 @@
@Test
public void openjpaJBossAS7(){
- createProject(ProjectTypes.jar);
+ createProject();
getStyledText().setText("persistence setup\n");
getStyledText().setText("OPENJPA\n");
@@ -73,7 +73,7 @@
@Test
public void eclipselinkJBossAS7(){
- createProject(ProjectTypes.jar);
+ createProject();
getStyledText().setText("persistence setup\n");
getStyledText().setText("ECLIPSELINK\n");
@@ -99,7 +99,7 @@
@Test
public void infinispanJBossAS7(){
- createProject(ProjectTypes.jar);
+ createProject();
getStyledText().setText("persistence setup\n");
getStyledText().setText("INFINISPAN\n");
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/ProjectTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/ProjectTest.java 2012-05-24
11:18:15 UTC (rev 41349)
+++
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/ProjectTest.java 2012-05-24
11:58:19 UTC (rev 41350)
@@ -1,8 +1,12 @@
package org.jboss.tools.forge.ui.bot.test;
import java.io.IOException;
+
+import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
import org.jboss.tools.forge.ui.bot.test.suite.ForgeTest;
+import org.jboss.tools.forge.ui.bot.test.util.ConsoleUtils;
import org.jboss.tools.forge.ui.bot.test.util.ResourceUtils;
+import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.junit.Test;
@@ -21,8 +25,9 @@
createProject(ProjectTypes.pom);
String text = getStyledText().getText();
- assertTrue(text.contains("***SUCCESS*** Created project [" + PROJECT_NAME +
"]"));
- pExplorer.show();
+ assertTrue(ConsoleUtils.waitUntilTextInConsole("***SUCCESS*** Created project
[" + PROJECT_NAME + "]", TIME_1S, TIME_20S*3));
+
+ pExplorer.show();
assertTrue(pExplorer.existsResource(PROJECT_NAME));
assertTrue(pExplorer.existsResource(PROJECT_NAME, "pom.xml"));
@@ -46,7 +51,7 @@
createProject(ProjectTypes.war);
String text = getStyledText().getText();
- assertTrue(text.contains("***SUCCESS*** Created project [" + PROJECT_NAME +
"]"));
+ assertTrue(ConsoleUtils.waitUntilTextInConsole("***SUCCESS*** Created project
[" + PROJECT_NAME + "]", TIME_1S, TIME_20S*3));
pExplorer.show();
assertTrue(pExplorer.existsResource(PROJECT_NAME));
assertTrue(pExplorer.existsResource(PROJECT_NAME, "pom.xml"));
Modified:
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java
===================================================================
---
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java 2012-05-24
11:18:15 UTC (rev 41349)
+++
trunk/forge/tests/org.jboss.tools.forge.ui.bot.test/src/org/jboss/tools/forge/ui/bot/test/suite/ForgeTest.java 2012-05-24
11:58:19 UTC (rev 41350)
@@ -26,10 +26,11 @@
protected static final String PROJECT_NAME = "testproject";
protected static final String PACKAGE_NAME = "org.jboss.testproject";
- protected PackageExplorer pExplorer = new PackageExplorer();
+ protected static ProjectExplorer pExplorer = null;
@BeforeClass
public static void setup(){
+ pExplorer = new ProjectExplorer();
openForgeView();
startForge();
clear();
@@ -44,16 +45,29 @@
jar, war, pom
}
+ protected void createProject(){
+ getStyledText().setText("new-project \n");
+
+ getStyledText().setText(PROJECT_NAME + "\n");
+ getStyledText().setText(PACKAGE_NAME + "\n");
+ getStyledText().setText("Y\n");
+
+ ConsoleUtils.waitUntilTextInConsole("project [" + PROJECT_NAME +
"]", TIME_1S, TIME_20S*3);
+
+ util.waitForNonIgnoredJobs();
+ }
+
protected void createProject(ProjectTypes type){
getStyledText().setText("new-project --type " + type + "\n");
+
getStyledText().setText(PROJECT_NAME + "\n");
getStyledText().setText(PACKAGE_NAME + "\n");
getStyledText().setText("Y\n");
ConsoleUtils.waitUntilTextInConsole("project [" + PROJECT_NAME +
"]", TIME_1S, TIME_20S*3);
- util.waitForJobs("Importing Forge project"); //see
org.jboss.tools.forge.importer#importProject()
+ util.waitForNonIgnoredJobs();
}
protected void createPersistence(){
@@ -156,9 +170,9 @@
openForgeView();
SWTBotView view = getForgeView();
- view.toolbarButton("Start Forge").click();
+ view.toolbarButton("Start the default Forge runtime").click();
- util.waitForJobs("Starting Forge"); //see
org.jboss.tools.forge.ui.part#startForge()
+ util.waitForNonIgnoredJobs();
}
public static void stopForge(){
@@ -167,7 +181,7 @@
openForgeView();
SWTBotView view = getForgeView();
- view.toolbarButton("Stop Forge").click();
+ view.toolbarButton("Stop the running Forge runtime").click();
bot.sleep(TIME_5S);
}