diff --git a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotGradleTest.java b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotGradleTest.java index b381ccce..b9b0edb0 100644 --- a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotGradleTest.java +++ b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotGradleTest.java @@ -15,7 +15,7 @@ import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.context; import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.go; import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.goGlobal; -import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsRunConfigEntriesFromAppRunAs; +import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsDebugConfigEntriesFromMenu; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.enableLibertyTools; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getAppDebugAsMenu; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getAppRunAsMenu; @@ -380,7 +380,7 @@ public void testDashboardStopExternalServer() throws CommandNotFoundException, I public void testDashboardStartWithCustomConfigAction() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path projectPath = Paths.get("resources", "applications", "gradle", "liberty-gradle-test-app"); @@ -417,7 +417,7 @@ public void testDashboardStartWithCustomConfigAction() { public void testDashboardDebugWithCustomConfigAction() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path projectPath = Paths.get("resources", "applications", "gradle", "liberty-gradle-test-app"); @@ -586,7 +586,7 @@ public void testAddingProjectToDashboardManually() throws Exception { public void testStartWithDefaultRunAsConfig() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Start dev mode. launchStartWithDefaultRunConfigFromAppRunAs(GRADLE_APP_NAME); @@ -613,7 +613,7 @@ public void testStartWithDefaultRunAsConfig() { public void testStartWithCustomRunAsConfig() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path projectPath = Paths.get("resources", "applications", "gradle", "liberty-gradle-test-app"); @@ -650,7 +650,7 @@ public void testStartWithCustomRunAsConfig() { public void testRunAsShortcutActions() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path projectPath = Paths.get("resources", "applications", "gradle", "liberty-gradle-test-app"); @@ -698,7 +698,7 @@ public void testRunAsShortcutActions() { @Test public void testStartWithCustomDebugAsConfig() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path projectPath = Paths.get("resources", "applications", "gradle", "liberty-gradle-test-app"); @@ -738,7 +738,7 @@ public void testStartWithCustomDebugAsConfig() { @Test public void testStartWithDebugAsShortcut() { - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Start dev mode. launchStartWithDebugAsShortcut(GRADLE_APP_NAME); @@ -767,7 +767,7 @@ public void testStartWithDebugAsShortcut() { @Test public void testDefaultJRECompliance() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(GRADLE_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); Shell configShell = launchRunConfigurationsDialogFromAppRunAs(GRADLE_APP_NAME); diff --git a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMavenTest.java b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMavenTest.java index b4be2482..82a8430e 100644 --- a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMavenTest.java +++ b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMavenTest.java @@ -15,7 +15,7 @@ import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.context; import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.go; import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.goGlobal; -import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsRunConfigEntriesFromAppRunAs; +import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsDebugConfigEntriesFromMenu; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.enableLibertyTools; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getAppDebugAsMenu; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getAppRunAsMenu; @@ -435,7 +435,7 @@ public void testDashboardDebugAction() { public void testDashboardStartWithCustomConfigAction() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path pathToITReport = Paths.get(projectPath.toString(), "target", "site", "failsafe-report.html"); @@ -471,7 +471,7 @@ public void testDashboardStartWithCustomConfigAction() { public void testDashboardDebugWithCustomConfigAction() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path pathToITReport = Paths.get(projectPath.toString(), "target", "site", "failsafe-report.html"); @@ -558,7 +558,7 @@ public void testDashboardActions() { @Test public void testStartWithDefaultRunAsConfig() { - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Start dev mode. launchStartWithDefaultRunConfigFromAppRunAs(MVN_APP_NAME); @@ -585,7 +585,7 @@ public void testStartWithDefaultRunAsConfig() { @Test public void testStartWithCustomRunAsConfig() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path pathToITReport = Paths.get(projectPath.toString(), "target", "site", "failsafe-report.html"); @@ -618,7 +618,7 @@ public void testStartWithCustomRunAsConfig() { public void testRunAsShortcutActions() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path pathToITReport = Paths.get(projectPath.toString(), "target", "site", "failsafe-report.html"); @@ -669,7 +669,7 @@ public void testRunAsShortcutActions() { @Test public void testStartWithCustomDebugAsConfig() { - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Delete the test report files before we start this test. Path pathToITReport = Paths.get(projectPath.toString(), "target", "site", "failsafe-report.html"); @@ -718,7 +718,7 @@ public void testStartWithCustomDebugAsConfig() { public void testStartWithDebugAsShortcut() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Start dev mode. launchStartWithDebugAsShortcut(MVN_APP_NAME); @@ -839,7 +839,7 @@ public void testStartWithNoWrapperAndPreferencesSet() { @Test public void testDefaultJRECompliance() { // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); Shell configShell = launchRunConfigurationsDialogFromAppRunAs(MVN_APP_NAME); try { diff --git a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMultiModMavenTest.java b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMultiModMavenTest.java index 8050456e..f2fdec01 100644 --- a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMultiModMavenTest.java +++ b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/LibertyPluginSWTBotMultiModMavenTest.java @@ -13,7 +13,7 @@ package io.openliberty.tools.eclipse.test.it; import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.go; -import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsRunConfigEntriesFromAppRunAs; +import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsDebugConfigEntriesFromMenu; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getDashboardContent; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getDashboardItemMenuActions; import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.getLibertyTreeItem; @@ -247,7 +247,7 @@ public void testStartWithDefaultRunAsConfig() { setBuildCmdPathInPreferences(bot, "Maven"); // Delete any previously created configs. - deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME); + deleteLibertyToolsDebugConfigEntriesFromMenu(); // Start dev mode. launchStartWithDefaultRunConfigFromAppRunAs(MVN_APP_NAME); diff --git a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/utils/SWTBotPluginOperations.java b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/utils/SWTBotPluginOperations.java index 227e52e6..1ef39c0e 100644 --- a/tests/src/main/java/io/openliberty/tools/eclipse/test/it/utils/SWTBotPluginOperations.java +++ b/tests/src/main/java/io/openliberty/tools/eclipse/test/it/utils/SWTBotPluginOperations.java @@ -396,32 +396,6 @@ public static SWTBotTreeItem getRemoteJavaAppConfigMenuItem(Shell shell) { return new SWTBotTreeItem((TreeItem)find(LAUNCH_CONFIG_REMOTE_JAVA_APP, shell)); } - /** - * Deletes Liberty run configuration entries. - * - * @param bot The SWTWorkbenchBot instance.. - * @param appName The application name. - */ - public static void deleteLibertyToolsRunConfigEntriesFromAppRunAs(String appName) { - - Shell configShell = launchRunConfigurationsDialogFromAppRunAs(appName); - - try { - SWTBotTreeItem libertyToolsEntry = getLibertyTreeItem(configShell); - - Assertions.assertTrue((libertyToolsEntry != null), () -> "The Liberty entry was not found in run Configurations dialog."); - - List configs = libertyToolsEntry.getNodes(); - - for (String config : configs) { - deleteRunDebugConfigEntry(libertyToolsEntry, config); - } - } finally { - // Close the configuration dialog. - MagicWidgetFinder.go("Close", configShell); - } - } - /** * Deletes Liberty debug configuration entries. *