Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-01-29 16:48:56 +0000
committerChristian W. Damus2016-01-29 16:50:50 +0000
commit0e9c200139b99bb0825d52ff87ce962571c5bc6e (patch)
treeb989b095bfcd1a16dea3b3e1c1dd6f3038c1b1c4
parent38781b357b990a84ea78c4faf758174b0cd5f1d2 (diff)
downloadorg.eclipse.papyrus-0e9c200139b99bb0825d52ff87ce962571c5bc6e.tar.gz
org.eclipse.papyrus-0e9c200139b99bb0825d52ff87ce962571c5bc6e.tar.xz
org.eclipse.papyrus-0e9c200139b99bb0825d52ff87ce962571c5bc6e.zip
Bug 469188: Page management improvements in the Papyrus multi-editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=469188 Make the test that opens a diagram more resilient against breakage of element-type configurations due to missed refactorings by specifically selecting a diagram kind that is most likely to have been properly refactored and tested.
-rw-r--r--tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome.tests/src/org/eclipse/papyrus/infra/gmfdiag/welcome/tests/WelcomeModelElementTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome.tests/src/org/eclipse/papyrus/infra/gmfdiag/welcome/tests/WelcomeModelElementTest.java b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome.tests/src/org/eclipse/papyrus/infra/gmfdiag/welcome/tests/WelcomeModelElementTest.java
index a5ae4145251..c55c9ff27ed 100644
--- a/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome.tests/src/org/eclipse/papyrus/infra/gmfdiag/welcome/tests/WelcomeModelElementTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.welcome.tests/src/org/eclipse/papyrus/infra/gmfdiag/welcome/tests/WelcomeModelElementTest.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+ * Copyright (c) 2015, 2016 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -124,12 +124,14 @@ public class WelcomeModelElementTest extends AbstractWelcomePageTest {
}
});
- editor.execute(new RecordingCommand(editor.getEditingDomain(), "Delete Diagram") {
+ editor.execute(new RecordingCommand(editor.getEditingDomain(), "Create Diagram") {
@Override
protected void doExecute() {
+ // Be resilient against misconfigured diagrams: look for the class diagram, specifically
ViewPrototype prototype = PolicyChecker.getCurrent().getPrototypesFor(editor.getModel()).stream()
.filter(proto -> proto.getConfiguration() instanceof PapyrusDiagram)
+ .filter(proto -> EcoreUtil.getURI(proto.getConfiguration()).toString().contains("org.eclipse.papyrus.uml.diagram.clazz"))
.findAny().get();
prototype.instantiateOn(editor.getModel(), "CreatedInTest");
}

Back to the top