Author: rhopp
Date: 2012-06-07 11:50:49 -0400 (Thu, 07 Jun 2012)
New Revision: 41779
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
Log:
Little tweaks
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-06-07
15:47:27 UTC (rev 41778)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-06-07
15:50:49 UTC (rev 41779)
@@ -7,10 +7,11 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
BaseFunctionalityTest.class,
-// CreateProjectsWithServerTest.class,
+ CreateProjectsWithServerTest.class,
// CreateProjectsWithoutServerTest.class
DocumentationSectionTest.class
- //EmptyTestForHudson.class
+// EmptyTestForHudson.class
+// InstallTest.class
})
public class CentralAllBotTests {
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-06-07
15:47:27 UTC (rev 41778)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-06-07
15:50:49 UTC (rev 41779)
@@ -1,15 +1,9 @@
package org.jboss.tools.central.test.ui.bot;
-import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
-
import java.io.File;
import java.io.FileNotFoundException;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
-import org.eclipse.swtbot.swt.finder.utils.Traverse;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
@@ -18,7 +12,7 @@
import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
-import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotFormTextExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
@@ -29,11 +23,13 @@
//TODO When testing new build try it with type=ServerType.EAP !!!!
-@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
+@Require(clearProjects=false,server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
public class CreateProjectsWithServerTest extends SWTTestExt{
@BeforeClass
public static void setup() throws FileNotFoundException{
+ util.closeAllEditors(false);
+ util.closeAllViews();
bot.menu("Window").menu("Preferences").click();
bot.waitForShell("Preferences");
bot.tree().getTreeItem("Maven").select();
@@ -44,7 +40,6 @@
if (configuredState.getServer().type.equalsIgnoreCase("EAP")){
setupEAP();
}
-
}
/**
* Sets up maven configuration file with configured EAP and WFK repository and clears
~/.m2/clean-repository
@@ -52,7 +47,6 @@
* @throws FileNotFoundException
*/
private static void setupEAP() throws FileNotFoundException{
- log.info("A mame tady EAPcko !!!!!!");
String mvnConfigFileName = System.getProperty("eap.maven.config.file");
File mvnConfigFile;
try {
@@ -107,7 +101,7 @@
}
- @Test
+// @Test
public void createProjectsSectionTest(){
//Dynamic web project
bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
@@ -139,7 +133,7 @@
projectExampleShell.close();
//check the rest of project examples
- checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, false);
+ checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, true);
checkExample(null, IDELabel.JBossCentralEditor.JAVA_EE_PROJECT, true);
checkExample(null, IDELabel.JBossCentralEditor.HTML5_PROJECT, true);
checkExample(null, IDELabel.JBossCentralEditor.RICHFACES_PROJECT, true);
@@ -238,7 +232,12 @@
if (formsBot==null){
bot.hyperlink(formText).click();
}else{
- formsBot.formTextWithText(formText).click();
+ try{
+ formsBot.formTextWithText(formText).click();
+ }catch(WidgetNotFoundException wnfex){
+ throw new WidgetNotFoundException("Could not found widget of type Hyperlink and
text " +
+ formText, wnfex);
+ }
}
bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
SWTBotWizard wizard = new
SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
===================================================================
---
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-06-07
15:47:27 UTC (rev 41778)
+++
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-06-07
15:50:49 UTC (rev 41779)
@@ -37,7 +37,7 @@
bot.waitUntil(new BrowserIsLoaded(browser), TaskDuration.LONG.getTimeout());
assertFalse("JBoss Central sould not be active editor right now",
bot.activeEditor().getTitle().equals("JBoss Central"));
//And also can't be empty page
- System.out.println(browser.getText());
+ //System.out.println(browser.getText());
Pattern pattern = Pattern.compile(".*<body></body>.*",
Pattern.DOTALL);
Matcher matcher = pattern.matcher(browser.getText());
assertFalse("Page cannot be empty", matcher.matches());
Show replies by date