Skip to content

Commit

Permalink
Continuation of the UI test architecture change (#443)
Browse files Browse the repository at this point in the history
* Created class SWTBotSystemExplorer #377

Due to the architecture restructuring, the new class
SWTBotSystemExplorer was created. Affected classes were changed to use
this change.

Addresses #377

* Added SWTBotConnection helper class #377

- Created helper class SWTBotConnection
- Relocated all methods related to connections from Abstract4diacUITests
to SWTBotConnections
- Refactored the tests using these methods

Addresses #377

* Added SWTBotSubapp helper class #377

- Created helper class SWTBotSubapp
- Relocated all methods related to subapplications from
Abstract4diacUITests to SWTBotSubapp
- Refactored the tests using these methods

Addresses #377

* Added SWTBotFB helper class #377

- Created helper class SWTBotFB
- Relocated all methods related to FBs from Abstract4diacUITests
to SWTBotFB
- Adapted the tests using these methods

Addresses #377

* Renamed variables from objects of supporting Bots #377

Renamed some variables from objects of supporting Bots with clearer
names to prevent misunderstanding and misinterpretation.

Addresses #377

* Created sub-packages for a clearer structure of the UI tests  #377

Created several sub-packages in org.eclipse.fordiac.ide.test.ui for a
clearer structure of the UI tests.
- created sub-package networking.basicfb
- created sub-package networking.contextmenu
- created sub-package networking.errormarker
- created sub-package networking.subapp_composite

Furthermore, the thematically matching tests have been moved to the
newly created packages.

Addresses #377

* Added SWTBotFBType helper class #377

- Created helper class SWTBotFBType
- Relocated all methods related to FB Types from
Abstract4diacUITests to SWTBotFBType
- Refactored the tests using these methods

Addresses #377

* Fixed static accesses of methods and fields of the supporting bots #377

The incorrect static access to methods and static fields has been
removed and the corresponding suppression annotations

Addresses #377

* Fixed typo in Test #377

Fixed a typo of a wrong pin name so that the test runs correctly and
corresponds to the Javadoc.

Addresses #377
  • Loading branch information
Andrearium authored Sep 12, 2024
1 parent 8d05d93 commit 8fdd299
Show file tree
Hide file tree
Showing 28 changed files with 1,283 additions and 978 deletions.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.eclipse.fordiac.ide.test.ui.PropertySheetHelper;
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;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
import org.eclipse.nebula.widgets.nattable.NatTable;
Expand All @@ -38,9 +39,10 @@ public void operationsInitialization() {
TESTVAR1 = UITestNamesHelper.ATTRIBUTE1;
TESTVAR2 = UITestNamesHelper.ATTRIBUTE2;
TESTVAR3 = UITestNamesHelper.ATTRIBUTE3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.TEMPLATEBASIC);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.ATTRIBUTES);
assertNotNull(propertiesBot);
bot.viewByTitle(UITestNamesHelper.PROPERTIES_TITLE).setFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

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.SWTBotConnection;
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;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart;
Expand All @@ -46,8 +48,10 @@ public class BasicFBTOperationTests extends Abstract4diacUITests {
@SuppressWarnings("static-method")
@BeforeEach
public void operationsInitialization() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.ADAPTER);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.ADAPTER);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
}

/**
Expand All @@ -61,7 +65,7 @@ public void operationsInitialization() {
@SuppressWarnings("static-method")
@AfterEach
public void resetEnvironment() {
deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
new SWTBotFBType(bot).deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
}

/**
Expand Down Expand Up @@ -91,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.EI1));
assertNotNull(editor.getEditPart(PinNamesHelper.EO1));
}

/**
Expand Down Expand Up @@ -196,7 +200,7 @@ public void changeDataPinComment() {
* select the property sheet's tabs properly, then click on checkbox to create
* with connection.
*/
@SuppressWarnings("static-method")
@SuppressWarnings({ "static-method", "static-access" })
@Test
public void addConnection() {
final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2);
Expand All @@ -211,7 +215,8 @@ public void addConnection() {
final SWTBotGefEditPart outputPin = editor.getEditPart(PinNamesHelper.DI1);
outputPin.click();

createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);
final SWTBotConnection connect = new SWTBotConnection(bot);
connect.createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);
}

