Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Barbin2015-10-22 08:31:13 +0000
committerFlorian Barbin2015-10-30 14:33:11 +0000
commit46769d2c2f979790f5aeb7e1c148495cab4f1d4c (patch)
tree01035c013c933f3d0d2098cd26b4b6c3e1ea0bcb
parentf0c6891c560697e18781967c6ae2963ef3952489 (diff)
downloadorg.eclipse.sirius-46769d2c2f979790f5aeb7e1c148495cab4f1d4c.tar.gz
org.eclipse.sirius-46769d2c2f979790f5aeb7e1c148495cab4f1d4c.tar.xz
org.eclipse.sirius-46769d2c2f979790f5aeb7e1c148495cab4f1d4c.zip
[453437] Removes unnecessary viewpoint selection
* Also makes the lockRepresentationContainer extensible to customize this test for other kind of permission authority. Bug: 453437 Change-Id: Ib15146641b332ad26a61cd941d34494220df2861 Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LockedRepresentationContainerTest.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LockedRepresentationContainerTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LockedRepresentationContainerTest.java
index 82895f9448..df865aadd6 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LockedRepresentationContainerTest.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LockedRepresentationContainerTest.java
@@ -31,8 +31,6 @@ import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import com.google.common.collect.Sets;
-
/**
* Ensure that some actions on representation are disabled when the
* {@link DRepresentationContainer} is locked by using the permission authority
@@ -91,7 +89,8 @@ public class LockedRepresentationContainerTest extends AbstractSiriusSwtBotGefTe
private UIResource semanticModel;
- private EObject representationContainer;
+ @SuppressWarnings("javadoc")
+ protected EObject representationContainer;
@Override
protected void onSetUpBeforeClosingWelcomePage() throws Exception {
@@ -103,9 +102,6 @@ public class LockedRepresentationContainerTest extends AbstractSiriusSwtBotGefTe
sessionAirdResource = new UIResource(designerProject, FILE_DIR, SESSION_FILE);
localSession = designerPerspective.openSessionFromFile(sessionAirdResource);
- // Activate Design viewpoint
- localSession.changeViewpointSelection(Sets.newHashSet(VIEWPOINT_NAME), Sets.<String> newHashSet());
-
// Open the entity diagram & retrieve the representation container
editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_DESCRIPTION_NAME, REPRESENTATION_NAME, DDiagram.class);
@@ -129,8 +125,8 @@ public class LockedRepresentationContainerTest extends AbstractSiriusSwtBotGefTe
lockRepresentationContainer();
// After locking the representation container
- assertFalse("The creation of new representation should be disabled when the representation container is locked", semanticPackageNode.contextMenu(NEW_REPRESENTATION).menu(REPRESENTATION_NAME)
- .isEnabled());
+ assertFalse("The creation of new representation should be disabled when the representation container is locked",
+ semanticPackageNode.contextMenu(NEW_REPRESENTATION).menu(REPRESENTATION_NAME).isEnabled());
}
/**
@@ -306,7 +302,7 @@ public class LockedRepresentationContainerTest extends AbstractSiriusSwtBotGefTe
/**
* Lock the representation container.
*/
- private void lockRepresentationContainer() {
+ protected void lockRepresentationContainer() {
// Activate the ReadOnlyPermission Authority on the representation
// container to lock it
((ReadOnlyPermissionAuthority) PermissionAuthorityRegistry.getDefault().getPermissionAuthority(representationContainer)).activate();

Back to the top