[jbosstools-commits] JBoss Tools SVN: r42080 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Jun 19 07:48:09 EDT 2012


Author: rhopp
Date: 2012-06-19 07:48:09 -0400 (Tue, 19 Jun 2012)
New Revision: 42080

Added:
   trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java
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/DocumentationSectionTest.java
Log:


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-19 11:40:15 UTC (rev 42079)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java	2012-06-19 11:48:09 UTC (rev 42080)
@@ -9,7 +9,9 @@
 import org.jboss.tools.ui.bot.ext.SWTBotFactory;
 import org.jboss.tools.ui.bot.ext.SWTFormsBotExt;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
 import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
 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.parts.SWTBotFormTextExt;
@@ -101,7 +103,7 @@
 		
 	}
 	
-//	@Test
+	@Test
 	public void createProjectsSectionTest(){
 		//Dynamic web project
 		bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
@@ -118,7 +120,7 @@
 		assertTrue("New OpenShift Express Application window should have appeared", bot.activeShell().getText().equals(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD));
 		//assertTrue("New OpenShift Express Application window should have appeared", bot.shell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD).isActive());
 		bot.activeShell().close();
-		
+		bot.waitWhile(new NonSystemJobRunsCondition());
 		bot.hyperlink(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
 		SWTBotShell projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
 		assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
@@ -171,6 +173,12 @@
 	 */
 	public void canBeDeployedTest(){
 		servers.show();
+		try{
+			bot.viewByTitle("Project Explorer").close();
+		}catch (WidgetNotFoundException ex){
+			//do nothing
+			log.info("Project Explorer is already closed");
+		}
 		String serverName = bot.tree().getAllItems()[0].getText().substring(0, bot.tree().getAllItems()[0].getText().indexOf(' '));
 		servers.findServerByName(servers.bot().tree(), serverName).contextMenu("Add and Remove...").click();
 		bot.shell("Add and Remove...").activate();
@@ -182,7 +190,7 @@
 		}
 		bot.clickButton("Finish");
 		servers.show();
-		bot.waitWhile(new NonSystemJobRunsCondition());
+		bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.LONG.getTimeout());
 		assertNull("Errors node should be null", ProblemsView.getErrorsNode(bot));
 		servers.show();
 		bot.waitWhile(new NonSystemJobRunsCondition());

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-19 11:40:15 UTC (rev 42079)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java	2012-06-19 11:48:09 UTC (rev 42080)
@@ -23,7 +23,7 @@
 	public void documentationSectionTest(){
 		testHyperlinkToBrowser("New and Noteworthy");
 		testHyperlinkToBrowser("User Forum");
-		//testHyperlinkToBrowser("Reference");
+		testHyperlinkToBrowser("Reference");
 		testHyperlinkToBrowser("Developer Forum");
 		testHyperlinkToBrowser("FAQ");
 		testHyperlinkToBrowser("Wiki");

Added: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java	                        (rev 0)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/InstallTest.java	2012-06-19 11:48:09 UTC (rev 42080)
@@ -0,0 +1,39 @@
+package org.jboss.tools.central.test.ui.bot;
+
+import java.util.List;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+ at RunWith(RequirementAwareSuite.class)
+ at SuiteClasses({CentralAllBotTests.class})
+public class InstallTest extends SWTTestExt{
+	
+	@BeforeClass
+	public static void setup(){
+		bot.menu("Help").menu("JBoss Central").click();
+		assertEquals(bot.activeEditor().getTitle(), bot.editorByTitle("JBoss Central").getTitle());
+	}
+	
+	@Test
+	public void triggerInstall(){
+		bot.cTabItem("Software/Update").activate();
+		util.waitForAllExcept(TaskDuration.LONG.getTimeout(), "Usage Data Event consumer");
+		List<SWTBotCheckBox> checkBoxy = bot.checkBoxes();
+		for (SWTBotCheckBox swtBotCheckBox : checkBoxy) {
+			if (swtBotCheckBox.getText().equals(" ")){
+				swtBotCheckBox.click();
+			}
+		}
+		bot.clickButton("Install");
+		bot.sleep(2000);
+	}
+	
+}



More information about the jbosstools-commits mailing list