Revision 400367ef
Added by Niels Hoffmann over 12 years ago
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/test/ClassificationTest.java | ||
---|---|---|
6 | 6 |
import org.eclipse.swtbot.eclipse.finder.waits.Conditions; |
7 | 7 |
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; |
8 | 8 |
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; |
9 |
import org.junit.Before; |
|
9 | 10 |
import org.junit.Test; |
10 | 11 |
|
11 | 12 |
/** |
... | ... | |
14 | 15 |
*/ |
15 | 16 |
public class ClassificationTest extends AbstractEditorTest { |
16 | 17 |
|
18 |
private SWTBotView navigatorView; |
|
19 |
private SWTBotTree tree; |
|
20 |
|
|
21 |
@Before |
|
22 |
public void setup() { |
|
23 |
super.setup(); |
|
24 |
navigatorView = view("Taxon Navigator"); |
|
25 |
tree = tree(navigatorView.getWidget()); |
|
26 |
} |
|
27 |
|
|
17 | 28 |
@Test |
18 | 29 |
public void canDeleteClassification() throws Exception { |
19 |
SWTBotView navigatorView = view("Taxon Navigator"); |
|
20 |
SWTBotTree tree = tree(navigatorView.getWidget()); |
|
21 | 30 |
tree.select(0); |
22 |
|
|
23 |
|
|
24 |
// SWTBotTreeItem treeItem = tree.getTreeItem("TestFolder 01").select(); |
|
25 | 31 |
ContextMenuHelper.clickContextMenu(tree, "Delete"); |
26 | 32 |
bot.waitUntil(Conditions.shellIsActive("Confirm Deletion")); |
27 | 33 |
bot.button("OK").click(); |
28 | 34 |
} |
35 |
|
|
36 |
@Test |
|
37 |
public void canCreateClassification() throws Exception { |
|
38 |
tree.setFocus(); |
|
39 |
ContextMenuHelper.clickContextMenu(tree, "New", "Classification"); |
|
40 |
bot.waitUntil(Conditions.shellIsActive("New Entity")); |
|
41 |
bot.textWithLabel("Label").setText("Classification"); |
|
42 |
bot.button("Finish").click(); |
|
43 |
} |
|
29 | 44 |
} |
Also available in: Unified diff
Adding a test case for creation of a classification