diff options
author | Camille Letavernier | 2018-05-18 14:38:45 +0000 |
---|---|---|
committer | Nicolas FAUVERGUE | 2018-05-22 15:58:01 +0000 |
commit | 35f5a0c41fc41805277fbebfc3a090077e9fd562 (patch) | |
tree | 364b1aea4b1d65176e3be9a45113681e3bdff70c /tests/junit/plugins/uml | |
parent | 7edf8affa9b885d998704202f422f1cb247594e2 (diff) | |
download | org.eclipse.papyrus-35f5a0c41fc41805277fbebfc3a090077e9fd562.tar.gz org.eclipse.papyrus-35f5a0c41fc41805277fbebfc3a090077e9fd562.tar.xz org.eclipse.papyrus-35f5a0c41fc41805277fbebfc3a090077e9fd562.zip |
Bug 533770: [Sequence Diagram] Layout operands in a CombinedFragment
https://bugs.eclipse.org/bugs/show_bug.cgi?id=533770
- Properly set the Y coordinate of Operands in the Notation, so that the
GridManagement policy can properly compute the operands coverage
- Update the DeleteOperand test assertion, since we now expand the
preceding operand when deleting an operand (So the fragments initially
covered by the deleted operand are now covered by the other operand,
rather than the interaction)
Change-Id: Ibc7d163ebe71c14648f38a0b27f8a5f4bfab8e98
Signed-off-by: Camille Letavernier <cletavernier@eclipsesource.com>
Diffstat (limited to 'tests/junit/plugins/uml')
-rw-r--r-- | tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java index 5cdd09f531b..88adfd68049 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/bug/CombinedFragmentRegressionTest.java @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (c) 2018 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 * which accompanies this distribution, and is available at @@ -8,7 +8,7 @@ * * Contributors: * Christian W. Damus - Initial API and implementation - * + * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.sequence.tests.bug; @@ -81,7 +81,7 @@ import org.junit.Test; /** * Regression tests specifically for {@link CombinedFragment}s in the sequence diagram * editor, especially those tracked under the umbrella of <a href="http://eclip.se/533670">bug 533670</a>. - * + * * @author Christian W. Damus * @see <a href="http://eclip.se/533670">bug 533670</a> */ @@ -258,7 +258,7 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest { /** * Verify that the deletion of the only (or last remaining) interaction operand * in a combined fragment results in deletion of the combined fragment, also. - * + * * @see <a href="http://eclip.se/533683">bug 533683</a> */ @Test @@ -283,7 +283,7 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest { /** * Verify that the deletion of an interaction operand that leaves at least one * remaining in a combined fragment does not result in deletion of the combined fragment. - * + * * @see <a href="http://eclip.se/533683">bug 533683</a> */ @Test @@ -304,13 +304,18 @@ public class CombinedFragmentRegressionTest extends AbstractPapyrusTest { editor.delete(operandEP); + editor.flushDisplayEvents(); + combinedFragmentEP = editor.findEditPart(cfrag); assertThat("Combined fragment was deleted", cfrag.getEnclosingInteraction(), is(interaction)); assertThat("Combined fragment no longer presented in diagram", combinedFragmentEP, notNullValue()); + InteractionOperand firstOperand = cfrag.getOperands().get(0); + // The CombinedFragment still covers the same area, so fragments should + // now be owned by the other operand assertThat("Fragments of deleted operand not retained", - interaction.getFragments(), hasItems(deleteSend, deleted)); + firstOperand.getFragments(), hasItems(deleteSend, deleted)); } /** |