From c0194029c7d43b10106299be4e6f767865253141 Mon Sep 17 00:00:00 2001 From: Tomasz Gnyp <49343696+tomgny@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:44:43 +0100 Subject: [PATCH] [AAE-17865] Remove few already covered e2es from ADF (#9078) --- .../process/process-custom-filters.e2e.ts | 45 ----- ...cess-task-attach-content-file-cloud.e2e.ts | 178 ------------------ 2 files changed, 223 deletions(-) delete mode 100644 e2e/process-services-cloud/process/process-task-attach-content-file-cloud.e2e.ts diff --git a/e2e/process-services-cloud/process/process-custom-filters.e2e.ts b/e2e/process-services-cloud/process/process-custom-filters.e2e.ts index edfe057b921..c3b8d604ed8 100644 --- a/e2e/process-services-cloud/process/process-custom-filters.e2e.ts +++ b/e2e/process-services-cloud/process/process-custom-filters.e2e.ts @@ -151,18 +151,6 @@ describe('Process list cloud', () => { await processList.getDataTable().waitTillContentLoaded(); } - it('[C290069] Should display processes ordered by name when Name is selected from sort dropdown', async () => { - await setFilter({ status: PROCESS_STATUS.RUNNING }); - await setFilter({ sort: 'Name' }); - await setFilter({ order: SORT_DIRECTION.ASC }); - - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Name')).toBe(true); - - await setFilter({ order: SORT_DIRECTION.DESC}); - - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Name')).toBe(true); - }); - it('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => { await setFilter({ status: PROCESS_STATUS.RUNNING }); await setFilter({ sort: 'Id'}); @@ -185,39 +173,6 @@ describe('Process list cloud', () => { await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Status')).toBe(true); }); - it('[C305054] Should display processes ordered by started by when Started By is selected from sort dropdown', async () => { - await setFilter({ status: PROCESS_STATUS.ALL }); - await setFilter({ sort: 'Started by' }); - await setFilter({ order: SORT_DIRECTION.ASC }); - - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Started by')).toBe(true); - - await setFilter({ order: SORT_DIRECTION.DESC}); - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Started by')).toBe(true); - }); - - it('[C305054] Should display processes ordered by processdefinitionid date when ProcessDefinitionId is selected from sort dropdown', async () => { - await setFilter({ status: PROCESS_STATUS.ALL }); - await setFilter({ sort: 'ProcessDefinitionId' }); - await setFilter({ order: SORT_DIRECTION.ASC }); - - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Definition Id')).toBe(true); - - await setFilter({ order: SORT_DIRECTION.DESC}); - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Definition Id')).toBe(true); - }); - - it('[C305054] Should display processes ordered by processdefinitionkey date when ProcessDefinitionKey is selected from sort dropdown', async () => { - await setFilter({ status: PROCESS_STATUS.ALL }); - await setFilter({ sort: 'ProcessDefinitionKey' }); - await setFilter({ order: SORT_DIRECTION.ASC }); - - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Definition Key')).toBe(true); - - await setFilter({ order: SORT_DIRECTION.DESC}); - await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Definition Key')).toBe(true); - }); - it('[C305054] Should display processes ordered by last modified date when Last Modified is selected from sort dropdown', async () => { await setFilter({ status: PROCESS_STATUS.ALL }); await setFilter({ sort: 'Last Modified' }); diff --git a/e2e/process-services-cloud/process/process-task-attach-content-file-cloud.e2e.ts b/e2e/process-services-cloud/process/process-task-attach-content-file-cloud.e2e.ts deleted file mode 100644 index a4950d3fb7c..00000000000 --- a/e2e/process-services-cloud/process/process-task-attach-content-file-cloud.e2e.ts +++ /dev/null @@ -1,178 +0,0 @@ -/*! - * @license - * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { browser } from 'protractor'; -import { createApiService, - AppListCloudPage, - ContentNodeSelectorDialogPage, - GroupIdentityService, - IdentityService, - LoginPage, - QueryService, - ProcessCloudWidgetPage, - ProcessDefinitionsService, - ProcessInstancesService, - StringUtil, - TaskFormCloudComponent, - TasksService, - UploadActions, - ViewerPage -} from '@alfresco/adf-testing'; -import { ProcessCloudDemoPage } from './../pages/process-cloud-demo.page'; -import { NavigationBarPage } from '../../core/pages/navigation-bar.page'; -import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page'; -import CONSTANTS = require('../../util/constants'); - -describe('Process Task - Attach content file', () => { - - const loginSSOPage = new LoginPage(); - const navigationBarPage = new NavigationBarPage(); - const appListCloudComponent = new AppListCloudPage(); - - const processCloudDemoPage = new ProcessCloudDemoPage(); - const editProcessFilter = processCloudDemoPage.editProcessFilterCloudComponent(); - const processList = processCloudDemoPage.processListCloudComponent(); - - const tasksCloudDemoPage = new TasksCloudDemoPage(); - const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent; - const taskList = tasksCloudDemoPage.taskListCloudComponent(); - - const taskFormCloudComponent = new TaskFormCloudComponent(); - const processCloudWidget = new ProcessCloudWidgetPage(); - const contentNodeSelectorDialog = new ContentNodeSelectorDialogPage(); - - const apiService = createApiService(); - const uploadActions = new UploadActions(apiService); - const processDefinitionService = new ProcessDefinitionsService(apiService); - const processInstancesService = new ProcessInstancesService(apiService); - const identityService = new IdentityService(apiService); - const groupIdentityService = new GroupIdentityService(apiService); - const queryService = new QueryService(apiService); - const tasksService = new TasksService(apiService); - - const viewerPage = new ViewerPage(); - const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name; - const processDefinitionName = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.uploadSingleMultipleFiles; - const uploadWidgetId = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.uploadSingleMultiple.widgets.contentMultipleAttachFileId; - const taskName = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.tasks.uploadSingleMultipleFiles; - const folderName = StringUtil.generateRandomString(5); - - let uploadedFolder: any; - let processInstance: any; - let testUser: any; - let groupInfo: any; - - const pdfFileOne = { - name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name, - location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path - }; - - const pdfFileTwo = { - name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name, - location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_path - }; - - beforeAll(async () => { - await apiService.loginWithProfile('identityAdmin'); - - testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]); - groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr'); - await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id); - - await apiService.login(testUser.username, testUser.password); - const processDefinition = await processDefinitionService.getProcessDefinitionByName(processDefinitionName, simpleApp); - processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, { name: 'upload process' }); - - const task = await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp); - await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp); - await apiService.login(testUser.username, testUser.password); - uploadedFolder = await uploadActions.createFolder(folderName, '-my-'); - await uploadActions.uploadFile(pdfFileOne.location, pdfFileOne.name, uploadedFolder.entry.id); - await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, uploadedFolder.entry.id); - - await loginSSOPage.login(testUser.username, testUser.password); - await navigationBarPage.navigateToProcessServicesCloudPage(); - await appListCloudComponent.checkApsContainer(); - }); - - afterAll(async () => { - await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id); - await apiService.loginWithProfile('identityAdmin'); - await identityService.deleteIdentityUser(testUser.idIdentityService); - }); - - it('[C311290] Should be able to attach multiple files when widget allows multiple files to be attached from content', async () => { - await appListCloudComponent.checkAppIsDisplayed(simpleApp); - await appListCloudComponent.goToApp(simpleApp); - - await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters(); - await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter(); - await editProcessFilter.openFilter(); - await editProcessFilter.setProcessName('upload process'); - await editProcessFilter.closeFilter(); - await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.RUNNING); - - await processList.checkContentIsDisplayedById(processInstance.entry.id); - await processList.selectRowById(processInstance.entry.id); - await taskList.checkTaskListIsLoaded(); - await taskList.selectRow(taskName); - - await taskFormCloudComponent.formFields().checkFormIsDisplayed(); - await taskFormCloudComponent.formFields().checkWidgetIsVisible(uploadWidgetId); - const contentUploadFileWidget = processCloudWidget.attachFileWidgetCloud(uploadWidgetId); - await contentUploadFileWidget.clickAttachContentFile(uploadWidgetId); - - await contentNodeSelectorDialog.attachFileFromContentNode(folderName, pdfFileOne.name); - await viewAttachedFile(contentUploadFileWidget, pdfFileOne.name); - - await taskFormCloudComponent.formFields().checkWidgetIsVisible(uploadWidgetId); - await contentUploadFileWidget.clickAttachContentFile(uploadWidgetId); - - await contentNodeSelectorDialog.attachFileFromContentNode(folderName, pdfFileTwo.name); - await viewAttachedFile(contentUploadFileWidget, pdfFileTwo.name); - await taskFormCloudComponent.clickCompleteButton(); - - await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks'); - await taskList.checkContentIsNotDisplayedByName(taskName); - - await taskFilter.clickTaskFilter('completed-tasks'); - await taskList.getDataTable().waitTillContentLoaded(); - await taskList.checkContentIsDisplayedByName(taskName); - - await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters(); - await processCloudDemoPage.processFilterCloudComponent.clickCompletedProcessesFilter(); - - await editProcessFilter.openFilter(); - await editProcessFilter.setProcessName('upload process'); - await editProcessFilter.closeFilter(); - - await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.COMPLETED); - await processList.checkContentIsDisplayedById(processInstance.entry.id); - }); - - async function viewAttachedFile(contentUploadWidget: any, fileName: string): Promise { - await contentUploadWidget.checkFileIsAttached(fileName); - await contentUploadWidget.viewFile(fileName); - - await viewerPage.checkToolbarIsDisplayed(); - await viewerPage.checkInfoButtonIsDisplayed(); - await viewerPage.checkDownloadButtonIsDisplayed(); - await viewerPage.checkFileThumbnailIsDisplayed(); - await viewerPage.checkFileNameIsDisplayed(fileName); - await viewerPage.clickCloseButton(); - } -});