diff --git a/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestTriage.java b/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestTriage.java index 135a9de6..cd7c9676 100644 --- a/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestTriage.java +++ b/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestTriage.java @@ -85,15 +85,11 @@ public void testTriage() throws TimeoutException { // wait for button to be enabled _bot.waitUntil(triageButtonEnabled); - - - // check the first result is again the selected one after the revert - - //assertEquals(resultName, getFirstToVerifyResultNode().getText()); // since the order of the list changes, we need to make sure that the changed result is in HIGH -> TO_VERIFY nodes - List stateResults = getStateResultNodes("TO_VERIFY").stream().map(element -> (element.split(" ")[0] +" " +element.split(" ")[1]).trim()).collect(Collectors.toList()); - assertTrue(stateResults.contains(resultName)); + // split(" ")[0] provides the initial part of the name, which is the query id, both in the group and in resultName + List stateResults = getStateResultNodes("TO_VERIFY").stream().map(element -> (element.split(" ")[0]).trim()).collect(Collectors.toList()); + assertTrue(String.format("%s - %s", stateResults.toString(), resultName), stateResults.contains(resultName.split(" ")[0])); // open changes tab SWTBotTabItem changesTab = _bot.tabItemWithId(PluginConstants.CHANGES_TAB_ID); changesTab.activate(); diff --git a/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestUI.java b/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestUI.java index 6fd78c7d..0fa3fb31 100644 --- a/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestUI.java +++ b/checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/TestUI.java @@ -93,7 +93,7 @@ public void testMissingSetCheckmarxServerUrl() throws TimeoutException { sleep(); // After a sleep the missing Server Url message must be displayed - assertEquals(ERROR_SERVER_URL_NOT_SET, _bot.tree().cell(0, 0)); + assertEquals( _bot.tree().cell(0, 0), ERROR_SERVER_URL_NOT_SET, _bot.tree().cell(0, 0)); // Close Checkmarx AST Scan view _bot.viewByTitle(VIEW_CHECKMARX_AST_SCAN).close(); diff --git a/checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/views/DataProvider.java b/checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/views/DataProvider.java index 042919b9..18a1f845 100644 --- a/checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/views/DataProvider.java +++ b/checkmarx-ast-eclipse-plugin/src/com/checkmarx/eclipse/views/DataProvider.java @@ -467,7 +467,7 @@ private List groupByQueryName(List vulnerabilities){ Map> filteredByQueryName = new HashMap<>(); for (DisplayModel vulnerability : vulnerabilities) { - String queryName = vulnerability.getName(); + String queryName = vulnerability.getQueryName(); if (filteredByQueryName.containsKey(queryName)) { filteredByQueryName.get(queryName).add(vulnerability); } else {