diff --git a/e2e/process-services-cloud/start-task-form-cloud.e2e.ts b/e2e/process-services-cloud/start-task-form-cloud.e2e.ts index 3a1d6bf5e2..433cf28f3a 100644 --- a/e2e/process-services-cloud/start-task-form-cloud.e2e.ts +++ b/e2e/process-services-cloud/start-task-form-cloud.e2e.ts @@ -36,7 +36,8 @@ import { ContentNodeSelectorDialogPage, ProcessInstancesService, ProcessDefinitionsService, - FileBrowserUtil, ProcessCloudWidgetPage + FileBrowserUtil, ProcessCloudWidgetPage, + QueryService } from '@alfresco/adf-testing'; import { StartProcessCloudConfiguration } from './config/start-process-cloud.config'; import { ProcessCloudDemoPage } from './pages/process-cloud-demo.page'; @@ -66,6 +67,8 @@ describe('Start Task Form', () => { const uploadActions = new UploadActions(apiService); const identityService = new IdentityService(apiService); const groupIdentityService = new GroupIdentityService(apiService); + const queryService = new QueryService(apiService); + const tasksService = new TasksService(apiService); const startProcessCloudConfiguration = new StartProcessCloudConfiguration(); const startProcessCloudConfig = startProcessCloudConfiguration.getConfiguration(); @@ -115,6 +118,8 @@ describe('Start Task Form', () => { 'name': StringUtil.generateRandomString(), 'businessKey': StringUtil.generateRandomString() }); + const task = await queryService.getProcessInstanceTasks(uploadContentFileProcess.entry.id, candidateBaseApp); + await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp); uploadDefaultFileProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, { 'name': StringUtil.generateRandomString(), @@ -148,7 +153,6 @@ describe('Start Task Form', () => { afterAll(async () => { await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id); await apiService.login(testUser.email, testUser.password); - const tasksService = new TasksService(apiService); const standaloneTaskId = await tasksService.getTaskId(standaloneTaskName, candidateBaseApp); await tasksService.deleteTask(standaloneTaskId, candidateBaseApp); @@ -313,18 +317,10 @@ describe('Start Task Form', () => { await processCloudDemoPage.processListCloudComponent().selectRow(uploadContentFileProcess.entry.name); await processDetailsCloudDemoPage.checkTaskIsDisplayed('UploadFileTask'); await processDetailsCloudDemoPage.selectProcessTaskByName('UploadFileTask'); - await taskFormCloudComponent.clickClaimButton(); const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile'); await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile'); - await contentNodeSelectorDialogPage.checkDialogIsDisplayed(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name); - - await contentNodeSelectorDialogPage.clickMoveCopyButton(); - await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed(); + await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name); await contentFileWidget.checkFileIsAttached(testFileModel.name); await contentFileWidget.removeFile(testFileModel.name); @@ -389,15 +385,8 @@ describe('Start Task Form', () => { const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile'); await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile'); - await contentNodeSelectorDialogPage.checkDialogIsDisplayed(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name); - - await contentNodeSelectorDialogPage.clickMoveCopyButton(); - await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed(); + await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name); await contentFileWidget.checkFileIsAttached(testFileModel.name); await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile'); }); @@ -411,14 +400,8 @@ describe('Start Task Form', () => { const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile'); await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile'); - await contentNodeSelectorDialogPage.checkDialogIsDisplayed(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name); - await contentNodeSelectorDialogPage.clickMoveCopyButton(); - await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed(); + await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name); await contentFileWidget.checkFileIsAttached(testFileModel.name); await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile'); @@ -437,13 +420,9 @@ describe('Start Task Form', () => { const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile'); await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile'); - await contentNodeSelectorDialogPage.checkDialogIsDisplayed(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name); - await contentNodeSelectorDialogPage.clickMoveCopyButton(); - await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed(); + + await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name); + await contentFileWidget.checkFileIsAttached(testFileModel.name); await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile'); await taskFormCloudComponent.clickSaveButton(); @@ -463,13 +442,9 @@ describe('Start Task Form', () => { const contentFileWidget = await widget.attachFileWidgetCloud('Attachsinglecontentfile'); await contentFileWidget.clickAttachContentFile('Attachsinglecontentfile'); - await contentNodeSelectorDialogPage.checkDialogIsDisplayed(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().doubleClickRowByContent(folderName); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().waitTillContentLoaded(); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().clickRowByContent(testFileModel.name); - await contentNodeSelectorDialogPage.contentListPage().dataTablePage().checkRowByContentIsSelected(testFileModel.name); - await contentNodeSelectorDialogPage.clickMoveCopyButton(); - await contentNodeSelectorDialogPage.checkDialogIsNotDisplayed(); + + await contentNodeSelectorDialogPage.attachFileFromContentNode(folderName, testFileModel.name); + await contentFileWidget.checkFileIsAttached(testFileModel.name); await contentFileWidget.checkUploadContentButtonIsNotDisplayed('Attachsinglecontentfile'); const taskId = await taskHeaderCloudPage.getId(); diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json index 05c3b07429..4c1f2513ad 100644 --- a/e2e/protractor.excludes.json +++ b/e2e/protractor.excludes.json @@ -5,18 +5,11 @@ "C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182", "C362242": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182", "C362265": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182", - "C311290": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", + "C311287": "https://issues.alfresco.com/jira/browse/AAE-3200", + "C260140": "https://issues.alfresco.com/jira/browse/AAE-3200", + "C261160": "https://issues.alfresco.com/jira/browse/AAE-3200", + "C246534": "https://issues.alfresco.com/jira/browse/AAE-3200", "C310358": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311285": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311287": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311288": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311289": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311292": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311293": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C311295": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C315292": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C260140": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C261160": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177", - "C246534": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177" + "C311290": "Include once process storage services removed, https://issues.alfresco.com/jira/browse/AAE-3177" } diff --git a/e2e/resources/activiti7/candidatebaseapp.zip b/e2e/resources/activiti7/candidatebaseapp.zip index 28e721ec64..cfaaf91ab7 100644 Binary files a/e2e/resources/activiti7/candidatebaseapp.zip and b/e2e/resources/activiti7/candidatebaseapp.zip differ diff --git a/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts b/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts index 2067c238a8..8f223a227f 100644 --- a/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts +++ b/lib/testing/src/lib/content-services/dialog/content-node-selector-dialog.page.ts @@ -101,6 +101,7 @@ export class ContentNodeSelectorDialogPage { async clickContentNodeSelectorResult(name: string): Promise { await this.dataTable.clickRowByContent(name); + await this.dataTable.checkRowByContentIsSelected(name); } async doubleClickContentNodeSelectorResult(name: string): Promise { diff --git a/lib/testing/src/lib/process-services-cloud/pages/form/widget/attach-file-widget-cloud.page.ts b/lib/testing/src/lib/process-services-cloud/pages/form/widget/attach-file-widget-cloud.page.ts index f6d6609233..a96baafef1 100644 --- a/lib/testing/src/lib/process-services-cloud/pages/form/widget/attach-file-widget-cloud.page.ts +++ b/lib/testing/src/lib/process-services-cloud/pages/form/widget/attach-file-widget-cloud.page.ts @@ -35,7 +35,7 @@ export class AttachFileWidgetCloudPage { async attachLocalFile(fileLocation: string): Promise { await browser.setFileDetector(new remote.FileDetector()); - const uploadButton = this.widget.element(by.css(`a input`)); + const uploadButton = element(by.css('adf-upload-button input')); await BrowserVisibility.waitUntilElementIsPresent(uploadButton); await uploadButton.sendKeys(fileLocation); await BrowserVisibility.waitUntilElementIsPresent(uploadButton); @@ -44,8 +44,6 @@ export class AttachFileWidgetCloudPage { async clickAttachContentFile(fileId: string): Promise { const uploadButton = this.widget.element(by.css(`button[id=${fileId}]`)); await BrowserActions.click(uploadButton); - await browser.sleep(1000); - await BrowserActions.clickExecuteScript('button[id="attach-Alfresco Content"]'); } async checkUploadContentButtonIsDisplayed(fileId: string): Promise {