/**
Expand All @@ -222,7 +227,7 @@ public void addConnection() {
* select the property sheet's tabs properly, then click on checkbox to remove
* with connection.
*/
@SuppressWarnings("static-method")
@SuppressWarnings({ "static-method", "static-access" })
@Test
public void removeConnection() {
final SWTBot4diacGefEditor editor = (SWTBot4diacGefEditor) bot.gefEditor(UITestNamesHelper.FBT_TEST_PROJECT2);
Expand All @@ -237,9 +242,9 @@ public void removeConnection() {
final SWTBotGefEditPart outputPin = editor.getEditPart(PinNamesHelper.DI1);
outputPin.click();

createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);

removeConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);
final SWTBotConnection connect = new SWTBotConnection(bot);
connect.createConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);
connect.removeConnectionWithinFBTypeWithPropertySheet(PinNamesHelper.DI1, PinNamesHelper.EI1, editor);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.eclipse.fordiac.ide.test.ui.PropertySheetHelper;
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;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
import org.eclipse.nebula.widgets.nattable.NatTable;
Expand All @@ -30,9 +31,10 @@ public void operationsInitialization() {
TESTVAR1 = UITestNamesHelper.INTERNALCONSTVAR1;
TESTVAR2 = UITestNamesHelper.INTERNALCONSTVAR2;
TESTVAR3 = UITestNamesHelper.INTERNALCONSTVAR3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.TEMPLATEBASIC);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.CONSTANTS);
assertNotNull(propertiesBot);
bot.viewByTitle(UITestNamesHelper.PROPERTIES_TITLE).setFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.List;

import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests;
import org.eclipse.fordiac.ide.test.ui.helpers.SWTBotFBType;
import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
Expand Down Expand Up @@ -87,7 +88,7 @@ public void createNewFBTypeWithoutPackage() {
parentItem.expand();
final SWTBotTreeItem projectItem = parentItem.getNode(UITestNamesHelper.FBT_TEST_PROJECT1);
assertEquals(projectItem.getText(), UITestNamesHelper.FBT_TEST_PROJECT1);
deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT1);
new SWTBotFBType(bot).deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT1);
}

/**
Expand Down Expand Up @@ -149,7 +150,7 @@ public void createNewFBTypeWithPackage() {
parentItem.expand();
final SWTBotTreeItem projectItem = parentItem.getNode(UITestNamesHelper.FBT_TEST_PROJECT2);
assertEquals(projectItem.getText(), UITestNamesHelper.FBT_TEST_PROJECT2);
deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
new SWTBotFBType(bot).deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
}

/**
Expand Down Expand Up @@ -202,7 +203,8 @@ public void tryToCreateFBTypeWithForbiddenName() {
@SuppressWarnings("static-method")
@Test
public void tryToCreateANewFBTypeWithExistingName() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT3, UITestNamesHelper.ADAPTER);
new SWTBotFBType(bot).createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT3,
UITestNamesHelper.ADAPTER);
bot.menu(UITestNamesHelper.FILE).menu(UITestNamesHelper.NEW).menu(UITestNamesHelper.TYPE_PROJECT).click();
final SWTBotShell shell = bot.shell(UITestNamesHelper.NEW_TYPE);
shell.activate();
Expand All @@ -222,7 +224,8 @@ public void tryToCreateANewFBTypeWithExistingName() {
@SuppressWarnings("static-method")
@Test
public void deleteExistingFBType() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT4, UITestNamesHelper.ADAPTER);
new SWTBotFBType(bot).createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT4,
UITestNamesHelper.ADAPTER);
final SWTBotView systemExplorerView = bot.viewById(UITestNamesHelper.SYSTEM_EXPLORER_ID);
systemExplorerView.show();
final Composite systemExplorerComposite = (Composite) systemExplorerView.getWidget();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*******************************************************************************/
package org.eclipse.fordiac.ide.test.ui.fbtype;

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.SWTBot4diacNatTable;
import org.eclipse.nebula.widgets.nattable.NatTable;
Expand All @@ -28,8 +29,12 @@ public void operationsInitialization() {
TESTVAR1 = UITestNamesHelper.VAR1;
TESTVAR2 = UITestNamesHelper.VAR2;
TESTVAR3 = UITestNamesHelper.VAR3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.STRUCT);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);

final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.STRUCT);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);

