diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json deleted file mode 100644 index 1d7e62b5b26..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-test.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "version": 1, - "expressWorkflow": [{ - "expressProcess": { - "id": "f5da82a8ed4f437d95b477e9746d9a75", - "processName": "Leave request creation", - "processDescription": "Leave request creation description", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "7f0cac61d68346babbebe1e703c578cb", - "processID": "f5da82a8ed4f437d95b477e9746d9a75", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "b9d14eba257c40b8b3e628d5defa5479", - "processID": "f5da82a8ed4f437d95b477e9746d9a75", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - }, { - "expressProcess": { - "id": "c3939e7508144f94a03dc71c8054570c", - "processName": "Quality Report", - "processDescription": "Quality Report description", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "209f65e4e7344d2ca7d46e0cb39f70b6", - "processID": "c3939e7508144f94a03dc71c8054570c", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "4a23be65f8bf4dbb97f0d126a146bfb0", - "processID": "c3939e7508144f94a03dc71c8054570c", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - }, { - "expressProcess": { - "id": "c8166c0a53144adc9eaa1df9c2902f04", - "processName": "Express Test 1", - "processDescription": "Express Test 1", - "processType": "AHWF", - "processPermissions": ["#admin"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e172808e-edd2-4457-8169-f6a48c70bc43", - "readyToExecute": true, - "processCoOwners": ["#admin"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "69cd5fe6730842d394e9025b2b58b56d", - "processID": "c8166c0a53144adc9eaa1df9c2902f04", - "type": "USER_TASK", - "responsibles": ["#admin"], - "subject": "Express Task 1", - "description": "", - "taskPosition": 1, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "269bbeb00a7143c18753e3dc87a273b8", - "processID": "c8166c0a53144adc9eaa1df9c2902f04", - "elementID": "Test label2019-12-27 11:08:16", - "taskPosition": 1, - "label": "Test Label", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - } - ] -} \ No newline at end of file diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json deleted file mode 100644 index 837fcba4636..00000000000 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/express-wf-with-disabled-user.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "version": 1, - "expressWorkflow": [{ - "expressProcess": { - "id": "1aa339cba44148c8a7215b840b0911b4", - "processName": "Test disabled user", - "processDescription": "Test disabled user", - "processType": "AHWF", - "processPermissions": ["#visibility_test_user", "#demo"], - "processOwner": "#admin", - "isUseDefaultUI": false, - "processFolder": "e26cfb17-4fdd-405c-9aed-4dbfdd7eefe1", - "readyToExecute": true, - "processCoOwners": ["#admin", "#visibility_test_user"], - "isAbleToEdit": true - }, - "expressTaskDefinitions": [{ - "id": "3a059f99084d488a99a8992157589d1c", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "type": "USER_TASK", - "responsibles": ["#visibility_test_user", "#demo"], - "subject": "Task 1 - Test disabled user", - "description": "", - "taskPosition": 1, - "untilDays": 1 - }, { - "id": "4491316e17e947be86ce02ed1e91ba9a", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "type": "USER_TASK", - "responsibles": ["#visibility_test_user"], - "subject": "Task 2 - Test disabled user", - "description": "", - "taskPosition": 2, - "untilDays": 1 - } - ], - "expressFormElements": [{ - "id": "b8dba0d41b1a4290b9f125a29fa2f4f5", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "elementID": "Hello2020-06-01 04:45:15", - "taskPosition": 1, - "label": "Hello", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "LEFTPANEL", - "indexInPanel": 0, - "counter": 0 - }, { - "id": "fb18bb0bf7f2400b949f244fea1bbfc0", - "processID": "1aa339cba44148c8a7215b840b0911b4", - "elementID": "Test 22020-06-01 04:45:27", - "taskPosition": 2, - "label": "Test 2", - "required": false, - "intSetting": 0, - "elementType": "InputFieldText", - "optionStrs": [""], - "elementPosition": "HEADER", - "indexInPanel": 0, - "counter": 0 - } - ] - } - ] -} diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java index 14b8f91053e..a0823b3c476 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/Variable.java @@ -32,8 +32,7 @@ public enum Variable { DISPLAY_USERS_OF_TASK_ACTIVATOR("Portal.DisplayUsersOfRole"), ANNOUNCEMENT("Portal.Announcement"), TASK_ANALYSIS_FILTER("Portal.TaskAnalysisFilters"), THIRD_PARTY_APP("Portal.ThirdPartyApplications"), STATISTIC_CHART("Portal.StatisticCharts"), EXTERNAL_LINK("Portal.Processes.ExternalLinks"), - EXPRESS_PROCESS("Portal.Processes.ExpressProcesses"), TASK_COLUMN("Portal.Tasks.TaskColumn"), - TASK_FILTER("Portal.Tasks.TaskFilters"), + TASK_COLUMN("Portal.Tasks.TaskColumn"), TASK_FILTER("Portal.Tasks.TaskFilters"), TASK_BEHAVIOUR_WHEN_CLICKING_ON_LINE_IN_TASK_LIST("Portal.Tasks.BehaviourWhenClickingOnLineInTaskList"), TASK_DETAIL("Portal.TaskDetails"), CASE_COLUMN("Portal.Cases.CaseColumn"), CASE_FILTER("Portal.Cases.CaseFilters"), CASE_DETAIL("Portal.CaseDetails"), SHOW_AVATAR("Portal.ShowAvatar"), diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java index a07214807b2..16659e1eb8f 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/SearchResultPage.java @@ -1,20 +1,13 @@ package com.axonivy.portal.selenium.page; import static com.codeborne.selenide.Selenide.$; -import static com.codeborne.selenide.Selenide.$$; import org.openqa.selenium.By; -import org.openqa.selenium.WebElement; import com.codeborne.selenide.SelenideElement; public class SearchResultPage extends TemplatePage { - private final String INFO_EXPRESS_WORKFlOW = "span[id$='info-workflow']"; - private final String EDIT_EXPRESS_WORKFlOW = "a[id$='edit-express-workflow']"; - private final String DELETE_EXPRESS_WORKFlOW = "a[id$='delete-express-workflow']"; - private final String EXPRESS_PROCESS_LOGO = "span[id$='express-process-logo']"; - @Override protected String getLoadedLocator() { return "[id$='search-results-tabview']"; @@ -84,56 +77,6 @@ private ProcessWidgetPage getProcessWidget() { return new ProcessWidgetPage("search-results-tabview:process-results"); } - public boolean isInfoWorkflowIcon() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement icon = $(".express-workflow").$(".process-image-view-icon"); - return icon.getAttribute("class").contains("si si si-startup-launch"); - } - - WebElement element = findElementByCssSelector(INFO_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-information-circle"); - } - - public boolean isEditExpressWorkflow(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:edit-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(EDIT_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-graphic-tablet-drawing-pen"); - } - - private SelenideElement getImageProcessActionMenuPanel(String processName) { - var selectedProcess = $$("span.process-image-view-name").asFixedIterable().stream() - .filter(process -> processName.equalsIgnoreCase(process.getText())).findFirst().orElse(null); - var processActionMenuId = selectedProcess.getAttribute(ID_PROPERTY).replace("process-item-name", ""); - processActionMenuId = processActionMenuId.concat("process-item:image-process-action-component:process-action-menu"); - return findElementByCssSelector(String.format("div[id$='%s']", processActionMenuId)); - } - - public boolean isDeleteExpressWorkflown(String processName) { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - SelenideElement actionMenu = getImageProcessActionMenuPanel(processName); - SelenideElement icon = actionMenu.$("a[id$=':image-process-action-component:delete-process']"); - return icon != null; - } - SelenideElement element = findElementByCssSelector(DELETE_EXPRESS_WORKFlOW); - return element.getAttribute("class").contains("si-bin-1"); - } - - public boolean isExpressProcessLogo() { - ProcessWidgetPage processWidget = getProcessWidget(); - if (processWidget.isImageModeActivated()) { - return isInfoWorkflowIcon(); - } - SelenideElement element = findElementByCssSelector(EXPRESS_PROCESS_LOGO); - return element.getAttribute("class").contains("si-startup-launch"); - } - public boolean isTaskCategoryColumnDisplayed() { return findElementByCssSelector("span[id$=':task-category-cell']").isDisplayed(); } @@ -147,8 +90,4 @@ public void waitForFirstTabFinishedLoading() { waitForElementDisplayed(By.className("js-loading-process-list"), false); waitForElementDisplayed(By.className("js-process-start-list-container"), true); } - - public void clickOnActionButton(String processName) { - $(".express-workflow").$("button[id$=':process-action-button']").shouldBe(getClickableCondition()).click(); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java index bd4f0661c52..8decec7d22d 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java @@ -28,6 +28,7 @@ public class DashboardProcessWidgetTest extends BaseTest { private static final String YOUR_PROCESSES = "Your Processes"; private static final String EXPRESS_PROCESS = "EXPRESS_PROCESS"; + private static final String EXTERNAL_LINK = "EXTERNAL_LINK"; private static final String CASE_LEAVE_REQUEST_TEST_FOR_IVYPORTAL_3369 = "Case: Leave Request Test For IVYPORTAL-3369"; private static final String TASK_SICK_LEAVE_REQUEST = "Task: Sick Leave Request"; @@ -530,7 +531,7 @@ public void testFilterCompactModeProcessFilterProcessNameWhenExpanded() { public void testFilterCompactModeProcessFilterProcessType() { newDashboardPage.checkCompactModeProcessDisplayedProcessItem(CREATE_INVESTMENT_IFRAME); - newDashboardPage.applyFilterCompactModeProcessProcessType(EXPRESS_PROCESS); + newDashboardPage.applyFilterCompactModeProcessProcessType(EXTERNAL_LINK); newDashboardPage.checkCompactModeProcessDisappearedProcessItem(CREATE_INVESTMENT_IFRAME); } @@ -540,7 +541,7 @@ public void testFilterCompactModeProcessFilterProcessTypeWhenExpanded() { newDashboardPage.checkCompactModeProcessDisplayedProcessItem(CREATE_INVESTMENT_IFRAME); newDashboardPage.expandCompactModeProcess(); - newDashboardPage.applyFilterCompactModeProcessProcessTypeWhenExpanded(EXPRESS_PROCESS); + newDashboardPage.applyFilterCompactModeProcessProcessTypeWhenExpanded(EXTERNAL_LINK); newDashboardPage.checkCompactModeProcessDisappearedProcessItem(CREATE_INVESTMENT_IFRAME); } diff --git a/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json b/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json deleted file mode 100644 index 0637a088a01..00000000000 --- a/AxonIvyPortal/portal/config/variables/Portal/Processes/ExpressProcesses.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file