Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetya Sabeva2012-10-09 12:27:55 +0000
committerPetya Sabeva2012-10-09 12:27:55 +0000
commit894e55c8ddaca974bf705dfcdf457f74f73349ea (patch)
treef1a0f2e98ae3465fae424193cf9ef6fa2dea3ac8 /jpa_diagram_editor
parentdf111589dcb501914786f0e6f43bfe589ba364a8 (diff)
downloadwebtools.dali-894e55c8ddaca974bf705dfcdf457f74f73349ea.tar.gz
webtools.dali-894e55c8ddaca974bf705dfcdf457f74f73349ea.tar.xz
webtools.dali-894e55c8ddaca974bf705dfcdf457f74f73349ea.zip
Enable skipped test.
Diffstat (limited to 'jpa_diagram_editor')
-rw-r--r--jpa_diagram_editor/tests/org.eclipse.jpt.jpadiagrameditor.swtbot.tests/src/org/eclipse/jpt/jpadiagrameditor/swtbot/tests/ui/editor/JPADiagramEditorSWTBotTest.java51
1 files changed, 21 insertions, 30 deletions
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 535817f9af..30e149a60a 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
@@ -244,33 +244,6 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase {
}
/**
- * Adds a new attribute and rename it
- */
- @Test
- public void testDirectEditingAttribute(){
- Utils.sayTestStarted("testDirectEditingAttribute");
-
- SWTBotGefEditPart entity = editorProxy.addEntityToDiagram(jpaDiagramEditor, 50, 50, "Entity1");
- assertFalse("\"Other Attributes\" section must not be visible!", editorProxy.isSectionVisible(jpaDiagramEditor, JPAEditorMessages.AddJPAEntityFeature_basicAttributesShapes));
-
- SWTBotGefEditPart attribute = editorProxy.addAttributeToEntity(jpaDiagramEditor, entity, "attribute1");
- assertNotNull("The attribute must not be renamed!", attribute);
-
- jpaDiagramEditor.directEditType("newAttrName");
- SWTBotGefEditPart oldAttribute = jpaDiagramEditor.getEditPart("attribute1");
- SWTBotGefEditPart newAttribute = jpaDiagramEditor.getEditPart("newAttrName");
- assertNotNull("The attribute must be renamed!", newAttribute);
- assertNull("The attribute must be renamed!", oldAttribute);
-
- assertTrue("Editor must be dirty", jpaDiagramEditor.isDirty());
-
- editorProxy.deleteDiagramElements(jpaDiagramEditor);
- jpaDiagramEditor.save();
-
- Utils.sayTestFinished("testDirectEditingAttribute");
- }
-
- /**
* Adds a new entity and rename it
*/
@Ignore
@@ -327,7 +300,6 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase {
/**
* Change the attribute type.
*/
- @Ignore
@Test
@SuppressWarnings("restriction")
public void testChangeAttributeType(){
@@ -2444,15 +2416,34 @@ public class JPADiagramEditorSWTBotTest extends SWTBotGefTestCase {
/**
* Test that the JPA Diagram editor is opened when the context menu
- * "JPA Tools -> Open Diagram" of the project is called.
+ * "JPA Tools -> Open Diagram" of the project is called. Test that the attribute is
+ * renamed with direct editing action.
*/
@Test
- public void testOpenDiagramOnProjectLevel(){
+ public void testOpenDiagramOnProjectLevelAndDirectEditAttribute(){
Utils.sayTestStarted("testOpenDiagramOnProjectLevel");
workbenchBot.closeAllEditors();
//open JPA diagram editor on project level: JPA Tools -> Open Diagram
SWTBotGefEditor diagramEditor = editorProxy.openDiagramOnJPAProjectNode(TEST_PROJECT);
+
+ SWTBotGefEditPart entity = editorProxy.addEntityToDiagram(diagramEditor, 50, 50, "Entity1");
+ assertFalse("\"Other Attributes\" section must not be visible!", editorProxy.isSectionVisible(jpaDiagramEditor, JPAEditorMessages.AddJPAEntityFeature_basicAttributesShapes));
+
+ SWTBotGefEditPart attribute = editorProxy.addAttributeToEntity(diagramEditor, entity, "attribute1");
+ assertNotNull("The attribute must not be renamed!", attribute);
+
+ diagramEditor.directEditType("newAttrName");
+ SWTBotGefEditPart oldAttribute = diagramEditor.getEditPart("attribute1");
+ SWTBotGefEditPart newAttribute = diagramEditor.getEditPart("newAttrName");
+ assertNotNull("The attribute must be renamed!", newAttribute);
+ assertNull("The attribute must be renamed!", oldAttribute);
+
+ assertTrue("Editor must be dirty", diagramEditor.isDirty());
+
+ editorProxy.deleteDiagramElements(diagramEditor);
+ diagramEditor.save();
+
diagramEditor.close();
Utils.sayTestFinished("testOpenDiagramOnProjectLevel");

Back to the top