Merge branch 'develop' of wp5.e-taxonomy.eu:/var/git/taxeditor into remoting-4.0
[taxeditor.git] / eu.etaxonomy.taxeditor.test / src / test / java / eu / etaxonomy / taxeditor / newWizard / NewTaxonWizardTest.java
1 /**
2 *
3 */
4 package eu.etaxonomy.taxeditor.newWizard;
5
6 import junit.framework.Assert;
7
8 import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
9 import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
10 import org.junit.Ignore;
11 import org.junit.Test;
12
13 import eu.etaxonomy.taxeditor.test.AbstractEditorTest;
14
15 /**
16 * @author n.hoffmann
17 *
18 */
19 @Ignore
20 public class NewTaxonWizardTest extends AbstractEditorTest {
21
22 @Override
23 public void setup() {
24 super.setup();
25 bot.menu("General").menu("New").menu("Taxon").click();
26 bot.waitUntil(Conditions.shellIsActive("New Entity"));
27 }
28
29 @Test
30 public void unalteredDialogCanNotBefinished() {
31 boolean finishIsEnabled = bot.button("Finish").isEnabled();
32 Assert.assertEquals(false, finishIsEnabled);
33 utils.cancel();
34 }
35
36 @Test
37 public void canCreateNewTaxonMinimal(){
38 utils.openFilteredSelection(0, "Choose a Classification");
39
40 SWTBotButton okButton = bot.button(1);
41 bot.text(0).setText("?");
42 bot.waitUntil(Conditions.widgetIsEnabled(okButton));
43 utils.ok();
44 bot.waitUntil(Conditions.shellIsActive("New Entity"));
45 String newTaxonName = "Test taxon Smartbert";
46 bot.textWithLabel("New Taxon").setText(newTaxonName);
47 bot.waitUntil(Conditions.widgetIsEnabled(bot.button("Finish")));
48 utils.finish();
49
50 // bot.waitUntil(Conditions.waitForEditor(WithPartId.withPartId(MultiPageTaxonEditor.ID)));
51 // Assert.assertEquals(newTaxonName, bot.activeEditor().getTitle());
52 }
53
54
55
56
57 }