Created tests for the "New" menu
authorn.hoffmann <n.hoffmann@localhost>
Mon, 11 Apr 2011 15:15:32 +0000 (15:15 +0000)
committern.hoffmann <n.hoffmann@localhost>
Mon, 11 Apr 2011 15:15:32 +0000 (15:15 +0000)
.gitattributes
.gitignore
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEditorTest.java
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java [new file with mode: 0644]
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java [new file with mode: 0644]

index 8a597047fee36481ea2eaa431984e257ff4858c1..7752fbabacd20ab85a54f5e469d7996d43a43e8b 100644 (file)
@@ -1207,6 +1207,8 @@ eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/AbstractEd
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ContextMenuHelper.java -text
 eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/LoginTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java -text
+eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java -text
 /pom.xml -text
 src/changes/changes.xml -text
 src/site/apt/download.apt -text
index 0786f5083130d2e0920379621866b351df15f664..f7845dd284fce73da096dc233b39298f57d1731b 100644 (file)
@@ -97,6 +97,7 @@ eu.etaxonomy.taxeditor.store/.project
 eu.etaxonomy.taxeditor.store/.settings
 eu.etaxonomy.taxeditor.store/hibernate.log
 eu.etaxonomy.taxeditor.store/target
+eu.etaxonomy.taxeditor.test/screenshots/*.jpeg
 /runtime-taxeditor.product
 /target
 /workspace
index ff28acb41d41780d745a683e24a2cc94e7ad6443..f6da7727e270ae6a867c1058ab4c74b2aedf9c90 100644 (file)
@@ -61,5 +61,15 @@ public abstract class AbstractEditorTest {
                return bot.viewByTitle(title);\r
        }\r
        \r
+       public void cancel() {\r
+               clickButton("Cancel");\r
+       }\r
+       \r
+       public void ok() {\r
+               clickButton("OK");\r
+       }\r
        \r
+       public void clickButton(String label) {\r
+               bot.button(label).click();\r
+       }\r
 }\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewMenuTest.java
new file mode 100644 (file)
index 0000000..cb49f1f
--- /dev/null
@@ -0,0 +1,65 @@
+package eu.etaxonomy.taxeditor.test;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * Open all new menus\r
+ * \r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NewMenuTest extends AbstractEditorTest {\r
+\r
+       @Test\r
+       public void canOpenNewWizardForTaxon(){\r
+               openNewWizardFor("Taxon");\r
+               cancel();\r
+       }\r
+       \r
+\r
+       @Test\r
+       public void canOpenNewWizardForReference(){\r
+               openNewWizardFor("Reference");\r
+               cancel();\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void canOpenNewWizardForName(){\r
+               openNewWizardFor("Name");\r
+               cancel();\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void canOpenNewWizardForTeam(){\r
+               openNewWizardFor("Team");\r
+               cancel();\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void canOpenNewWizardForPerson(){\r
+               openNewWizardFor("Person");\r
+               cancel();\r
+       }\r
+       \r
+       @Test\r
+       public void canOpenNewWizardForSpecimen(){\r
+               openNewWizardFor("Specimen");\r
+               cancel();\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void canOpenNewWizardForClassification(){\r
+               openNewWizardFor("Classification");\r
+               cancel();\r
+       }\r
+\r
+       private void openNewWizardFor(String entity) {\r
+               bot.menu("General").menu("New").menu(entity).click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+}\r
diff --git a/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java b/eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/NewTaxonWizardTest.java
new file mode 100644 (file)
index 0000000..7fc285c
--- /dev/null
@@ -0,0 +1,35 @@
+/**\r
+ * \r
+ */\r
+package eu.etaxonomy.taxeditor.test;\r
+\r
+import org.eclipse.swtbot.eclipse.finder.waits.Conditions;\r
+import org.junit.After;\r
+import org.junit.Ignore;\r
+import org.junit.Test;\r
+\r
+/**\r
+ * @author n.hoffmann\r
+ *\r
+ */\r
+public class NewTaxonWizardTest extends AbstractEditorTest {\r
+\r
+       @Override\r
+       public void setup() {\r
+               super.setup();\r
+               bot.menu("General").menu("New").menu("Taxon").click();\r
+               bot.waitUntil(Conditions.shellIsActive("New Entity"));\r
+       }\r
+       \r
+       @Ignore\r
+       @Test\r
+       public void canSelectClassification() {\r
+               bot.button("Browse existing").click();\r
+               bot.waitUntil(Conditions.shellIsActive("Choose a Classification"));\r
+       }\r
+       \r
+       @After\r
+       public void tearDown() {\r
+               clickButton("Finish");\r
+       }\r
+}\r