Author: jpeterka
Date: 2012-04-06 05:06:29 -0400 (Fri, 06 Apr 2012)
New Revision: 40091
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/generation/RunSchemaExportTest.java
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/CodeGenerationSuite.java
Log:
Initial RunSchemaExport test added into hb ui bot test
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/CodeGenerationSuite.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/CodeGenerationSuite.java 2012-04-06
06:17:44 UTC (rev 40090)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/suite/CodeGenerationSuite.java 2012-04-06
09:06:29 UTC (rev 40091)
@@ -1,8 +1,6 @@
package org.jboss.tools.hb.ui.bot.suite;
-import org.jboss.tools.hb.ui.bot.test.generation.CreateCodeGenerationConfiguration;
-import org.jboss.tools.hb.ui.bot.test.generation.JPADDLGenerationTest;
-import org.jboss.tools.hb.ui.bot.test.generation.JPAEntitiesGenerationTest;
+import org.jboss.tools.hb.ui.bot.test.generation.RunSchemaExportTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -11,7 +9,8 @@
//(a)SuiteClasses({CreateCodeGenerationConfiguration.class})
//(a)SuiteClasses({JPADDLGenerationTest.class})
//(a)SuiteClasses({JPAEntitiesGenerationTest.class})
-(a)SuiteClasses({CreateCodeGenerationConfiguration.class,JPADDLGenerationTest.class,JPAEntitiesGenerationTest.class})
+(a)SuiteClasses({RunSchemaExportTest.class})
+//(a)SuiteClasses({CreateCodeGenerationConfiguration.class,JPADDLGenerationTest.class,JPAEntitiesGenerationTest.class})
public class CodeGenerationSuite {
}
Added:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/generation/RunSchemaExportTest.java
===================================================================
---
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/generation/RunSchemaExportTest.java
(rev 0)
+++
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/generation/RunSchemaExportTest.java 2012-04-06
09:06:29 UTC (rev 40091)
@@ -0,0 +1,52 @@
+package org.jboss.tools.hb.ui.bot.test.generation;
+
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.hb.ui.bot.common.Tree;
+import org.jboss.tools.hb.ui.bot.test.HibernateBaseTest;
+import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+/**
+ * Run schema export from hibernate configuration context menu test
+ *
+ * @author jpeterka
+ *
+ */
+@Require(db = @DB, clearProjects = true, perspective = "Hibernate")
+public class RunSchemaExportTest extends HibernateBaseTest {
+
+
+ final String hc = "pre-hibernate40";
+
+ @Test
+ public void showMappingDiagram() {
+ importTestProject("/resources/prj/hibernatelib");
+ importTestProject("/resources/prj/hibernate40");
+ util.waitForAll();
+ runShemaExport();
+ }
+
+ private void runShemaExport() {
+ SWTBotView hcv =
open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL);
+ Tree.select(hcv.bot(), hc, "Configuration");
+ SWTBotTreeItem item = Tree.select(hcv.bot(), hc);
+ item.contextMenu("Run SchemaExport").click();
+
+ String title = "Run SchemaExport";
+ bot.waitUntil(shellIsActive(title ));
+ SWTBotShell shell = bot.shell(title);
+ shell.bot().button(IDELabel.Button.YES).click();
+ bot.waitUntil(shellCloses(shell));
+
+ //SWTBotTreeItem selectNode =
ConsoleConfiguration.selectNode(hc,"Configuration","Database","Public");
+ //assertTrue(selectNode.getNodes().size() != 0);
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hb/ui/bot/test/generation/RunSchemaExportTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Show replies by date