Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Monnier2017-07-12 09:31:17 +0000
committerSteve Monnier2017-07-26 07:54:09 +0000
commit31b3aef2ab16d8e6b1000a0fe2618906f15d8c87 (patch)
tree8abdb32e1c1b6dd5c99b9c4630ab8fd141a9d5ed
parentc2be49c8438c2625277bb2ec50ed05e659d521e5 (diff)
downloadorg.eclipse.sirius-31b3aef2ab16d8e6b1000a0fe2618906f15d8c87.tar.gz
org.eclipse.sirius-31b3aef2ab16d8e6b1000a0fe2618906f15d8c87.tar.xz
org.eclipse.sirius-31b3aef2ab16d8e6b1000a0fe2618906f15d8c87.zip
[518253] Resize the combined fragment when resizing the operand
- Addition of a test that check that it is possible to extend the last operand and therfore the combined fragment. Change-Id: I977d2b9c3aa1e67989d70f3654a9e2dae45f32b8 Signed-off-by: Steve Monnier <steve.monnier@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/CombinedFragmentsOperandOverlapTests.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/CombinedFragmentsOperandOverlapTests.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/CombinedFragmentsOperandOverlapTests.java
index 55f971e51e..57740a31db 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/CombinedFragmentsOperandOverlapTests.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/CombinedFragmentsOperandOverlapTests.java
@@ -22,6 +22,7 @@ import org.eclipse.sirius.ext.base.Option;
import org.eclipse.sirius.tests.swtbot.sequence.condition.CheckMessageEditPartIsDisplayed;
import org.eclipse.sirius.tests.swtbot.sequence.condition.CheckNumberOfDescendants;
import org.eclipse.sirius.tests.swtbot.sequence.condition.CheckResize;
+import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckEditPartResized;
import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckSelectedCondition;
import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckToolIsActivated;
import org.eclipse.sirius.tests.swtbot.support.api.condition.OperationDoneCondition;
@@ -534,4 +535,25 @@ public class CombinedFragmentsOperandOverlapTests extends AbstractCombinedFragme
assertEquals("Second Combined Fragment dimension should be unchanged.", secondCombinedFragmentBounds.getSize(), secondCombinedFragmentBoundsAfterRezize.getSize());
}
+ /**
+ * Test last operand resize that expand the whole combined fragment.
+ */
+ public void testReziseLastOperand() {
+ editor.click(secondOperandOfFirstCombinedFragmentBounds.getCenter());
+
+ Dimension expectedResize = new Dimension(0, 200);
+ CheckEditPartResized cR = new CheckEditPartResized(secondOperandOfFirstCombinedFragmentBot);
+ editor.drag(secondOperandOfFirstCombinedFragmentBounds.getBottom(), secondOperandOfFirstCombinedFragmentBounds.getBottom().getCopy().getTranslated(expectedResize));
+ bot.waitUntil(cR);
+
+ SWTBotGefEditPart secondOperandOfFirstCombinedFragmentBotAfterRezize = firstCombinedFragmentBot.descendants(IsInstanceOf.instanceOf(OperandEditPart.class)).get(1);
+ Rectangle secondOperandOfFirstCombinedFragmentBoundsAfterRezize = editor.getBounds(secondOperandOfFirstCombinedFragmentBotAfterRezize);
+
+ SWTBotGefEditPart secondCombinedFragmentBotAfterRezize = sequenceDiagramBot.descendants(IsInstanceOf.instanceOf(CombinedFragmentEditPart.class)).get(1);
+ Rectangle secondCombinedFragmentBoundsAfterRezize = editor.getBounds(secondCombinedFragmentBotAfterRezize);
+
+ assertEquals("The gap between both Combined Fragment should be unchanged.", secondCombinedFragmentBounds.getTop().y - firstCombinedFragmentBounds.getBottom().y,
+ secondCombinedFragmentBoundsAfterRezize.getTop().y - secondOperandOfFirstCombinedFragmentBoundsAfterRezize.getBottom().y);
+ }
+
}

Back to the top