final Composite tableComposite = (Composite) bot.editorByTitle(UITestNamesHelper.FBT_TEST_PROJECT2).getWidget();
natTable = bot.widget(WidgetMatcherFactory.widgetOfType(NatTable.class), tableComposite);
natTableBot = new SWTBot4diacNatTable(natTable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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.SWTBotFBType;
import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefEditor;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefViewer;
Expand Down Expand Up @@ -45,9 +46,10 @@ public class ECCEditorTests extends Abstract4diacUITests {
*/
@BeforeAll
public static void initialization() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.TEMPLATEBASIC);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotCTabItem eccTab = bot.cTabItem(UITestNamesHelper.ECC);
eccTab.activate();
eccTab.setFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.eclipse.fordiac.ide.test.ui.PropertySheetHelper;
import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper;
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;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefEditor;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
Expand All @@ -34,8 +35,10 @@ public void operationsInitialization() {
TESTVAR1 = PinNamesHelper.EI1;
TESTVAR2 = PinNamesHelper.EI2;
TESTVAR3 = PinNamesHelper.EI3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.ADAPTER);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.ADAPTER);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.EVENT_IN_AND_OUTPUTS);
assertNotNull(propertiesBot);
bot.viewByTitle(UITestNamesHelper.PROPERTIES_TITLE).setFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import org.eclipse.fordiac.ide.test.ui.PropertySheetHelper;
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;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
import org.eclipse.nebula.widgets.nattable.NatTable;
Expand All @@ -34,9 +35,10 @@ public void operationsInitialization() {
TESTVAR1 = UITestNamesHelper.INTERNALFB1;
TESTVAR2 = UITestNamesHelper.INTERNALFB2;
TESTVAR3 = UITestNamesHelper.INTERNALFB3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.TEMPLATEBASIC);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.FUNCTIONAL__BLOCKS);
assertNotNull(propertiesBot);
bot.viewByTitle(UITestNamesHelper.PROPERTIES_TITLE).setFocus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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.SWTBotFBType;
import org.eclipse.fordiac.ide.test.ui.helpers.UITestNamesHelper;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefEditor;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
Expand Down Expand Up @@ -46,8 +47,10 @@ public abstract class NatTableWithEditorBehaviorTests extends Abstract4diacUITes
@SuppressWarnings("static-method")
@BeforeEach
public void operationsInitialization() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.STRUCT);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.STRUCT);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final Composite tableComposite = (Composite) bot.editorByTitle(UITestNamesHelper.FBT_TEST_PROJECT2).getWidget();
natTable = bot.widget(WidgetMatcherFactory.widgetOfType(NatTable.class), tableComposite);
natTableBot = new SWTBot4diacNatTable(natTable);
Expand All @@ -64,7 +67,7 @@ public void operationsInitialization() {
@SuppressWarnings("static-method")
@AfterEach
public void resetEnvironment() {
deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
new SWTBotFBType(bot).deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package org.eclipse.fordiac.ide.test.ui.fbtype;

import org.eclipse.fordiac.ide.test.ui.Abstract4diacUITests;
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.SWTBot4diacNatTable;
import org.eclipse.nebula.widgets.nattable.NatTable;
Expand Down Expand Up @@ -41,8 +42,10 @@ public class NatTableWithoutEditorBehaviorTests extends Abstract4diacUITests {
@SuppressWarnings("static-method")
@BeforeEach
public void operationsInitialization() {
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.STRUCT);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.STRUCT);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final Composite inputComposite = (Composite) bot.editorByTitle(UITestNamesHelper.FBT_TEST_PROJECT2).getWidget();
natTable = bot.widget(WidgetMatcherFactory.widgetOfType(NatTable.class), inputComposite);
natTableBot = new SWTBot4diacNatTable(natTable);
Expand All @@ -60,7 +63,8 @@ public void operationsInitialization() {
@SuppressWarnings("static-method")
@AfterEach
public void resetEnvironment() {
deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.deleteFBType(UITestNamesHelper.FBT_TEST_PROJECT2);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
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.PropertySheetHelper;
import org.eclipse.fordiac.ide.test.ui.helpers.PinNamesHelper;
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;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacGefEditor;
import org.eclipse.fordiac.ide.test.ui.swtbot.SWTBot4diacNatTable;
Expand All @@ -35,8 +36,10 @@ public void operationsInitialization() {
TESTVAR1 = PinNamesHelper.DI1;
TESTVAR2 = PinNamesHelper.DI2;
TESTVAR3 = PinNamesHelper.DI3;
createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2, UITestNamesHelper.ADAPTER);
openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBotFBType fbTypeBot = new SWTBotFBType(bot);
fbTypeBot.createFBType(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2,
UITestNamesHelper.ADAPTER);
fbTypeBot.openFBTypeInEditor(UITestNamesHelper.PROJECT_NAME, UITestNamesHelper.FBT_TEST_PROJECT2);
final SWTBot propertiesBot = selectTabFromInterfaceProperties(UITestNamesHelper.VAR_IN_AND_OUTPUTS);
assertNotNull(propertiesBot);
bot.viewByTitle(UITestNamesHelper.PROPERTIES_TITLE).setFocus();
Expand Down
Loading

0 comments on commit 8fdd299

Please sign in to comment.