mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF-3321] Create an automated test for the Share knowledge functionality (#3623)
This commit is contained in:
parent
4b79160162
commit
29abd0e22c
@ -48,7 +48,7 @@ describe('Attachment list action menu for tasks', () => {
|
|||||||
name: resources.Files.ADF_DOCUMENTS.PNG.file_name
|
name: resources.Files.ADF_DOCUMENTS.PNG.file_name
|
||||||
});
|
});
|
||||||
let downloadedPngFile = path.join(__dirname, 'downloads', pngFile.name);
|
let downloadedPngFile = path.join(__dirname, 'downloads', pngFile.name);
|
||||||
let tenantId, appId;
|
let tenantId, appId, relatedContent, relatedContentId;
|
||||||
let taskName = {
|
let taskName = {
|
||||||
active: 'Active Task',
|
active: 'Active Task',
|
||||||
completed: 'Completed Task',
|
completed: 'Completed Task',
|
||||||
@ -175,4 +175,36 @@ describe('Attachment list action menu for tasks', () => {
|
|||||||
attachmentListPage.checkEmptyAttachmentList();
|
attachmentListPage.checkEmptyAttachmentList();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('[C260234] Should be able to attache a file on a task on APS and check on ADF', () => {
|
||||||
|
browser.controlFlow().execute(async() => {
|
||||||
|
let newTask = await this.alfrescoJsApi.activiti.taskApi.createNewTask({name: "SHARE KNOWLEDGE"});
|
||||||
|
|
||||||
|
let newTaskId = newTask.id;
|
||||||
|
|
||||||
|
let filePath = path.join(TestConfig.main.rootPath + pngFile.location);
|
||||||
|
|
||||||
|
let file = fs.createReadStream(filePath);
|
||||||
|
|
||||||
|
relatedContent = await this.alfrescoJsApi.activiti.contentApi.createRelatedContentOnTask(newTaskId, file, {'isRelatedContent': true});
|
||||||
|
relatedContentId = relatedContent.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
|
||||||
|
|
||||||
|
taskPage.usingFiltersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
|
||||||
|
taskPage.usingTasksListPage().selectTaskFromTasksList('SHARE KNOWLEDGE');
|
||||||
|
|
||||||
|
attachmentListPage.checkFileIsAttached(pngFile.name);
|
||||||
|
|
||||||
|
browser.controlFlow().execute(async() => {
|
||||||
|
await this.alfrescoJsApi.activiti.contentApi.deleteContent(relatedContentId);
|
||||||
|
});
|
||||||
|
|
||||||
|
processServicesPage.goToProcessServices().goToTaskApp().clickTasksButton();
|
||||||
|
|
||||||
|
taskPage.usingFiltersPage().goToFilter(CONSTANTS.TASKFILTERS.MY_TASKS);
|
||||||
|
taskPage.usingTasksListPage().selectTaskFromTasksList('SHARE KNOWLEDGE');
|
||||||
|
|
||||||
|
attachmentListPage.checkEmptyAttachmentList();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user