mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-3214]Improve process-task-attach-content-file-cloud.e2e.ts (#5948)
* Improve process-task-attach-content-file-cloud.e2e.ts * Exclude this test until the simpleapp zip is merged * Travis is not working
This commit is contained in:
@@ -20,12 +20,16 @@ import {
|
|||||||
ApiService,
|
ApiService,
|
||||||
AppListCloudPage,
|
AppListCloudPage,
|
||||||
ContentNodeSelectorDialogPage,
|
ContentNodeSelectorDialogPage,
|
||||||
|
GroupIdentityService,
|
||||||
|
IdentityService,
|
||||||
LoginPage,
|
LoginPage,
|
||||||
|
QueryService,
|
||||||
ProcessCloudWidgetPage,
|
ProcessCloudWidgetPage,
|
||||||
ProcessDefinitionsService,
|
ProcessDefinitionsService,
|
||||||
ProcessInstancesService,
|
ProcessInstancesService,
|
||||||
StringUtil,
|
StringUtil,
|
||||||
TaskFormCloudComponent,
|
TaskFormCloudComponent,
|
||||||
|
TasksService,
|
||||||
UploadActions,
|
UploadActions,
|
||||||
ViewerPage
|
ViewerPage
|
||||||
} from '@alfresco/adf-testing';
|
} from '@alfresco/adf-testing';
|
||||||
@@ -49,6 +53,10 @@ describe('Process Task - Attach content file', () => {
|
|||||||
const uploadActions = new UploadActions(apiService);
|
const uploadActions = new UploadActions(apiService);
|
||||||
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
const processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processInstancesService = new ProcessInstancesService(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 viewerPage = new ViewerPage();
|
||||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
@@ -59,6 +67,8 @@ describe('Process Task - Attach content file', () => {
|
|||||||
|
|
||||||
let uploadedFolder: any;
|
let uploadedFolder: any;
|
||||||
let processInstance: any;
|
let processInstance: any;
|
||||||
|
let testUser: any;
|
||||||
|
let groupInfo: any;
|
||||||
|
|
||||||
const pdfFileOne = {
|
const pdfFileOne = {
|
||||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||||
@@ -70,20 +80,33 @@ describe('Process Task - Attach content file', () => {
|
|||||||
'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
|
'location': browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async (done) => {
|
beforeAll(async () => {
|
||||||
await apiService.login(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
|
||||||
|
testUser = await identityService.createIdentityUserWithRole( [identityService.ROLES.ACTIVITI_USER]);
|
||||||
|
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
|
||||||
|
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
|
||||||
|
|
||||||
|
await apiService.login(testUser.email, testUser.password);
|
||||||
const processDefinition = await processDefinitionService.getProcessDefinitionByName(processDefinitionName, simpleApp);
|
const processDefinition = await processDefinitionService.getProcessDefinitionByName(processDefinitionName, simpleApp);
|
||||||
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, { name: 'upload process' });
|
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, { name: 'upload process' });
|
||||||
await apiService.getInstance().login(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
|
|
||||||
|
const task = await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp);
|
||||||
|
await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
|
||||||
|
await apiService.getInstance().login(testUser.email, testUser.password);
|
||||||
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
|
||||||
await uploadActions.uploadFile(pdfFileOne.location, pdfFileOne.name, uploadedFolder.entry.id);
|
await uploadActions.uploadFile(pdfFileOne.location, pdfFileOne.name, uploadedFolder.entry.id);
|
||||||
await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, uploadedFolder.entry.id);
|
await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, uploadedFolder.entry.id);
|
||||||
|
|
||||||
await loginSSOPage.login(browser.params.testConfig.hrUser.email, browser.params.testConfig.hrUser.password);
|
await loginSSOPage.login(testUser.email, testUser.password);
|
||||||
await navigationBarPage.navigateToProcessServicesCloudPage();
|
await navigationBarPage.navigateToProcessServicesCloudPage();
|
||||||
await appListCloudComponent.checkApsContainer();
|
await appListCloudComponent.checkApsContainer();
|
||||||
done();
|
});
|
||||||
|
|
||||||
|
afterAll(async () => {
|
||||||
|
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
|
||||||
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
|
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
|
@@ -4,6 +4,7 @@
|
|||||||
"C362240": "Include once ADF starts using ACS 7 , https://issues.alfresco.com/jira/browse/ADF-5182",
|
"C362240": "Include once ADF starts using ACS 7 , https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||||
"C362241": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
"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",
|
"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"
|
"C362265": "Include once ADF starts using ACS 7, https://issues.alfresco.com/jira/browse/ADF-5182",
|
||||||
|
"C311290": "Excluded until simpleapp zip is updated "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user