diff options
| author | Belqassim Djafer | 2014-10-29 16:10:58 +0000 |
|---|---|---|
| committer | Laurent Redor | 2014-11-13 10:10:40 +0000 |
| commit | 84536fd893fa33ba0f7ad70ccf67f85157c99dfb (patch) | |
| tree | 488b846dfb6591857de775346270eb02ec85c533 | |
| parent | adf28c7da692ac5727dce4566742ea9b21b4a6c9 (diff) | |
| download | org.eclipse.sirius-84536fd893fa33ba0f7ad70ccf67f85157c99dfb.tar.gz org.eclipse.sirius-84536fd893fa33ba0f7ad70ccf67f85157c99dfb.tar.xz org.eclipse.sirius-84536fd893fa33ba0f7ad70ccf67f85157c99dfb.zip | |
[449220] Add missing tests for undo/redo on popupmenu actions
Bug: 449220
Change-Id: Ifd5e584f4b3f0421110f98b8d0446d7138688fe6
Signed-off-by: Belqassim Djafer <belqassim.djafer@obeo.fr>
| -rw-r--r-- | plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/PopupMenuTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/PopupMenuTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/PopupMenuTest.java index d0e89a2e89..9330a250e9 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/PopupMenuTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/PopupMenuTest.java @@ -314,4 +314,28 @@ public class PopupMenuTest extends AbstractSiriusSwtBotGefTestCase { } } + /** + * Test undo/redo of the PopupMenu action. + * + */ + public void testUndoRedoMenuAction() { + SWTBotGefEditPart editPart = editor.getEditPart("Class"); + SWTBotGefEditPart editPart2 = editor.getEditPart("att"); + editor.select(editPart, editPart2); + try { + editor.clickContextMenu("actionMenu4"); + } catch (WidgetNotFoundException e) { + assertTrue("The action actionMenu4 of the menu myMenu4 should exist", true); + } + try { + undo("actionMenu4"); + } catch (WidgetNotFoundException e) { + assertTrue("The action actionMenu4 of the menu myMenu4 should be canceled", true); + } + try { + redo("actionMenu4"); + } catch (WidgetNotFoundException e) { + assertTrue("The action actionMenu4 of the menu myMenu4 should be restored", true); + } + } } |
