1
|
/**
|
2
|
*
|
3
|
*/
|
4
|
package eu.etaxonomy.taxeditor.navigation.navigator.contextmenu;
|
5
|
|
6
|
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
|
7
|
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
|
8
|
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
|
9
|
import org.junit.Before;
|
10
|
import org.junit.Test;
|
11
|
|
12
|
import eu.etaxonomy.taxeditor.test.AbstractEditorTest;
|
13
|
import eu.etaxonomy.taxeditor.test.ContextMenuHelper;
|
14
|
|
15
|
/**
|
16
|
* @author n.hoffmann
|
17
|
*
|
18
|
*/
|
19
|
public class ClassificationTest extends AbstractEditorTest {
|
20
|
|
21
|
private SWTBotView navigatorView;
|
22
|
private SWTBotTree tree;
|
23
|
|
24
|
@Before
|
25
|
public void setup() {
|
26
|
super.setup();
|
27
|
navigatorView = utils.view("Taxon Navigator");
|
28
|
tree = utils.tree(navigatorView.getWidget());
|
29
|
}
|
30
|
|
31
|
@Test
|
32
|
public void canDeleteClassification() throws Exception {
|
33
|
tree.select(0);
|
34
|
ContextMenuHelper.clickContextMenu(tree, "Delete");
|
35
|
bot.waitUntil(Conditions.shellIsActive("Confirm Deletion"));
|
36
|
utils.ok();
|
37
|
}
|
38
|
|
39
|
@Test
|
40
|
public void canCreateClassification() throws Exception {
|
41
|
tree.setFocus();
|
42
|
ContextMenuHelper.clickContextMenu(tree, "New", "Classification");
|
43
|
bot.waitUntil(Conditions.shellIsActive("New Entity"));
|
44
|
bot.textWithLabel("Label").setText("Classification");
|
45
|
utils.finish();
|
46
|
}
|
47
|
}
|