diff options
author | Petya Sabeva | 2012-10-08 11:24:30 +0000 |
---|---|---|
committer | Petya Sabeva | 2012-10-08 11:24:30 +0000 |
commit | 28874221faf59c89f3c62b86b34ccf9249dcf6d1 (patch) | |
tree | 1f6f4ef64027466307bb5fd440b82d795c2b0242 /jpa_diagram_editor | |
parent | 20e20d54db975a7bab3e848e15f27205d03c1ac9 (diff) | |
download | webtools.dali-28874221faf59c89f3c62b86b34ccf9249dcf6d1.tar.gz webtools.dali-28874221faf59c89f3c62b86b34ccf9249dcf6d1.tar.xz webtools.dali-28874221faf59c89f3c62b86b34ccf9249dcf6d1.zip |
Fix failing tests.
Change-Id: Ie3f9dbb1aaaf94116940dee808ae7fd96110ba1b
Diffstat (limited to 'jpa_diagram_editor')
2 files changed, 14 insertions, 8 deletions
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java index 8fe4ceb87b..dfd521d4ad 100644 --- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java +++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/EditorProxy.java @@ -171,7 +171,7 @@ public class EditorProxy { public SWTBotGefEditPart addAttributeToEntity(final SWTBotGefEditor jpaDiagramEditor, SWTBotGefEditPart entity, String attributeName) {
pressEntityContextButton(jpaDiagramEditor, entity, JPAEditorMessages.JPAEditorToolBehaviorProvider_createAttributeButtonlabel);
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, attributeName), 10000);
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, attributeName), 30000);
SWTBotGefEditPart attribute = jpaDiagramEditor.getEditPart(attributeName);
assertNotNull("Atrribute is not added.", attribute);
@@ -206,7 +206,7 @@ public class EditorProxy { public SWTBotGefEditPart addEntityToDiagram(final SWTBotGefEditor jpaDiagramEditor, int x, int y, String entityName) {
jpaDiagramEditor.activateTool(JPAEditorMessages.CreateJPAEntityFeature_jpaEntityFeatureName);
jpaDiagramEditor.doubleClick(x, y);
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, entityName), 10000);
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, entityName), 30000);
List<SWTBotGefEditPart> entities = jpaDiagramEditor.mainEditPart().children();
assertFalse("Editor must contains at least one entity!", entities.isEmpty());
@@ -233,7 +233,7 @@ public class EditorProxy { public SWTBotGefEditPart addMappedSuperclassToDiagram(final SWTBotGefEditor jpaDiagramEditor, int x, int y, String entityName) {
jpaDiagramEditor.activateTool(JPAEditorMessages.CreateMappedSuperclassFeature_createMappedSuperclassFeatureName);
jpaDiagramEditor.doubleClick(x, y);
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, entityName), 10000);
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, entityName), 30000);
List<SWTBotGefEditPart> entities = jpaDiagramEditor.mainEditPart().children();
assertFalse("Editor must contains at least one mapped superclass!", entities.isEmpty());
diff --git a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/JPADiagramEditorSWTBotTest.java b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/JPADiagramEditorSWTBotTest.java index 45b0912b66..d10ddde52e 100644 --- a/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/JPADiagramEditorSWTBotTest.java +++ b/jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/JPADiagramEditorSWTBotTest.java @@ -30,6 +30,7 @@ import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences; import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotStyledText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
+import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -72,6 +73,11 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { Thread.sleep(2000);
}
+// @After
+// public void tearDown() throws Exception {
+// editorProxy.deleteDiagramElements(jpaDiagramEditor);
+// }
+
/**
* Add entity to diagram and check that it contains a "Primary Key" section
* with one attribute "id" and no "Relation Attributes" and "Other Attributes"
@@ -80,7 +86,7 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { @Test
public void testAddEntity() {
Utils.sayTestStarted("testAddEntity");
-
+
editorProxy.addEntityToDiagram(jpaDiagramEditor, 50, 50, "Entity1");
assertTrue("Editor must be dirty", jpaDiagramEditor.isDirty());
@@ -321,7 +327,7 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { @SuppressWarnings("restriction")
public void testChangeAttributeType(){
Utils.sayTestStarted("testChangeAttributeType");
-
+
SWTBotGefEditPart entity = editorProxy.addEntityToDiagram(jpaDiagramEditor, 50, 50, "Entity1");
assertFalse("\"Other Attributes\" section must not be visible!", editorProxy.isSectionVisible(jpaDiagramEditor, JPAEditorMessages.AddJPAEntityFeature_basicAttributesShapes));
@@ -397,7 +403,7 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { assertTrue(editorProxy.getCancelButton(renameEntityDialog).isEnabled());
editorProxy.getFinishButton(renameEntityDialog).click();
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "NewEntityName"), 10000);
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "NewEntityName"), 30000);
entity = jpaDiagramEditor.getEditPart("NewEntityName");
assertNotNull("Entity name must be changed!", entity);
@@ -2302,7 +2308,7 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { jpaDiagramEditor.click(entity1);
jpaDiagramEditor.click(50, 200);
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "Entity2"));
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "Entity2"), 30000);
SWTBotGefEditPart inheritedEntity = jpaDiagramEditor.getEditPart("Entity2");
assertNotNull(inheritedEntity);
@@ -2347,7 +2353,7 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase { jpaDiagramEditor.click(mappedSuperclass);
jpaDiagramEditor.click(50, 200);
- bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "Entity1"));
+ bot.waitUntil(new ElementIsShown(jpaDiagramEditor, "Entity1"), 30000);
SWTBotGefEditPart inheritedEntity = jpaDiagramEditor.getEditPart("Entity1");
assertNotNull(inheritedEntity);
|