Project

General

Profile

Download (1.43 KB) Statistics
| Branch: | Tag: | Revision:
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.Test;
11

    
12
import eu.etaxonomy.taxeditor.test.AbstractEditorTest;
13

    
14
/**
15
 * @author n.hoffmann
16
 *
17
 */
18
public class NewTaxonWizardTest extends AbstractEditorTest {
19

    
20
	@Override
21
	public void setup() {
22
		super.setup();
23
		bot.menu("General").menu("New").menu("Taxon").click();
24
		bot.waitUntil(Conditions.shellIsActive("New Entity"));
25
	}
26
	
27
	@Test
28
	public void unalteredDialogCanNotBefinished() {
29
		boolean finishIsEnabled = bot.button("Finish").isEnabled();
30
		Assert.assertEquals(false, finishIsEnabled);
31
		utils.cancel();
32
	}
33
	
34
	@Test
35
	public void canCreateNewTaxonMinimal(){
36
		utils.openFilteredSelection(0, "Choose a Classification");
37

    
38
		SWTBotButton okButton = bot.button(1);
39
		bot.text(0).setText("?");
40
		bot.waitUntil(Conditions.widgetIsEnabled(okButton));
41
		utils.ok();
42
		bot.waitUntil(Conditions.shellIsActive("New Entity"));
43
		String newTaxonName = "Test taxon Smartbert";
44
		bot.textWithLabel("New Taxon").setText(newTaxonName);
45
		bot.waitUntil(Conditions.widgetIsEnabled(bot.button("Finish")));
46
		utils.finish();
47
		
48
//		bot.waitUntil(Conditions.waitForEditor(WithPartId.withPartId(MultiPageTaxonEditor.ID)));
49
//		Assert.assertEquals(newTaxonName, bot.activeEditor().getTitle());
50
	}
51
	
52
	
53

    
54
	
55
}
    (1-1/1)