From 1c83ddd0afd7f1d9f9e65260812a2744d2988197 Mon Sep 17 00:00:00 2001 From: Andrea Zoitl Date: Thu, 5 Sep 2024 10:11:22 +0200 Subject: [PATCH] Renamed helper class for SWTBot UI Tests #377 Rename helper class PinNamesHelper to UITestPinHelper to be consistent with the helper class UITestNamesHelper Addresses https://github.com/eclipse-4diac/4diac-ide/issues/377 --- .../ui/fbtype/BasicFBTOperationTests.java | 52 ++++++------ .../ide/test/ui/fbtype/ECCEditorTests.java | 28 +++---- .../ui/fbtype/EventInOutputsTabTests.java | 8 +- .../ui/fbtype/VarInAndOutputsTabTests.java | 8 +- ...nNamesHelper.java => UITestPinHelper.java} | 2 +- .../basicfb/Basic1FBNetworkEditingTests.java | 84 +++++++++---------- .../basicfb/Basic2FBNetworkEditingTests.java | 16 ++-- .../CompositeInstanceViewerTests.java | 12 +-- .../subapp_compsite/SubapplicationTests.java | 26 +++--- 9 files changed, 118 insertions(+), 118 deletions(-) rename tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/{PinNamesHelper.java => UITestPinHelper.java} (98%) diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/BasicFBTOperationTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/BasicFBTOperationTests.java index ab39c94fb2..2faa6ff3da 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/BasicFBTOperationTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/BasicFBTOperationTests.java @@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotConnection; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFBType; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -80,7 +80,7 @@ public void resetEnvironment() { public void createNewEventInput() { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - assertNotNull(editor.getEditPart(PinNamesHelper.EI1)); + assertNotNull(editor.getEditPart(UITestPinHelper.EI1)); } /** @@ -95,7 +95,7 @@ public void createNewEventInput() { public void createNewEventOutput() { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); editor.clickContextMenu(UITestNamesHelper.CREATE_OUTPUT_EVENT); - assertNotNull(editor.getEditPart(PinNamesHelper.EO1)); + assertNotNull(editor.getEditPart(UITestPinHelper.EO1)); } /** @@ -109,12 +109,12 @@ public void createNewEventOutput() { */ @SuppressWarnings("static-method") @ParameterizedTest - @ValueSource(strings = { PinNamesHelper.INT }) + @ValueSource(strings = { UITestPinHelper.INT }) public void createNewDataInput(final String dataType) { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); assertNotNull(editor); editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(dataType); - assertNotNull(editor.getEditPart(PinNamesHelper.DI1)); + assertNotNull(editor.getEditPart(UITestPinHelper.DI1)); } /** @@ -132,15 +132,15 @@ public void renamePin() { assertNotNull(editor); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - assertNotNull(editor.getEditPart(PinNamesHelper.EI1)); + assertNotNull(editor.getEditPart(UITestPinHelper.EI1)); - final SWTBotGefEditPart pin = editor.getEditPart(PinNamesHelper.EI1); + final SWTBotGefEditPart pin = editor.getEditPart(UITestPinHelper.EI1); pin.click(); final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.EVENT); propertiesBot.textWithLabel(UITestNamesHelper.NAME_LABEL).setText(UITestNamesHelper.EVENT); - assertNull(editor.getEditPart(PinNamesHelper.EI1)); + assertNull(editor.getEditPart(UITestPinHelper.EI1)); assertNotNull(editor.getEditPart(UITestNamesHelper.EVENT)); } @@ -158,7 +158,7 @@ public void changeEventPinComment() { assertNotNull(editor); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - final SWTBotGefEditPart pin = editor.getEditPart(PinNamesHelper.EI1); + final SWTBotGefEditPart pin = editor.getEditPart(UITestPinHelper.EI1); pin.click(); final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.EVENT); @@ -182,7 +182,7 @@ public void changeDataPinComment() { assertNotNull(editor); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - final SWTBotGefEditPart pin = editor.getEditPart(PinNamesHelper.EI1); + final SWTBotGefEditPart pin = editor.getEditPart(UITestPinHelper.EI1); pin.click(); final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.DATA); @@ -205,18 +205,18 @@ public void changeDataPinComment() { public void addConnection() { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(PinNamesHelper.INT); + editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(UITestPinHelper.INT); - assertNotNull(editor.getEditPart(PinNamesHelper.DI1)); + assertNotNull(editor.getEditPart(UITestPinHelper.DI1)); - final SWTBotGefEditPart inputPin = editor.getEditPart(PinNamesHelper.EI1); + final SWTBotGefEditPart inputPin = editor.getEditPart(UITestPinHelper.EI1); inputPin.click(); - final SWTBotGefEditPart outputPin = editor.getEditPart(PinNamesHelper.DI1); + final SWTBotGefEditPart outputPin = editor.getEditPart(UITestPinHelper.DI1); outputPin.click(); final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor); + connect.createConnectionWithinFBTypeWithPropertySheet(UITestPinHelper.DI1, UITestPinHelper.EI1, editor); } /** @@ -232,19 +232,19 @@ public void addConnection() { public void removeConnection() { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); editor.clickContextMenu(UITestNamesHelper.CREATE_INPUT_EVENT); - editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(PinNamesHelper.INT); + editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(UITestPinHelper.INT); - assertNotNull(editor.getEditPart(PinNamesHelper.DI1)); + assertNotNull(editor.getEditPart(UITestPinHelper.DI1)); - final SWTBotGefEditPart inputPin = editor.getEditPart(PinNamesHelper.EI1); + final SWTBotGefEditPart inputPin = editor.getEditPart(UITestPinHelper.EI1); inputPin.click(); - final SWTBotGefEditPart outputPin = editor.getEditPart(PinNamesHelper.DI1); + final SWTBotGefEditPart outputPin = editor.getEditPart(UITestPinHelper.DI1); outputPin.click(); final SWTBotConnection connect = new SWTBotConnection(bot); - connect.createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor); - connect.removeConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor); + connect.createConnectionWithinFBTypeWithPropertySheet(UITestPinHelper.DI1, UITestPinHelper.EI1, editor); + connect.removeConnectionWithinFBTypeWithPropertySheet(UITestPinHelper.DI1, UITestPinHelper.EI1, editor); } /** @@ -261,13 +261,13 @@ public void removeConnection() { public void changePinDataType() { final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2); assertNotNull(editor); - editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(PinNamesHelper.INT); + editor.clickContextMenu(UITestNamesHelper.CREATE_DATA_INPUT).clickContextMenu(UITestPinHelper.INT); - final SWTBotGefEditPart port = editor.getEditPart(PinNamesHelper.DI1); + final SWTBotGefEditPart port = editor.getEditPart(UITestPinHelper.DI1); port.click(); SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.DATA); - propertiesBot.table().select(PinNamesHelper.INT); + propertiesBot.table().select(UITestPinHelper.INT); propertiesBot.button(UITestNamesHelper.DOT_BUTTON).click(); final SWTBotShell shell = bot.shell(UITestNamesHelper.TYPE_SELECTION); @@ -275,13 +275,13 @@ public void changePinDataType() { final SWTBotTree containerTree = bot.tree(); final SWTBotTreeItem containerItem = containerTree.getTreeItem(UITestNamesHelper.ELEMENTARY_TYPE); - containerItem.expand().select(PinNamesHelper.ANY); + containerItem.expand().select(UITestPinHelper.ANY); bot.button(UITestNamesHelper.OK).click(); propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.DATA); - assertTrue(propertiesBot.tableWithLabel(UITestNamesHelper.TYPE_LABEL).containsText(PinNamesHelper.ANY)); + assertTrue(propertiesBot.tableWithLabel(UITestNamesHelper.TYPE_LABEL).containsText(UITestPinHelper.ANY)); } } diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/ECCEditorTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/ECCEditorTests.java index 1b741d0b29..ced29c5a5f 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/ECCEditorTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/ECCEditorTests.java @@ -17,7 +17,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFBType; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefEditor; @@ -189,7 +189,7 @@ public void changeConditionEvent() { @Order(9) public void changeECTransitionConditionExpression() { final SWTBotGefEditPart part = editor - .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QI + "]"); + .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QI + "]"); editor.select(part); final SWTBot propertiesBot = selectTabFromECCProperties(UITestNamesHelper.TRANSITION); assertNotNull(propertiesBot); @@ -197,13 +197,13 @@ public void changeECTransitionConditionExpression() { propertiesBot.ccomboBoxWithLabel(UITestNamesHelper.CONDITION_LABEL).setSelection(UITestNamesHelper.REQ); propertiesBot.styledTextWithLabel(UITestNamesHelper.CONDITION_LABEL) - .setText(UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO); + .setText(UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO); assertEquals(propertiesBot.styledTextWithLabel(UITestNamesHelper.CONDITION_LABEL).getText(), - UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO); + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO); assertNull(editor - .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QI + "]")); + .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QI + "]")); assertNotNull(editor - .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO + "]")); + .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO + "]")); } @@ -216,7 +216,7 @@ public void changeECTransitionConditionExpression() { @Order(10) public void changeECTransitionComment() { final SWTBotGefEditPart part = editor - .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO + "]"); + .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO + "]"); editor.select(part); final SWTBot propertiesBot = selectTabFromECCProperties(UITestNamesHelper.TRANSITION); assertNotNull(propertiesBot); @@ -280,7 +280,7 @@ public void tryToSetInvalidName() { public void tryToInvalidECTransitionConditionExpression() { // Select the EC transition part final SWTBotGefEditPart part = editor - .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO + "]"); + .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO + "]"); editor.select(part); // Access the Transition tab and set an invalid condition @@ -288,17 +288,17 @@ public void tryToInvalidECTransitionConditionExpression() { assertNotNull(propertiesBot); propertiesBot.ccomboBoxWithLabel(UITestNamesHelper.CONDITION_LABEL).setSelection(UITestNamesHelper.INIT); propertiesBot.styledTextWithLabel(UITestNamesHelper.CONDITION_LABEL) - .setText(UITestNamesHelper.TRUE + " = " + PinNamesHelper.AB); + .setText(UITestNamesHelper.TRUE + " = " + UITestPinHelper.AB); // Validate the new condition expression assertEquals(propertiesBot.styledTextWithLabel(UITestNamesHelper.CONDITION_LABEL).getText(), - UITestNamesHelper.TRUE + " = " + PinNamesHelper.AB); + UITestNamesHelper.TRUE + " = " + UITestPinHelper.AB); // Verify that the transition part is correctly updated assertNull(editor - .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.QO + "]")); + .getEditPart(UITestNamesHelper.REQ + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.QO + "]")); assertNotNull(editor - .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.AB + "]")); + .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.AB + "]")); } /** @@ -378,7 +378,7 @@ public void changeEventWithTable() { public void deleteTransition() { // Select the transition part and focus on it final SWTBotGefEditPart part = editor - .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.AB + "]"); + .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.AB + "]"); editor.select(part); assertNotNull(part); @@ -389,7 +389,7 @@ public void deleteTransition() { // Verify that the transition part is successfully deleted assertNull(editor - .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + PinNamesHelper.AB + "]")); + .getEditPart(UITestNamesHelper.INIT + "[" + UITestNamesHelper.TRUE + " = " + UITestPinHelper.AB + "]")); } /** diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/EventInOutputsTabTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/EventInOutputsTabTests.java index fe0f9f95a7..19734cc31c 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/EventInOutputsTabTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/EventInOutputsTabTests.java @@ -15,7 +15,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.PropertySheetHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFBType; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -32,9 +32,9 @@ public class EventInOutputsTabTests extends NatTableWithEditorBehaviorTests { @Override @BeforeEach public void operationsInitialization() { - TESTVAR1 = PinNamesHelper.EI1; - TESTVAR2 = PinNamesHelper.EI2; - TESTVAR3 = PinNamesHelper.EI3; + TESTVAR1 = UITestPinHelper.EI1; + TESTVAR2 = UITestPinHelper.EI2; + TESTVAR3 = UITestPinHelper.EI3; final SWTBotFBType fbTypeBot = new SWTBotFBType(bot); fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.ADAPTER); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/VarInAndOutputsTabTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/VarInAndOutputsTabTests.java index 1c3a6daf94..d33c1f1133 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/VarInAndOutputsTabTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/fbtype/VarInAndOutputsTabTests.java @@ -16,7 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import org.eclipse.fordiac.ide.model.datatype.helper.RetainHelper.RetainTag; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.PropertySheetHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFBType; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -33,9 +33,9 @@ public class VarInAndOutputsTabTests extends NatTableWithEditorBehaviorTests { @Override @BeforeEach public void operationsInitialization() { - TESTVAR1 = PinNamesHelper.DI1; - TESTVAR2 = PinNamesHelper.DI2; - TESTVAR3 = PinNamesHelper.DI3; + TESTVAR1 = UITestPinHelper.DI1; + TESTVAR2 = UITestPinHelper.DI2; + TESTVAR3 = UITestPinHelper.DI3; final SWTBotFBType fbTypeBot = new SWTBotFBType(bot); fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.ADAPTER); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/PinNamesHelper.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/UITestPinHelper.java similarity index 98% rename from tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/PinNamesHelper.java rename to tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/UITestPinHelper.java index 58fbaaa8dc..1ff343e3f3 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/PinNamesHelper.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/helpers/UITestPinHelper.java @@ -16,7 +16,7 @@ package org.eclipse.fordiac.ide.test.ui.helpers; -public final class PinNamesHelper { +public final class UITestPinHelper { // FB pins and values in alphabetical order and length diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic1FBNetworkEditingTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic1FBNetworkEditingTests.java index b2cda51b79..dffae14324 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic1FBNetworkEditingTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic1FBNetworkEditingTests.java @@ -29,7 +29,7 @@ import org.eclipse.fordiac.ide.application.editparts.InstanceNameEditPart; import org.eclipse.fordiac.ide.application.figures.InstanceNameFigure; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotConnection; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFB; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -309,13 +309,13 @@ public void editDTofECycle() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(200, 200)); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editor); - editor.getEditPart(PinNamesHelper.DEF_VAL); - editor.doubleClick(PinNamesHelper.DEF_VAL); + editor.getEditPart(UITestPinHelper.DEF_VAL); + editor.doubleClick(UITestPinHelper.DEF_VAL); final SWTBotEclipseEditor e = editor.toTextEditor(); assertNotNull(e); - e.setText(PinNamesHelper.NEW_VAL); + e.setText(UITestPinHelper.NEW_VAL); e.save(); - assertNotNull(editor.getEditPart(PinNamesHelper.NEW_VAL)); + assertNotNull(editor.getEditPart(UITestPinHelper.NEW_VAL)); } /** @@ -331,11 +331,11 @@ public void directEditorDefaultValueTest() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(200, 100)); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editor); - editor.getEditPart(PinNamesHelper.DEF_VAL); - editor.doubleClick(PinNamesHelper.DEF_VAL); + editor.getEditPart(UITestPinHelper.DEF_VAL); + editor.doubleClick(UITestPinHelper.DEF_VAL); final SWTBotEclipseEditor e = editor.toTextEditor(); assertNotNull(e); - assertEquals(PinNamesHelper.DEF_VAL, e.getText()); + assertEquals(UITestPinHelper.DEF_VAL, e.getText()); e.save(); } @@ -352,15 +352,15 @@ public void directEditorNewValueTest() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(200, 100)); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); assertNotNull(editor); - editor.getEditPart(PinNamesHelper.DEF_VAL); - editor.doubleClick(PinNamesHelper.DEF_VAL); + editor.getEditPart(UITestPinHelper.DEF_VAL); + editor.doubleClick(UITestPinHelper.DEF_VAL); final SWTBotEclipseEditor e = editor.toTextEditor(); assertNotNull(e); - e.setText(PinNamesHelper.NEW_VAL); + e.setText(UITestPinHelper.NEW_VAL); e.save(); - editor.getEditPart(PinNamesHelper.NEW_VAL); - editor.doubleClick(PinNamesHelper.NEW_VAL); - assertEquals(PinNamesHelper.NEW_VAL, editor.toTextEditor().getText()); + editor.getEditPart(UITestPinHelper.NEW_VAL); + editor.doubleClick(UITestPinHelper.NEW_VAL); + assertEquals(UITestPinHelper.NEW_VAL, editor.toTextEditor().getText()); } /** @@ -420,7 +420,7 @@ public void validConnectionBetweenEventInputPinAndEventOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, new Point(200, 200)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.EO); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.EO); assertDoesNotThrow(viewer::waitForConnection); } @@ -439,7 +439,7 @@ public void validConnectionBetweenEventOutputPinAndEventInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.START); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO1, UITestPinHelper.START); assertDoesNotThrow(viewer::waitForConnection); } @@ -458,7 +458,7 @@ public void validConnectionBetweenUintDataInputPinAndUintDataOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(150, 150)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.PV, PinNamesHelper.CV); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.PV, UITestPinHelper.CV); assertDoesNotThrow(viewer::waitForConnection); } @@ -477,7 +477,7 @@ public void validConnectionBetweenBoolInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(150, 150)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.D, PinNamesHelper.Q); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.D, UITestPinHelper.Q); assertDoesNotThrow(viewer::waitForConnection); } @@ -492,8 +492,8 @@ public void connectionCanBeFoundAfterMovingFB() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, pos1); final SWTBotConnection connectBot = new SWTBotConnection(bot); - connectBot.createConnection(PinNamesHelper.INIT, PinNamesHelper.CLKO); - connectBot.createConnection(PinNamesHelper.N, PinNamesHelper.CV); + connectBot.createConnection(UITestPinHelper.INIT, UITestPinHelper.CLKO); + connectBot.createConnection(UITestPinHelper.N, UITestPinHelper.CV); final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); final SWTBot4diacGefViewer viewer = (SWTBot4diacGefViewer) editor.getSWTBotGefViewer(); @@ -502,8 +502,8 @@ public void connectionCanBeFoundAfterMovingFB() { assertNotNull(canvas); canvas.setFocus(); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.CLKO, UITestPinHelper.INIT)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.CV, UITestPinHelper.N)); assertNotNull(editor); assertNotNull(editor.getEditPart(UITestNamesHelper.E_TABLE_CTRL_FB)); @@ -535,8 +535,8 @@ public void connectionCanBeFoundAfterMovingFB() { assertEquals(posToCheck2.x, fbBounds.x); assertEquals(posToCheck2.y, fbBounds.y); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CLKO, PinNamesHelper.INIT)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.CV, PinNamesHelper.N)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.CLKO, UITestPinHelper.INIT)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.CV, UITestPinHelper.N)); } /** @@ -555,7 +555,7 @@ public void invalidConnectionBetweenEventInputPinAndEventInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.STOP); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -575,7 +575,7 @@ public void invalidConnectionBetweenEventInputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(150, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.N); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -595,7 +595,7 @@ public void invalidConnectionBetweenEventInputPinAndTimeInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(150, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.DT); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.DT); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -615,7 +615,7 @@ public void invalidConnectionBetweenEventInputPinAndBoolInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(150, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLK, PinNamesHelper.D); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.CLK, UITestPinHelper.D); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -635,7 +635,7 @@ public void invalidConnectionBetweenEventInputPinAndUintOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 150)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CD, PinNamesHelper.CV); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.CD, UITestPinHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -655,7 +655,7 @@ public void invalidConnectionBetweenEventInputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.INIT, PinNamesHelper.DTO); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.INIT, UITestPinHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -675,7 +675,7 @@ public void invalidConnectionBetweenEventInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 150)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CD, PinNamesHelper.QU); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.CD, UITestPinHelper.QU); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -695,7 +695,7 @@ public void invalidConnectionBetweenTimeInputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.DT, PinNamesHelper.DTO); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.DT, UITestPinHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -715,7 +715,7 @@ public void invalidConnectionBetweenTimeInputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.DT, PinNamesHelper.N); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.DT, UITestPinHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -735,7 +735,7 @@ public void invalidConnectionBetweenUintInputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.PV, PinNamesHelper.QU); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.PV, UITestPinHelper.QU); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -755,7 +755,7 @@ public void invalidConnectionBetweenEventOutputPinAndUintInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.N); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO0, UITestPinHelper.N); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -775,7 +775,7 @@ public void invalidConnectionBetweenEventOutputPinAndTimeInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.DT); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO1, UITestPinHelper.DT); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -795,7 +795,7 @@ public void invalidConnectionBetweenEventOutputPinAndBoolInputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.D); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO, UITestPinHelper.D); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -815,7 +815,7 @@ public void invalidConnectionBetweenEventOutputPinAndEventOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.EO2); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO0, UITestPinHelper.EO2); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -835,7 +835,7 @@ public void invalidConnectionBetweenEventOutputPinAndUintOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLKO, PinNamesHelper.CV); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.CLKO, UITestPinHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -855,7 +855,7 @@ public void invalidConnectionBetweenEventOutputPinAndTimeOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_TABLE_CTRL_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.CLKO, PinNamesHelper.DTO); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.CLKO, UITestPinHelper.DTO); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -875,7 +875,7 @@ public void invalidConnectionBetweenEventOutputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_D_FF_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.Q); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO, UITestPinHelper.Q); assertThrows(TimeoutException.class, viewer::waitForConnection); } @@ -895,7 +895,7 @@ public void invalidConnectionBetweenBoolOutputPinAndBoolOutputPin() { final SWTBotFB fbBot = new SWTBotFB(bot); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, new Point(100, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.QU, PinNamesHelper.QD); + final SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.QU, UITestPinHelper.QD); assertThrows(TimeoutException.class, viewer::waitForConnection); } diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic2FBNetworkEditingTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic2FBNetworkEditingTests.java index 1190f98bc7..7539f95ad9 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic2FBNetworkEditingTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/basicfb/Basic2FBNetworkEditingTests.java @@ -25,7 +25,7 @@ import org.eclipse.draw2d.PolylineConnection; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotConnection; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFB; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -299,8 +299,8 @@ public void checkIfConnectionRemainsAfterMoving1FB() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CYCLE_TREE_ITEM, pos1); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_DEMUX_TREE_ITEM, new Point(300, 50)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); - final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO, PinNamesHelper.EI); + connectBot.createConnection(UITestPinHelper.EO, UITestPinHelper.EI); + final ConnectionEditPart connection = connectBot.findConnection(UITestPinHelper.EO, UITestPinHelper.EI); assertNotNull(connection); // select E_CYCLE @@ -360,8 +360,8 @@ public void checkIfConnectionRemainsAfterMovingBothFBsOneAfterAnother() { final Point pos2 = new Point(175, 125); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_CTUD_TREE_ITEM, pos2); final SWTBotConnection connectBot = new SWTBotConnection(bot); - connectBot.createConnection(PinNamesHelper.QU, PinNamesHelper.G); - final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.QU, PinNamesHelper.G); + connectBot.createConnection(UITestPinHelper.QU, UITestPinHelper.G); + final ConnectionEditPart connection = connectBot.findConnection(UITestPinHelper.QU, UITestPinHelper.G); assertNotNull(connection); // select E_SELECT @@ -439,8 +439,8 @@ public void checkIfConnectionRemainsAfterMovingBothFBsTogether() { final Point pos2 = new Point(100, 275); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, pos2); final SWTBotConnection connectBot = new SWTBotConnection(bot); - connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R); - ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); + connectBot.createConnection(UITestPinHelper.EO1, UITestPinHelper.R); + ConnectionEditPart connection = connectBot.findConnection(UITestPinHelper.EO1, UITestPinHelper.R); assertNotNull(connection); final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); @@ -473,7 +473,7 @@ public void checkIfConnectionRemainsAfterMovingBothFBsTogether() { final int translationY = pointTo.y - pointFrom.y; // check if connection has been moved - connection = connectBot.findConnection(PinNamesHelper.EO1, PinNamesHelper.R); + connection = connectBot.findConnection(UITestPinHelper.EO1, UITestPinHelper.R); assertNotNull(connection); final org.eclipse.draw2d.geometry.Point newStartPointConnection = polyLineConnection.getPoints() .getFirstPoint(); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/CompositeInstanceViewerTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/CompositeInstanceViewerTests.java index b4cca644e9..810aa0fe1e 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/CompositeInstanceViewerTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/CompositeInstanceViewerTests.java @@ -27,7 +27,7 @@ import org.eclipse.fordiac.ide.fbtypeeditor.network.viewer.CompositeInstanceViewer; import org.eclipse.fordiac.ide.model.ui.editors.AbstractBreadCrumbEditor; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotConnection; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFB; import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper; @@ -194,13 +194,13 @@ public void compositeInstanceViewerConnectionCanBeAdded() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_N_TABLE_TREE_ITEM, new Point(200, 200)); goToCompositeInstanceViewer(UITestNamesHelper.E_N_TABLE_FB); final SWTBotConnection connectBot = new SWTBotConnection(bot); - SWTBot4diacGefViewer viewer = connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI); + SWTBot4diacGefViewer viewer = connectBot.createConnection(UITestPinHelper.EO, UITestPinHelper.EI); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connectBot.createConnection(PinNamesHelper.N, PinNamesHelper.CV); + viewer = connectBot.createConnection(UITestPinHelper.N, UITestPinHelper.CV); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.STOP); + viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.STOP); assertThrows(TimeoutException.class, viewer::waitForConnection); - viewer = connectBot.createConnection(PinNamesHelper.START, PinNamesHelper.EO0); + viewer = connectBot.createConnection(UITestPinHelper.START, UITestPinHelper.EO0); assertThrows(TimeoutException.class, viewer::waitForConnection); returnToEditingArea(); } @@ -218,7 +218,7 @@ public void compositeInstanceViewerDeleteConnection() { final SWTBotGefEditor editor = bot.gefEditor(UITestNamesHelper.PROJECT_NAME); final SWTBot4diacGefViewer viewer = (SWTBot4diacGefViewer) editor.getSWTBotGefViewer(); final SWTBotConnection connectBot = new SWTBotConnection(bot); - final ConnectionEditPart connection = connectBot.findConnection(PinNamesHelper.EO, PinNamesHelper.REQ); + final ConnectionEditPart connection = connectBot.findConnection(UITestPinHelper.EO, UITestPinHelper.REQ); final PolylineConnection figure = (PolylineConnection) connection.getFigure(); final PointList points = figure.getPoints(); final org.eclipse.draw2d.geometry.Point firstPoint = points.getFirstPoint(); diff --git a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/SubapplicationTests.java b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/SubapplicationTests.java index 5a40131c80..cd0976861a 100644 --- a/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/SubapplicationTests.java +++ b/tests/org.eclipse.fordiac.ide.test.ui/src/org/eclipse/fordiac/ide/test/ui/networkediting/subapp_compsite/SubapplicationTests.java @@ -22,7 +22,7 @@ import org.eclipse.fordiac.ide.model.ui.editors.HandlerHelper; import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests; -import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper; +import org.eclipse.fordiac.ide.test.ui.helpers.UITestPinHelper; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotConnection; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFB; import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotSubapp; @@ -101,9 +101,9 @@ public void createSubappViaMenuWithConnectionBetweenFBs() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SWITCH_TREE_ITEM, new Point(100, 100)); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, new Point(300, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - assertNotNull(connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); - assertNotNull(connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); - assertNotNull(connectBot.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); + assertNotNull(connectBot.createConnection(UITestPinHelper.EO0, UITestPinHelper.S)); + assertNotNull(connectBot.createConnection(UITestPinHelper.EO1, UITestPinHelper.R)); + assertNotNull(connectBot.createConnection(UITestPinHelper.Q, UITestPinHelper.G)); // drag rectangle over to FB, therefore FB should be selected final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.PROJECT_NAME); @@ -117,9 +117,9 @@ public void createSubappViaMenuWithConnectionBetweenFBs() { assertEquals(5, selectedEditParts.size()); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SWITCH_FB)); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SR_FB)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO0, PinNamesHelper.S)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO1, PinNamesHelper.R)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.Q, PinNamesHelper.G)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.EO0, UITestPinHelper.S)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.EO1, UITestPinHelper.R)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.Q, UITestPinHelper.G)); bot.menu(UITestNamesHelper.SOURCE).menu(UITestNamesHelper.NEW_SUBAPPLICATION).click(); // renew list of selectedEditParts and then check if SubApp was created @@ -146,7 +146,7 @@ public void createSubappViaMenuWithExistingConnectionOutsideSubapp() { fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SWITCH_TREE_ITEM, new Point(300, 100)); fbBot.dragAndDropEventsFB(UITestNamesHelper.E_SR_TREE_ITEM, new Point(500, 100)); final SWTBotConnection connectBot = new SWTBotConnection(bot); - assertNotNull(connectBot.createConnection(PinNamesHelper.EO, PinNamesHelper.EI)); + assertNotNull(connectBot.createConnection(UITestPinHelper.EO, UITestPinHelper.EI)); // drag rectangle over to FBs E_SWITCH and E_SR, therefore FBs should be // selected @@ -159,7 +159,7 @@ public void createSubappViaMenuWithExistingConnectionOutsideSubapp() { assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SWITCH_FB)); assertTrue(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_SR_FB)); assertFalse(fbBot.isFbSelected(selectedEditParts, UITestNamesHelper.E_CYCLE_TREE_ITEM)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EI)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.EO, UITestPinHelper.EI)); bot.menu(UITestNamesHelper.SOURCE).menu(UITestNamesHelper.NEW_SUBAPPLICATION).click(); // renew list of selectedEditParts and then check if SubApp was created @@ -167,7 +167,7 @@ public void createSubappViaMenuWithExistingConnectionOutsideSubapp() { assertEquals(1, selectedEditParts.size()); final SWTBotSubapp subappBot = new SWTBotSubapp(bot); assertTrue(subappBot.isSubappSelected(selectedEditParts, UITestNamesHelper.SUBAPP)); - assertTrue(connectBot.checkIfConnectionCanBeFound(PinNamesHelper.EO, PinNamesHelper.EO)); + assertTrue(connectBot.checkIfConnectionCanBeFound(UITestPinHelper.EO, UITestPinHelper.EO)); } /** @@ -200,9 +200,9 @@ public void createSubappViaMenuThenCreatingConnection() { // in UI thread. Without this, the connections are not created correctly UIThreadRunnable.syncExec(() -> HandlerHelper.selectEditPart(viewer.getGraphicalViewer(), editPart.part())); final SWTBotConnection connectBot = new SWTBotConnection(bot); - assertNotNull(connectBot.createConnection(PinNamesHelper.EO0, PinNamesHelper.S)); - assertNotNull(connectBot.createConnection(PinNamesHelper.EO1, PinNamesHelper.R)); - assertNotNull(connectBot.createConnection(PinNamesHelper.Q, PinNamesHelper.G)); + assertNotNull(connectBot.createConnection(UITestPinHelper.EO0, UITestPinHelper.S)); + assertNotNull(connectBot.createConnection(UITestPinHelper.EO1, UITestPinHelper.R)); + assertNotNull(connectBot.createConnection(UITestPinHelper.Q, UITestPinHelper.G)); } }