mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4948] Move the resources config in the process cloud lib - Part 2 (#5143)
* Move the resources in the cloud lib * Use adf cli * Add missing process definitions * Add debug points * Print new class * Use the resources under the adf-testing * Use the resources from testing package * Fix adf-testing bugs * remove empty row * Remove the npm install * Remove log stuff * Remove the console log * Fix typo on process def names Improve the debug e2e command * Fix lowercase name * Check the process cloud env and content env * Add the new process definitions * Add missing process definitions * Use the latest simpleapp * Rollback the bigFile * Use relative link * Trasnpile the adf-testing before using it
This commit is contained in:
committed by
Eugenio Romano
parent
ee5c90871a
commit
941df740d5
@@ -33,7 +33,8 @@ describe('Applications list', () => {
|
|||||||
const navigationBarPage = new NavigationBarPage();
|
const navigationBarPage = new NavigationBarPage();
|
||||||
const settingsPage = new SettingsPage();
|
const settingsPage = new SettingsPage();
|
||||||
const appListCloudPage = new AppListCloudPage();
|
const appListCloudPage = new AppListCloudPage();
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let applicationsService: ApplicationsService;
|
let applicationsService: ApplicationsService;
|
||||||
let testUser;
|
let testUser;
|
||||||
@@ -82,8 +83,8 @@ describe('Applications list', () => {
|
|||||||
await appListCloudPage.checkApsContainer();
|
await appListCloudPage.checkApsContainer();
|
||||||
|
|
||||||
await appListCloudPage.checkAppIsDisplayed(simpleApp);
|
await appListCloudPage.checkAppIsDisplayed(simpleApp);
|
||||||
await appListCloudPage.checkAppIsDisplayed(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name);
|
await appListCloudPage.checkAppIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name);
|
||||||
await appListCloudPage.checkAppIsDisplayed(browser.params.resources.ACTIVITI7_APPS.SUB_PROCESS_APP.name);
|
await appListCloudPage.checkAppIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.SUB_PROCESS_APP.name);
|
||||||
|
|
||||||
await expect(await appListCloudPage.countAllApps()).toEqual(3);
|
await expect(await appListCloudPage.countAllApps()).toEqual(3);
|
||||||
});
|
});
|
||||||
|
@@ -32,7 +32,7 @@ describe('Edit process filters cloud', () => {
|
|||||||
const processCloudDemoPage = new ProcessCloudDemoPage();
|
const processCloudDemoPage = new ProcessCloudDemoPage();
|
||||||
const settingsPage = new SettingsPage();
|
const settingsPage = new SettingsPage();
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
let testUser, groupInfo;
|
let testUser, groupInfo;
|
||||||
|
@@ -43,7 +43,7 @@ describe('Edit task filters cloud', () => {
|
|||||||
let testUser, groupInfo;
|
let testUser, groupInfo;
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const completedTaskName = StringUtil.generateRandomString(),
|
const completedTaskName = StringUtil.generateRandomString(),
|
||||||
assignedTaskName = StringUtil.generateRandomString();
|
assignedTaskName = StringUtil.generateRandomString();
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
|||||||
let queryService: QueryService;
|
let queryService: QueryService;
|
||||||
|
|
||||||
let runningProcessInstance, testUser, groupInfo, tasklist, task;
|
let runningProcessInstance, testUser, groupInfo, tasklist, task;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
@@ -92,7 +92,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the People Single Selection with the Application name filter', async () => {
|
it('[C305041] Should filter the People Single Selection with the Application name filter', async () => {
|
||||||
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
|
await peopleGroupCloudComponentPage.checkPeopleCloudSingleSelectionIsSelected();
|
||||||
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
||||||
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name);
|
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
|
||||||
await peopleCloudComponent.searchAssignee(testUser.firstName);
|
await peopleCloudComponent.searchAssignee(testUser.firstName);
|
||||||
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
|
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
|
||||||
await peopleCloudComponent.selectAssigneeFromList(`${testUser.firstName} ${testUser.lastName}`);
|
await peopleCloudComponent.selectAssigneeFromList(`${testUser.firstName} ${testUser.lastName}`);
|
||||||
@@ -103,7 +103,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the People Multiple Selection with the Application name filter', async () => {
|
it('[C305041] Should filter the People Multiple Selection with the Application name filter', async () => {
|
||||||
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
|
await peopleGroupCloudComponentPage.clickPeopleCloudMultipleSelection();
|
||||||
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
await peopleGroupCloudComponentPage.clickPeopleFilerByApp();
|
||||||
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name);
|
await peopleGroupCloudComponentPage.enterPeopleAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
|
||||||
await peopleCloudComponent.searchAssignee(testUser.firstName);
|
await peopleCloudComponent.searchAssignee(testUser.firstName);
|
||||||
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
|
await peopleCloudComponent.checkUserIsDisplayed(`${testUser.firstName} ${testUser.lastName}`);
|
||||||
await peopleCloudComponent.selectAssigneeFromList(`${testUser.firstName} ${testUser.lastName}`);
|
await peopleCloudComponent.selectAssigneeFromList(`${testUser.firstName} ${testUser.lastName}`);
|
||||||
@@ -121,7 +121,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the Groups Single Selection with the Application name filter', async () => {
|
it('[C305041] Should filter the Groups Single Selection with the Application name filter', async () => {
|
||||||
await peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
|
await peopleGroupCloudComponentPage.clickGroupCloudSingleSelection();
|
||||||
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
||||||
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name);
|
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
|
||||||
await groupCloudComponentPage.searchGroups(hrGroup.name);
|
await groupCloudComponentPage.searchGroups(hrGroup.name);
|
||||||
await groupCloudComponentPage.checkGroupIsDisplayed(hrGroup.name);
|
await groupCloudComponentPage.checkGroupIsDisplayed(hrGroup.name);
|
||||||
await groupCloudComponentPage.selectGroupFromList(hrGroup.name);
|
await groupCloudComponentPage.selectGroupFromList(hrGroup.name);
|
||||||
@@ -131,7 +131,7 @@ describe('People Groups Cloud Component', () => {
|
|||||||
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', async () => {
|
it('[C305041] Should filter the Groups Multiple Selection with the Application name filter', async () => {
|
||||||
await peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
await peopleGroupCloudComponentPage.clickGroupCloudMultipleSelection();
|
||||||
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
await peopleGroupCloudComponentPage.clickGroupFilerByApp();
|
||||||
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name);
|
await peopleGroupCloudComponentPage.enterGroupAppName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name);
|
||||||
await groupCloudComponentPage.searchGroups(testGroup.name);
|
await groupCloudComponentPage.searchGroups(testGroup.name);
|
||||||
await groupCloudComponentPage.checkGroupIsDisplayed(testGroup.name);
|
await groupCloudComponentPage.checkGroupIsDisplayed(testGroup.name);
|
||||||
await groupCloudComponentPage.selectGroupFromList(testGroup.name);
|
await groupCloudComponentPage.selectGroupFromList(testGroup.name);
|
||||||
|
@@ -54,7 +54,7 @@ describe('Process list cloud', () => {
|
|||||||
|
|
||||||
let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps, testUser, groupInfo,
|
let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps, testUser, groupInfo,
|
||||||
anotherProcessInstance;
|
anotherProcessInstance;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
@@ -69,10 +69,10 @@ describe('Process list cloud', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
const anotherProcessDefinition = await processDefinitionService
|
const anotherProcessDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
@@ -59,8 +59,8 @@ describe('Process filters cloud', () => {
|
|||||||
let completedProcess, runningProcessInstance, suspendProcessInstance, testUser, anotherUser, groupInfo,
|
let completedProcess, runningProcessInstance, suspendProcessInstance, testUser, anotherUser, groupInfo,
|
||||||
anotherProcessInstance, processDefinition, anotherProcessDefinition,
|
anotherProcessInstance, processDefinition, anotherProcessDefinition,
|
||||||
differentAppUserProcessInstance, simpleAppProcessDefinition;
|
differentAppUserProcessInstance, simpleAppProcessDefinition;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ describe('Process filters cloud', () => {
|
|||||||
await apiService.login(anotherUser.email, anotherUser.password);
|
await apiService.login(anotherUser.email, anotherUser.password);
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
simpleAppProcessDefinition = await processDefinitionService
|
simpleAppProcessDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
differentAppUserProcessInstance = await processInstancesService.createProcessInstance(simpleAppProcessDefinition.entry.key, simpleApp, {
|
differentAppUserProcessInstance = await processInstancesService.createProcessInstance(simpleAppProcessDefinition.entry.key, simpleApp, {
|
||||||
@@ -88,10 +88,10 @@ describe('Process filters cloud', () => {
|
|||||||
|
|
||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
processDefinition = await processDefinitionService
|
processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
anotherProcessDefinition = await processDefinitionService
|
anotherProcessDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, {
|
runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, {
|
||||||
'name': StringUtil.generateRandomString(),
|
'name': StringUtil.generateRandomString(),
|
||||||
|
@@ -54,7 +54,7 @@ describe('Process filters cloud', () => {
|
|||||||
let queryService: QueryService;
|
let queryService: QueryService;
|
||||||
|
|
||||||
let runningProcess, completedProcess, testUser, groupInfo;
|
let runningProcess, completedProcess, testUser, groupInfo;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password);
|
||||||
@@ -68,7 +68,7 @@ describe('Process filters cloud', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
@@ -40,8 +40,8 @@ describe('Process Header cloud component', () => {
|
|||||||
|
|
||||||
describe('Process Header cloud component', () => {
|
describe('Process Header cloud component', () => {
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const subProcessApp = browser.params.resources.ACTIVITI7_APPS.SUB_PROCESS_APP.name;
|
const subProcessApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SUB_PROCESS_APP.name;
|
||||||
const formatDate = 'MMM D, YYYY';
|
const formatDate = 'MMM D, YYYY';
|
||||||
|
|
||||||
const processHeaderCloudPage = new ProcessHeaderCloudPage();
|
const processHeaderCloudPage = new ProcessHeaderCloudPage();
|
||||||
|
@@ -40,7 +40,7 @@ describe('Process list cloud', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
let testUser, groupInfo, editProcess, deleteProcess;
|
let testUser, groupInfo, editProcess, deleteProcess;
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@@ -55,7 +55,7 @@ describe('Process list cloud', () => {
|
|||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
@@ -45,7 +45,7 @@ describe('Process list cloud', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
let testUser, groupInfo;
|
let testUser, groupInfo;
|
||||||
|
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
let jsonFile;
|
let jsonFile;
|
||||||
let runningProcess;
|
let runningProcess;
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ describe('Process list cloud', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
@@ -40,7 +40,7 @@ describe('Process list cloud', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
let testUser, groupInfo;
|
let testUser, groupInfo;
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
const noOfProcesses = 3;
|
const noOfProcesses = 3;
|
||||||
const processInstances = [];
|
const processInstances = [];
|
||||||
@@ -57,7 +57,7 @@ describe('Process list cloud', () => {
|
|||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
for (let i = 0; i < noOfProcesses; i++) {
|
for (let i = 0; i < noOfProcesses; i++) {
|
||||||
|
@@ -40,7 +40,7 @@ describe('Start Process', () => {
|
|||||||
const processNameBiggerThen255Characters = StringUtil.generateRandomString(256);
|
const processNameBiggerThen255Characters = StringUtil.generateRandomString(256);
|
||||||
const lengthValidationError = 'Length exceeded, 255 characters max.';
|
const lengthValidationError = 'Length exceeded, 255 characters max.';
|
||||||
const requiredError = 'Process Name is required';
|
const requiredError = 'Process Name is required';
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
let testUser, groupInfo;
|
let testUser, groupInfo;
|
||||||
|
@@ -84,7 +84,7 @@ describe('Start Task Form', () => {
|
|||||||
let processInstancesService: ProcessInstancesService;
|
let processInstancesService: ProcessInstancesService;
|
||||||
let processDefinition, uploadLocalFileProcess, uploadContentFileProcess, uploadDefaultFileProcess,
|
let processDefinition, uploadLocalFileProcess, uploadContentFileProcess, uploadDefaultFileProcess,
|
||||||
cancelUploadFileProcess, completeUploadFileProcess;
|
cancelUploadFileProcess, completeUploadFileProcess;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
const pdfFile = new FileModel({ 'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name });
|
const pdfFile = new FileModel({ 'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name });
|
||||||
const pdfFileModel = new FileModel({
|
const pdfFileModel = new FileModel({
|
||||||
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
'name': browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||||
@@ -113,7 +113,7 @@ describe('Start Task Form', () => {
|
|||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
processDefinition = await processDefinitionService
|
processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.uploadFileProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.uploadFileProcess, candidateBaseApp);
|
||||||
|
|
||||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ describe('Start Task Form', () => {
|
|||||||
await tasksCloudDemoPage.openNewTaskForm();
|
await tasksCloudDemoPage.openNewTaskForm();
|
||||||
await startTask.checkFormIsDisplayed();
|
await startTask.checkFormIsDisplayed();
|
||||||
await startTask.addName(standaloneTaskName);
|
await startTask.addName(standaloneTaskName);
|
||||||
await startTask.selectFormDefinition(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
await startTask.selectFormDefinition(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
||||||
await startTask.clickStartButton();
|
await startTask.clickStartButton();
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
|
||||||
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
await tasksCloudDemoPage.taskListCloudComponent().selectRow(standaloneTaskName);
|
||||||
@@ -224,8 +224,8 @@ describe('Start Task Form', () => {
|
|||||||
await tasksCloudDemoPage.openNewTaskForm();
|
await tasksCloudDemoPage.openNewTaskForm();
|
||||||
await startTask.checkFormIsDisplayed();
|
await startTask.checkFormIsDisplayed();
|
||||||
await startTask.checkFormDefinitionIsNotDisplayed('uploadfileform');
|
await startTask.checkFormDefinitionIsNotDisplayed('uploadfileform');
|
||||||
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.starteventform);
|
||||||
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
await startTask.checkFormDefinitionIsDisplayed(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.forms.formtotestvalidations);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -56,7 +56,7 @@ describe('Start Task', () => {
|
|||||||
const requiredError = 'Field required';
|
const requiredError = 'Field required';
|
||||||
const dateValidationError = 'Date format DD/MM/YYYY';
|
const dateValidationError = 'Date format DD/MM/YYYY';
|
||||||
let apsUser, testUser, activitiUser, groupInfo;
|
let apsUser, testUser, activitiUser, groupInfo;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
@@ -50,7 +50,7 @@ describe('Start Task - Group Cloud Component', () => {
|
|||||||
const bothGroupsTaskName = StringUtil.generateRandomString(5);
|
const bothGroupsTaskName = StringUtil.generateRandomString(5);
|
||||||
const oneGroupTaskName = StringUtil.generateRandomString(5);
|
const oneGroupTaskName = StringUtil.generateRandomString(5);
|
||||||
let apsUser, testUser, hrGroup, testGroup;
|
let apsUser, testUser, hrGroup, testGroup;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
@@ -35,7 +35,7 @@ describe('Task filters cloud', () => {
|
|||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
|
|
||||||
const newTask = StringUtil.generateRandomString(5), completedTask = StringUtil.generateRandomString(5);
|
const newTask = StringUtil.generateRandomString(5), completedTask = StringUtil.generateRandomString(5);
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
beforeAll(async() => {
|
beforeAll(async() => {
|
||||||
|
|
||||||
|
@@ -51,8 +51,8 @@ describe('Task form cloud component', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
|
||||||
let completedTask, createdTask, assigneeTask, toBeCompletedTask, formValidationsTask, testUser, formTaskId;
|
let completedTask, createdTask, assigneeTask, toBeCompletedTask, formValidationsTask, testUser, formTaskId;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
|
||||||
@@ -103,13 +103,13 @@ describe('Task form cloud component', () => {
|
|||||||
|
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
||||||
simpleApp, browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.forms.tabVisibilityFields.id);
|
simpleApp, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityFields.id);
|
||||||
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 3; i < 6; i++) {
|
for (let i = 3; i < 6; i++) {
|
||||||
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
visibilityConditionTasks[i] = await tasksService.createStandaloneTaskWithForm(StringUtil.generateRandomString(),
|
||||||
simpleApp, browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.forms.tabVisibilityVars.id);
|
simpleApp, browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.tabVisibilityVars.id);
|
||||||
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
await tasksService.claimTask(visibilityConditionTasks[i].entry.id, simpleApp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ describe('Task form cloud component', () => {
|
|||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
|
|
||||||
let processDefinition = await processDefinitionService
|
let processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateUserProcess, candidateBaseApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.candidateUserProcess, candidateBaseApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||||
|
@@ -35,7 +35,7 @@ describe('Task Header cloud component', () => {
|
|||||||
let completedEndDate;
|
let completedEndDate;
|
||||||
let defaultDate;
|
let defaultDate;
|
||||||
let groupInfo, testUser;
|
let groupInfo, testUser;
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const priority = 30;
|
const priority = 30;
|
||||||
const description = 'descriptionTask';
|
const description = 'descriptionTask';
|
||||||
const formatDate = 'MMM D, YYYY';
|
const formatDate = 'MMM D, YYYY';
|
||||||
|
@@ -41,7 +41,7 @@ describe('Process list cloud', () => {
|
|||||||
let tasksService: TasksService;
|
let tasksService: TasksService;
|
||||||
let testUser, groupInfo, editProcess, deleteProcess, editTask, deleteTask;
|
let testUser, groupInfo, editProcess, deleteProcess, editTask, deleteTask;
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, 'BPM');
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
@@ -56,7 +56,7 @@ describe('Process list cloud', () => {
|
|||||||
await apiService.login(testUser.email, testUser.password);
|
await apiService.login(testUser.email, testUser.password);
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
editProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
@@ -42,8 +42,8 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
const apiService = new ApiService(browser.params.config.oauth2.clientId, browser.params.config.bpmHost, browser.params.config.oauth2.host, browser.params.config.providers);
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const candidateBaseApp = browser.params.resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
const candidateBaseApp = browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.name;
|
||||||
const noTasksFoundMessage = 'No Tasks Found';
|
const noTasksFoundMessage = 'No Tasks Found';
|
||||||
let createdTask, notAssigned, notDisplayedTask, processDefinition, processInstance, priorityTask, subTask,
|
let createdTask, notAssigned, notDisplayedTask, processDefinition, processInstance, priorityTask, subTask,
|
||||||
otherOwnerTask, testUser, groupInfo;
|
otherOwnerTask, testUser, groupInfo;
|
||||||
@@ -83,7 +83,7 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
processDefinition = await processDefinitionService
|
processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
@@ -40,7 +40,7 @@ describe('Task list cloud - selection', () => {
|
|||||||
let identityService: IdentityService;
|
let identityService: IdentityService;
|
||||||
let groupIdentityService: GroupIdentityService;
|
let groupIdentityService: GroupIdentityService;
|
||||||
|
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
const noOfTasks = 3;
|
const noOfTasks = 3;
|
||||||
let response, testUser, groupInfo;
|
let response, testUser, groupInfo;
|
||||||
const tasks = [];
|
const tasks = [];
|
||||||
|
@@ -53,7 +53,7 @@ describe('Task filters cloud', () => {
|
|||||||
const createdTaskName = StringUtil.generateRandomString(),
|
const createdTaskName = StringUtil.generateRandomString(),
|
||||||
completedTaskName = StringUtil.generateRandomString(),
|
completedTaskName = StringUtil.generateRandomString(),
|
||||||
assignedTaskName = StringUtil.generateRandomString(), deletedTaskName = StringUtil.generateRandomString();
|
assignedTaskName = StringUtil.generateRandomString(), deletedTaskName = StringUtil.generateRandomString();
|
||||||
const simpleApp = browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
let assignedTask, deletedTask, testUser, groupInfo;
|
let assignedTask, deletedTask, testUser, groupInfo;
|
||||||
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
|
const orderByNameAndPriority = ['cCreatedTask', 'dCreatedTask', 'eCreatedTask'];
|
||||||
let priority = 30;
|
let priority = 30;
|
||||||
@@ -84,7 +84,7 @@ describe('Task filters cloud', () => {
|
|||||||
|
|
||||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||||
const processDefinition = await processDefinitionService
|
const processDefinition = await processDefinitionService
|
||||||
.getProcessDefinitionByName(browser.params.resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
.getProcessDefinitionByName(browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp);
|
||||||
|
|
||||||
processInstancesService = new ProcessInstancesService(apiService);
|
processInstancesService = new ProcessInstancesService(apiService);
|
||||||
const processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
const processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp);
|
||||||
|
Binary file not shown.
@@ -522,42 +522,3 @@ exports.Files = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.ACTIVITI7_APPS = {
|
|
||||||
CANDIDATE_BASE_APP: {
|
|
||||||
name: "candidatebaseapp",
|
|
||||||
file_location: "/resources/activiti7/candidatebaseapp.zip",
|
|
||||||
processes: {
|
|
||||||
candidateUserProcess: "candidateuserprocess",
|
|
||||||
candidateGroupProcess: "candidategroupprocess",
|
|
||||||
anotherCandidateGroupProcess: "anothercandidategroup",
|
|
||||||
uploadFileProcess: "uploadfileprocess"
|
|
||||||
},
|
|
||||||
forms: {
|
|
||||||
starteventform: "starteventform",
|
|
||||||
formtotestvalidations: "formtotestvalidations"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
SIMPLE_APP: {
|
|
||||||
name: "simpleapp",
|
|
||||||
file_location: "/resources/activiti7/simpleapp.zip",
|
|
||||||
processes: {
|
|
||||||
processwithvariables: "processwithvariables",
|
|
||||||
simpleProcess: "simpleprocess",
|
|
||||||
dropdownrestprocess: "dropdownrestprocess"
|
|
||||||
},
|
|
||||||
forms: {
|
|
||||||
tabVisibilityFields: {
|
|
||||||
name: "tabvisibilitywithfields",
|
|
||||||
id: "form-26b01063-4fb0-455f-b3ba-90172e013678"
|
|
||||||
},
|
|
||||||
tabVisibilityVars: {
|
|
||||||
name: "tabvisibilitywithvars",
|
|
||||||
id: "form-7bf363d2-83c9-4b00-853e-373d0d59963c"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
SUB_PROCESS_APP: {
|
|
||||||
name: "subprocessapp",
|
|
||||||
file_location: "/resources/activiti7/subprocessapp.zip",
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { logging } from '@angular-devkit/core';
|
import { logging } from '@angular-devkit/core';
|
||||||
|
import { ACTIVITI_CLOUD_APPS } from '@alfresco/adf-testing';
|
||||||
|
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
const alfrescoApi = require('@alfresco/js-api');
|
const alfrescoApi = require('@alfresco/js-api');
|
||||||
/* tslint:enable */
|
/* tslint:enable */
|
||||||
@@ -27,59 +29,12 @@ import * as fs from 'fs';
|
|||||||
export interface ConfigArgs {
|
export interface ConfigArgs {
|
||||||
username: string;
|
username: string;
|
||||||
password: string;
|
password: string;
|
||||||
|
clientId: string;
|
||||||
host: string;
|
host: string;
|
||||||
oauth: string;
|
oauth: string;
|
||||||
identityHost: boolean;
|
identityHost: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ACTIVITI_CLOUD_APPS: any = {
|
|
||||||
CANDIDATE_BASE_APP: {
|
|
||||||
name: 'candidatebaseapp',
|
|
||||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/candidatebaseapp.zip?raw=true',
|
|
||||||
processes: {
|
|
||||||
candidateUserProcess: 'candidateUserProcess',
|
|
||||||
candidateGroupProcess: 'candidateGroupProcess',
|
|
||||||
anotherCandidateGroupProcess: 'anotherCandidateGroupProcess',
|
|
||||||
uploadFileProcess: 'uploadFileProcess'
|
|
||||||
},
|
|
||||||
security: [
|
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
SIMPLE_APP: {
|
|
||||||
name: 'simpleapp',
|
|
||||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/simpleapp.zip?raw=true',
|
|
||||||
processes: {
|
|
||||||
processwithvariables: 'processwithvariables',
|
|
||||||
simpleProcess: 'simpleprocess',
|
|
||||||
dropdownrestprocess: 'dropdownrestprocess'
|
|
||||||
},
|
|
||||||
forms: {
|
|
||||||
tabVisibilityFields: {
|
|
||||||
name: 'tabvisibilitywithfields',
|
|
||||||
id: 'form-26b01063-4fb0-455f-b3ba-90172e013678'
|
|
||||||
},
|
|
||||||
tabVisibilityVars: {
|
|
||||||
name: 'tabvisibilitywithvars',
|
|
||||||
id: 'form-7bf363d2-83c9-4b00-853e-373d0d59963c'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
security: [
|
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
SUB_PROCESS_APP: {
|
|
||||||
name: 'subprocessapp',
|
|
||||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/subprocessapp.zip?raw=true',
|
|
||||||
security: [
|
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
|
||||||
{'role': 'APS_USER', 'groups': ['hr', 'testgroup'], 'users': ['hruser']
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
async function getDeployedApplicationsByStatus(args: ConfigArgs, apiService: any, status: string, logger: logging.Logger) {
|
async function getDeployedApplicationsByStatus(args: ConfigArgs, apiService: any, status: string, logger: logging.Logger) {
|
||||||
const url = `${args.host}/deployment-service/v1/applications`;
|
const url = `${args.host}/deployment-service/v1/applications`;
|
||||||
|
|
||||||
@@ -106,7 +61,7 @@ function getAlfrescoJsApiInstance(args: ConfigArgs) {
|
|||||||
authType: 'OAUTH',
|
authType: 'OAUTH',
|
||||||
oauth2: {
|
oauth2: {
|
||||||
host: `${args.oauth}`,
|
host: `${args.oauth}`,
|
||||||
clientId: 'activiti',
|
clientId: `${args.clientId}`,
|
||||||
scope: 'openid',
|
scope: 'openid',
|
||||||
secret: '',
|
secret: '',
|
||||||
implicitFlow: false,
|
implicitFlow: false,
|
||||||
|
@@ -1,23 +1,30 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"declaration": true,
|
"target": "es2018",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"noEmitOnError": true,
|
"sourceMap": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"emitDecoratorMetadata": true,
|
||||||
"noImplicitAny": true,
|
"experimentalDecorators": true,
|
||||||
"noImplicitThis": true,
|
"skipLibCheck": false,
|
||||||
|
"noLib": false,
|
||||||
|
"allowUnreachableCode": false,
|
||||||
|
"allowUnusedLabels": false,
|
||||||
|
"strict": false,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"noImplicitReturns": false,
|
||||||
|
"noImplicitUseStrict": false,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"removeComments": true,
|
||||||
|
"declaration": true,
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
"rootDir": ".",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"strictNullChecks": true,
|
|
||||||
"target": "es2018",
|
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2018"
|
"es2016",
|
||||||
|
"dom"
|
||||||
],
|
],
|
||||||
"baseUrl": ".",
|
"baseUrl": "./",
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types"
|
"./node_modules/@types"
|
||||||
],
|
],
|
||||||
@@ -32,6 +39,5 @@
|
|||||||
"./build.ts",
|
"./build.ts",
|
||||||
"node_modules/**/*",
|
"node_modules/**/*",
|
||||||
"**/node_modules/**/*"
|
"**/node_modules/**/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './lib/process-services-cloud.module';
|
export * from './lib/process-services-cloud.module';
|
||||||
|
|
||||||
export * from './lib/app/public-api';
|
export * from './lib/app/public-api';
|
||||||
export * from './lib/process/public-api';
|
export * from './lib/process/public-api';
|
||||||
export * from './lib/task/public-api';
|
export * from './lib/task/public-api';
|
||||||
|
@@ -18,14 +18,14 @@
|
|||||||
import { StringUtil } from '../utils/string.util';
|
import { StringUtil } from '../utils/string.util';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
const EMAIL_DOMAIN = browser.params.testConfig ? browser.params.testConfig.projectName : 'alfresco';
|
|
||||||
|
|
||||||
export class UserModel {
|
export class UserModel {
|
||||||
|
|
||||||
|
EMAIL_DOMAIN = browser.params.testConfig ? browser.params.testConfig.projectName : 'alfresco';
|
||||||
|
|
||||||
firstName: string = StringUtil.generateRandomString();
|
firstName: string = StringUtil.generateRandomString();
|
||||||
lastName: string = StringUtil.generateRandomString();
|
lastName: string = StringUtil.generateRandomString();
|
||||||
password: string = StringUtil.generateRandomString();
|
password: string = StringUtil.generateRandomString();
|
||||||
email: string = StringUtil.generateRandomEmail(`@${EMAIL_DOMAIN}.com`);
|
email: string = StringUtil.generateRandomEmail(`@${this.EMAIL_DOMAIN}.com`);
|
||||||
username: string = StringUtil.generateRandomString().toLowerCase();
|
username: string = StringUtil.generateRandomString().toLowerCase();
|
||||||
idIdentityService: string;
|
idIdentityService: string;
|
||||||
|
|
||||||
|
@@ -17,51 +17,50 @@
|
|||||||
|
|
||||||
import { browser, by, element, ElementFinder, protractor } from 'protractor';
|
import { browser, by, element, ElementFinder, protractor } from 'protractor';
|
||||||
|
|
||||||
const until = protractor.ExpectedConditions;
|
|
||||||
const DEFAULT_TIMEOUT = global['TestConfig'] ? global['TestConfig'].main.timeout : 40000;
|
const DEFAULT_TIMEOUT = global['TestConfig'] ? global['TestConfig'].main.timeout : 40000;
|
||||||
|
|
||||||
export class BrowserVisibility {
|
export class BrowserVisibility {
|
||||||
|
|
||||||
static async waitUntilElementIsPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementIsPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.presenceOf(elementToCheck), waitTimeout, 'Element is not present ' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.presenceOf(elementToCheck), waitTimeout, 'Element is not present ' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Wait for element to be visible
|
* Wait for element to be visible
|
||||||
*/
|
*/
|
||||||
static async waitUntilElementIsVisible(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT, message: string = 'Element is not visible'): Promise<any> {
|
static async waitUntilElementIsVisible(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT, message: string = 'Element is not visible'): Promise<any> {
|
||||||
return browser.wait(until.visibilityOf(elementToCheck), waitTimeout, message + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.visibilityOf(elementToCheck), waitTimeout, message + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for element to be clickable
|
* Wait for element to be clickable
|
||||||
*/
|
*/
|
||||||
static async waitUntilElementIsClickable(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementIsClickable(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.elementToBeClickable(elementToCheck), waitTimeout, 'Element is not Clickable ' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.elementToBeClickable(elementToCheck), waitTimeout, 'Element is not Clickable ' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for element to not be present on the page
|
* Wait for element to not be present on the page
|
||||||
*/
|
*/
|
||||||
static async waitUntilElementIsStale(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementIsStale(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.stalenessOf(elementToCheck), waitTimeout, 'Element is not in stale ' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.stalenessOf(elementToCheck), waitTimeout, 'Element is not in stale ' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for element to not be visible
|
* Wait for element to not be visible
|
||||||
*/
|
*/
|
||||||
static async waitUntilElementIsNotVisible(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementIsNotVisible(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.invisibilityOf(elementToCheck), waitTimeout, 'Element is Visible and it should not' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.invisibilityOf(elementToCheck), waitTimeout, 'Element is Visible and it should not' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Wait for element to have value
|
* Wait for element to have value
|
||||||
*/
|
*/
|
||||||
static async waitUntilElementHasValue(elementToCheck: ElementFinder, elementValue, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementHasValue(elementToCheck: ElementFinder, elementValue, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.textToBePresentInElementValue(elementToCheck, elementValue), waitTimeout, 'Element doesn\'t have a value ' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.textToBePresentInElementValue(elementToCheck, elementValue), waitTimeout, 'Element doesn\'t have a value ' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
static async waitUntilElementIsNotPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
static async waitUntilElementIsNotPresent(elementToCheck: ElementFinder, waitTimeout: number = DEFAULT_TIMEOUT): Promise<any> {
|
||||||
return browser.wait(until.stalenessOf(elementToCheck), waitTimeout, 'Element is present ' + elementToCheck.locator());
|
return browser.wait(protractor.ExpectedConditions.stalenessOf(elementToCheck), waitTimeout, 'Element is present ' + elementToCheck.locator());
|
||||||
}
|
}
|
||||||
|
|
||||||
static async waitUntilDialogIsClose(): Promise<any> {
|
static async waitUntilDialogIsClose(): Promise<any> {
|
||||||
|
@@ -19,11 +19,10 @@ import * as path from 'path';
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import { browser } from 'protractor';
|
import { browser } from 'protractor';
|
||||||
|
|
||||||
const DEFAULT_ROOT_PATH = browser.params.testConfig ? browser.params.testConfig.main.rootPath : __dirname;
|
|
||||||
|
|
||||||
export class FileBrowserUtil {
|
export class FileBrowserUtil {
|
||||||
|
|
||||||
static async isFileDownloaded(fileName: string): Promise<boolean> {
|
static async isFileDownloaded(fileName: string): Promise<boolean> {
|
||||||
|
const DEFAULT_ROOT_PATH = browser.params.testConfig ? browser.params.testConfig.main.rootPath : __dirname;
|
||||||
|
|
||||||
const file = await browser.driver.wait(() => {
|
const file = await browser.driver.wait(() => {
|
||||||
return fs.existsSync(path.join(DEFAULT_ROOT_PATH, 'downloads', fileName));
|
return fs.existsSync(path.join(DEFAULT_ROOT_PATH, 'downloads', fileName));
|
||||||
|
@@ -21,10 +21,14 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
name: 'candidatebaseapp',
|
name: 'candidatebaseapp',
|
||||||
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/candidatebaseapp.zip?raw=true',
|
file_location: 'https://github.com/Alfresco/alfresco-ng2-components/blob/development/e2e/resources/activiti7/candidatebaseapp.zip?raw=true',
|
||||||
processes: {
|
processes: {
|
||||||
candidateUserProcess: 'candidateUserProcess',
|
candidateUserProcess: 'candidateuserprocess',
|
||||||
candidateGroupProcess: 'candidateGroupProcess',
|
candidateGroupProcess: 'candidategroupprocess',
|
||||||
anotherCandidateGroupProcess: 'anotherCandidateGroupProcess',
|
anotherCandidateGroupProcess: 'anothercandidategroup',
|
||||||
uploadFileProcess: 'uploadFileProcess'
|
uploadFileProcess: 'uploadfileprocess'
|
||||||
|
},
|
||||||
|
forms: {
|
||||||
|
starteventform: 'starteventform',
|
||||||
|
formtotestvalidations: 'formtotestvalidations'
|
||||||
},
|
},
|
||||||
security: [
|
security: [
|
||||||
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
{'role': 'APS_ADMIN', 'groups': [], 'users': ['superadminuser']},
|
||||||
@@ -39,7 +43,14 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
simpleProcess: 'simpleprocess',
|
simpleProcess: 'simpleprocess',
|
||||||
dropdownrestprocess: 'dropdownrestprocess',
|
dropdownrestprocess: 'dropdownrestprocess',
|
||||||
multilingualprocess: 'multilingualprocess',
|
multilingualprocess: 'multilingualprocess',
|
||||||
processWithTabVisibility: 'processwithtabvisibility'
|
processWithTabVisibility: 'processwithtabvisibility',
|
||||||
|
startmessageevent: 'start-message-event',
|
||||||
|
intermediatemessageevent: 'intermediate-message-event',
|
||||||
|
intboundaryevent: 'int-boundary-event',
|
||||||
|
nonintboundaryevent: 'nonint-boundary-event',
|
||||||
|
intboundarysubprocess: 'int-boundary-subprocess',
|
||||||
|
intstartmessageevent: 'int-start-message-event',
|
||||||
|
nonintstartmessageevent: 'nonint-start-message-event'
|
||||||
},
|
},
|
||||||
forms: {
|
forms: {
|
||||||
tabVisibilityFields: {
|
tabVisibilityFields: {
|
||||||
@@ -49,6 +60,10 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
tabVisibilityVars: {
|
tabVisibilityVars: {
|
||||||
name: 'tabvisibilitywithvars',
|
name: 'tabvisibilitywithvars',
|
||||||
id: 'form-7bf363d2-83c9-4b00-853e-373d0d59963c'
|
id: 'form-7bf363d2-83c9-4b00-853e-373d0d59963c'
|
||||||
|
},
|
||||||
|
usertaskform: {
|
||||||
|
name: 'usertaskform',
|
||||||
|
id: 'form-056ba4aa-90c2-48eb-ba39-7013d732503b'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
security: [
|
security: [
|
||||||
|
@@ -5,6 +5,12 @@ const tsConfig = require('./e2e/tsconfig.e2e.json');
|
|||||||
const AlfrescoApi = require('@alfresco/js-api').AlfrescoApiCompatibility;
|
const AlfrescoApi = require('@alfresco/js-api').AlfrescoApiCompatibility;
|
||||||
const TestConfig = require('./e2e/test.config');
|
const TestConfig = require('./e2e/test.config');
|
||||||
const RESOURCES = require('./e2e/util/resources');
|
const RESOURCES = require('./e2e/util/resources');
|
||||||
|
|
||||||
|
require('ts-node').register({
|
||||||
|
project: './lib/testing/tsconfig.lib.json'
|
||||||
|
});
|
||||||
|
const ACTIVITI_CLOUD_APPS = require('./lib/testing').ACTIVITI_CLOUD_APPS;
|
||||||
|
|
||||||
const failFast = require('./e2e/protractor/fail-fast');
|
const failFast = require('./e2e/protractor/fail-fast');
|
||||||
const { beforeAllRewrite, afterAllRewrite, beforeEachAllRewrite, afterEachAllRewrite } = require('./e2e/protractor/override-jasmine');
|
const { beforeAllRewrite, afterAllRewrite, beforeEachAllRewrite, afterEachAllRewrite } = require('./e2e/protractor/override-jasmine');
|
||||||
const { uploadScreenshot, saveReport, cleanReportFolder } = require('./e2e/protractor/save-remote');
|
const { uploadScreenshot, saveReport, cleanReportFolder } = require('./e2e/protractor/save-remote');
|
||||||
@@ -16,6 +22,7 @@ const width = 1366, height = 768;
|
|||||||
let ENV_FILE = process.env.ENV_FILE;
|
let ENV_FILE = process.env.ENV_FILE;
|
||||||
let GROUP_SUFFIX = process.env.PREFIX;
|
let GROUP_SUFFIX = process.env.PREFIX;
|
||||||
|
|
||||||
|
RESOURCES.ACTIVITI_CLOUD_APPS = ACTIVITI_CLOUD_APPS;
|
||||||
if (ENV_FILE) {
|
if (ENV_FILE) {
|
||||||
require('dotenv').config({ path: ENV_FILE });
|
require('dotenv').config({ path: ENV_FILE });
|
||||||
}
|
}
|
||||||
|
@@ -1,489 +0,0 @@
|
|||||||
let path = require('path');
|
|
||||||
let fs = require('fs');
|
|
||||||
let alfrescoApi = require('@alfresco/js-api');
|
|
||||||
let program = require('commander');
|
|
||||||
let ACTIVITI7_APPS = require('../../e2e/util/resources').ACTIVITI7_APPS;
|
|
||||||
|
|
||||||
let config = {};
|
|
||||||
let absentApps = [];
|
|
||||||
let pushFailedApps = [];
|
|
||||||
let notRunningApps = [];
|
|
||||||
let host;
|
|
||||||
|
|
||||||
let MAX_RETRY = 3;
|
|
||||||
let counter = 0;
|
|
||||||
let TIMEOUT = 1000;
|
|
||||||
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
|
|
||||||
console.log('---START---');
|
|
||||||
|
|
||||||
program
|
|
||||||
.version('0.1.0')
|
|
||||||
.option('--host [type]', 'Remote environment host adf.lab.com ')
|
|
||||||
.option('--oauth [type]', 'oauth host')
|
|
||||||
.option('--client [type]', 'clientId ')
|
|
||||||
.option('-p, --password [type]', 'password ')
|
|
||||||
.option('-u, --username [type]', 'username ')
|
|
||||||
.parse(process.argv);
|
|
||||||
|
|
||||||
config = {
|
|
||||||
provider: 'BPM',
|
|
||||||
hostBpm: `${program.host}`,
|
|
||||||
authType: 'OAUTH',
|
|
||||||
oauth2: {
|
|
||||||
host: `${program.oauth}`,
|
|
||||||
clientId: program.client,
|
|
||||||
scope: 'openid',
|
|
||||||
secret: '',
|
|
||||||
implicitFlow: false,
|
|
||||||
silentLogin: false,
|
|
||||||
redirectUri: '/',
|
|
||||||
redirectUriLogout: '/logout'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
host = program.host;
|
|
||||||
|
|
||||||
console.log('---Login---');
|
|
||||||
|
|
||||||
try {
|
|
||||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(config);
|
|
||||||
await this.alfrescoJsApi.login(program.username, program.password);
|
|
||||||
} catch (e) {
|
|
||||||
console.log('Login error' + e);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('---Login ok---');
|
|
||||||
|
|
||||||
|
|
||||||
await deployAbsentApps(this.alfrescoJsApi);
|
|
||||||
|
|
||||||
let pushFailed = await getPushFailedApps(this.alfrescoJsApi);
|
|
||||||
|
|
||||||
if (pushFailed && pushFailed.length > 0) {
|
|
||||||
await deleteStaleApps(this.alfrescoJsApi, pushFailed);
|
|
||||||
}
|
|
||||||
|
|
||||||
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
|
||||||
|
|
||||||
if (notRunning && notRunning.length > 0) {
|
|
||||||
let notRunningAppAfterWait = await waitPossibleStaleApps(this.alfrescoJsApi, notRunning);
|
|
||||||
|
|
||||||
await deleteStaleApps(this.alfrescoJsApi, notRunningAppAfterWait);
|
|
||||||
|
|
||||||
await deployAbsentApps(this.alfrescoJsApi);
|
|
||||||
let notRunningSecondAttempt = await getNotRunningApps(this.alfrescoJsApi);
|
|
||||||
|
|
||||||
if (notRunningSecondAttempt && notRunningSecondAttempt.length > 0) {
|
|
||||||
let notRunningAppAfterWaitSecondAttempt = await waitPossibleStaleApps(this.alfrescoJsApi, notRunningSecondAttempt);
|
|
||||||
|
|
||||||
if (notRunningAppAfterWaitSecondAttempt && notRunningAppAfterWaitSecondAttempt.length > 0) {
|
|
||||||
console.log(`Not possible to recover the following apps in the environment`);
|
|
||||||
|
|
||||||
notRunningAppAfterWaitSecondAttempt.forEach((currentApp) => {
|
|
||||||
console.log(`App ${currentApp.entry.name } current status ${JSON.stringify(currentApp.entry.status)}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log(`Activiti 7 all ok :)`);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log(`Activiti 7 all ok :-)`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteStaleApps(alfrescoJsApi, notRunningAppAfterWait) {
|
|
||||||
for (const currentApp of notRunningAppAfterWait) {
|
|
||||||
await deleteApp(alfrescoJsApi, currentApp.entry.name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function waitPossibleStaleApps(alfrescoJsApi, notRunning) {
|
|
||||||
pushFailedApps = [];
|
|
||||||
do {
|
|
||||||
console.log(`Wait stale app ${TIMEOUT}`);
|
|
||||||
|
|
||||||
notRunning.forEach((currentApp) => {
|
|
||||||
console.log(`${currentApp.entry.name } ${currentApp.entry.status}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
sleep(TIMEOUT);
|
|
||||||
counter++;
|
|
||||||
|
|
||||||
let runningApps = await getDeployedApplicationsByStatus(alfrescoJsApi, 'RUNNING');
|
|
||||||
|
|
||||||
notRunning.forEach((currentStaleApp) => {
|
|
||||||
let nowIsRunning = runningApps.find((currentRunnignApp) => {
|
|
||||||
return currentStaleApp.entry.name === currentRunnignApp.entry.name;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (nowIsRunning) {
|
|
||||||
console.log(`The ${currentApp.entry.name } is now running`);
|
|
||||||
|
|
||||||
notRunning = notRunning.filter((item) => {
|
|
||||||
return item.entry.name !== nowIsRunning.entry.name
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
} while (counter < MAX_RETRY && notRunning.length > 0);
|
|
||||||
|
|
||||||
return notRunning;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getNotRunningApps(alfrescoJsApi) {
|
|
||||||
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
|
||||||
|
|
||||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
|
||||||
let isNotRunning = allStatusApps.find((currentApp) => {
|
|
||||||
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
|
||||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
|
||||||
});
|
|
||||||
|
|
||||||
if (isNotRunning && isNotRunning.entry.status !== 'ImagePushFailed') {
|
|
||||||
notRunningApps.push(isNotRunning);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (notRunningApps.length > 0) {
|
|
||||||
console.log(`The following apps are NOT running in the target env:`);
|
|
||||||
notRunningApps.forEach((currentApp) => {
|
|
||||||
console.log(`App ${currentApp.entry.name } current status ${JSON.stringify(currentApp.entry.status)}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
await checkIfAppIsReleased(alfrescoJsApi, absentApps);
|
|
||||||
}
|
|
||||||
|
|
||||||
return notRunningApps;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getPushFailedApps(alfrescoJsApi) {
|
|
||||||
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
|
||||||
|
|
||||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
|
||||||
let isNotRunning = allStatusApps.find((currentApp) => {
|
|
||||||
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
|
||||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
|
||||||
});
|
|
||||||
|
|
||||||
if (isNotRunning && isNotRunning.entry.status === 'ImagePushFailed') {
|
|
||||||
pushFailedApps.push(isNotRunning);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (pushFailedApps.length > 0) {
|
|
||||||
console.log(`The following apps are pushFailedApps:`);
|
|
||||||
pushFailedApps.forEach((currentApp) => {
|
|
||||||
console.log(`App ${currentApp.entry.name } current status ${JSON.stringify(currentApp.entry.status)}`);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return pushFailedApps;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deployAbsentApps(alfrescoJsApi) {
|
|
||||||
let deployedApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
|
||||||
|
|
||||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
|
||||||
let isPresent = deployedApps.find((currentApp) => {
|
|
||||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!isPresent) {
|
|
||||||
absentApps.push(ACTIVITI7_APPS[key]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (absentApps.length > 0) {
|
|
||||||
console.log(`The following apps are missing in the target env ${JSON.stringify(absentApps)}`);
|
|
||||||
|
|
||||||
await checkIfAppIsReleased(alfrescoJsApi, absentApps);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function checkIfAppIsReleased(apiService, absentApps) {
|
|
||||||
let listAppsInModeler = await getAppProjects(apiService);
|
|
||||||
|
|
||||||
for (let i = 0; i < absentApps.length; i++) {
|
|
||||||
let currentAbsentApp = absentApps[i];
|
|
||||||
let app = listAppsInModeler.find((currentApp) => {
|
|
||||||
return currentAbsentApp.name === currentApp.entry.name;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
if (!app) {
|
|
||||||
console.log('Missing project, create the project for ' + currentAbsentApp.name);
|
|
||||||
|
|
||||||
let uploadedApp = await importProjectApp(apiService, currentAbsentApp);
|
|
||||||
|
|
||||||
console.log('Project uploaded ' + currentAbsentApp.name);
|
|
||||||
|
|
||||||
if (uploadedApp) {
|
|
||||||
await releaseApp(apiService, uploadedApp);
|
|
||||||
await deployApp(apiService, uploadedApp, currentAbsentApp.name);
|
|
||||||
sleep(120000);///wait to not fail
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
console.log('Project for ' + currentAbsentApp.name + ' present');
|
|
||||||
|
|
||||||
let appRelease = undefined;
|
|
||||||
let appReleaseList = await getReleaseAppProjectId(apiService, app.entry.id);
|
|
||||||
|
|
||||||
if (appReleaseList.list.entries.length === 0) {
|
|
||||||
console.log('Needs to release');
|
|
||||||
appRelease = await releaseApp(apiService, app);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
console.log('Not Need to release' + JSON.stringify(appReleaseList));
|
|
||||||
|
|
||||||
let currentReleaseVersion = -1;
|
|
||||||
|
|
||||||
appReleaseList.list.entries.forEach((currentRelease) => {
|
|
||||||
if (currentRelease.entry.version > currentReleaseVersion) {
|
|
||||||
currentReleaseVersion = currentRelease.entry.version;
|
|
||||||
appRelease = currentRelease;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('App to deploy app release id ' + JSON.stringify(appRelease));
|
|
||||||
|
|
||||||
await deployApp(apiService, appRelease, currentAbsentApp.name);
|
|
||||||
sleep(120000);///wait to not fail
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deployApp(apiService, app, name) {
|
|
||||||
console.log(`Deploy app ${name}`);
|
|
||||||
|
|
||||||
const url = `${config.hostBpm}/deployment-service/v1/applications`;
|
|
||||||
|
|
||||||
const pathParams = {};
|
|
||||||
const bodyParam = {
|
|
||||||
"name": name,
|
|
||||||
"releaseId": app.entry.id,
|
|
||||||
"version": app.entry.name,
|
|
||||||
"security": [{"role": "APS_ADMIN", "groups": [], "users": ["admin.adf", "superadminuser"]}, {
|
|
||||||
"role": "APS_USER",
|
|
||||||
"groups": ["hr", "testgroup"],
|
|
||||||
"users": ["admin.adf"]
|
|
||||||
}]
|
|
||||||
};
|
|
||||||
|
|
||||||
const headerParams = {}, formParams = {}, queryParams = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
try {
|
|
||||||
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible to deploy the project ${name} status : ${JSON.stringify(error.status)} ${JSON.stringify(error.response.text)}`);
|
|
||||||
await deleteSiteByName(name);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function importProjectApp(apiService, app) {
|
|
||||||
const pathFile = path.join('./e2e/' + app.file_location);
|
|
||||||
console.log(pathFile);
|
|
||||||
const file = fs.createReadStream(pathFile);
|
|
||||||
|
|
||||||
const url = `${config.hostBpm}/modeling-service/v1/projects/import`;
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {},
|
|
||||||
headerParams = {}, formParams = {'file': file}, bodyParam = {},
|
|
||||||
contentTypes = ['multipart/form-data'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
try {
|
|
||||||
console.log('import app ' + app.file_location);
|
|
||||||
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
} catch (error) {
|
|
||||||
if (error.status !== 409) {
|
|
||||||
console.log(`Not possible to upload the project ${app.name} status : ${JSON.stringify(error.status)} ${JSON.stringify(error.response.text)}`);
|
|
||||||
process.exit(1);
|
|
||||||
} else {
|
|
||||||
console.log(`Not possible to upload the project because inconsistency CS - Modelling try to delete manually the node`);
|
|
||||||
await deleteSiteByName(app.name);
|
|
||||||
await importProjectApp(apiService, app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getReleaseAppProjectId(apiService, projectId) {
|
|
||||||
const url = `${config.hostBpm}/modeling-service/v1/projects/${projectId}/releases`;
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {},
|
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
try {
|
|
||||||
return await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible to get the release of the project ${projectId} ` + JSON.stringify(error));
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function releaseApp(apiService, app) {
|
|
||||||
const url = `${config.hostBpm}/modeling-service/v1/projects/${app.entry.id}/releases`;
|
|
||||||
|
|
||||||
console.log(url);
|
|
||||||
console.log('Release ID ' + app.entry.id);
|
|
||||||
const pathParams = {}, queryParams = {},
|
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
try {
|
|
||||||
return await apiService.oauth2Auth.callCustomApi(url, 'POST', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible to release the project ${app.entry.name} status : $ \n ${JSON.stringify(error.status)} \n ${JSON.stringify(error.response.text)}`);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getDeployedApplicationsByStatus(apiService, status) {
|
|
||||||
const url = `${config.hostBpm}/deployment-service/v1/applications`;
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {status: status},
|
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
let data;
|
|
||||||
try {
|
|
||||||
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
|
|
||||||
return data.list.entries;
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible get the applications from deployment-service ${JSON.stringify(error)} `);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getAppProjects(apiService, status) {
|
|
||||||
const url = `${config.hostBpm}/modeling-service/v1/projects`;
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {status: status},
|
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
let data;
|
|
||||||
try {
|
|
||||||
data = await apiService.oauth2Auth.callCustomApi(url, 'GET', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
return data.list.entries;
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible get the application from modeling-service ` + error);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteApp(apiService, appName) {
|
|
||||||
console.log(`Delete the app ${appName}`);
|
|
||||||
|
|
||||||
const url = `${config.hostBpm}/deployment-service/v1/applications/${appName}`;
|
|
||||||
|
|
||||||
const pathParams = {}, queryParams = {},
|
|
||||||
headerParams = {}, formParams = {}, bodyParam = {},
|
|
||||||
contentTypes = ['application/json'], accepts = ['application/json'];
|
|
||||||
|
|
||||||
try {
|
|
||||||
await apiService.oauth2Auth.callCustomApi(url, 'DELETE', pathParams, queryParams, headerParams, formParams, bodyParam,
|
|
||||||
contentTypes, accepts);
|
|
||||||
|
|
||||||
///it needs time
|
|
||||||
console.log(`Deleting apps stale wait 3 minutes`);
|
|
||||||
sleep(180000);
|
|
||||||
console.log(`App deleted`);
|
|
||||||
} catch (error) {
|
|
||||||
console.log(`Not possible to delete the application from modeling-service` + error);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function sleep(delay) {
|
|
||||||
var start = new Date().getTime();
|
|
||||||
while (new Date().getTime() < start + delay) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteChildrenNodeByName(alfrescoJsApi, nameNodeToDelete, nodeId) {
|
|
||||||
let childrenNodes = await alfrescoJsApi.core.nodesApi.getNodeChildren(nodeId);
|
|
||||||
|
|
||||||
let childrenToDelete = childrenNodes.list.entries.find((currentNode) => {
|
|
||||||
return currentNode.entry.name === nameNodeToDelete;
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log('childrenToDelete ' + childrenToDelete.entry.name);
|
|
||||||
|
|
||||||
if (childrenToDelete) {
|
|
||||||
await alfrescoJsApi.core.nodesApi.deleteNode(childrenToDelete.entry.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
async function deleteSiteByName(name) {
|
|
||||||
|
|
||||||
console.log(`====== Delete Site ${name} ${program.host} ======`);
|
|
||||||
|
|
||||||
let alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
|
||||||
provider: 'ECM',
|
|
||||||
hostEcm: `https://${program.host}`
|
|
||||||
});
|
|
||||||
|
|
||||||
await this.alfrescoJsApi.login(program.username, program.password);
|
|
||||||
|
|
||||||
let listSites = [];
|
|
||||||
|
|
||||||
try {
|
|
||||||
listSites = await alfrescoJsApi.core.sitesApi.getSites();
|
|
||||||
} catch (error) {
|
|
||||||
console.log('error get list sites' + JSON.stringify(error));
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
let apsModelingNodeId;
|
|
||||||
let apsReleaseNodeId;
|
|
||||||
|
|
||||||
if (listSites && listSites.list.entries.length > 0) {
|
|
||||||
for (let i = 0; i < listSites.list.entries.length; i++) {
|
|
||||||
if (listSites.list.entries[i].entry.id === name) {
|
|
||||||
try {
|
|
||||||
await alfrescoJsApi.core.sitesApi.deleteSite(listSites.list.entries[i].entry.id, {options: {permanent: true}});
|
|
||||||
} catch (error) {
|
|
||||||
console.log('error' + JSON.stringify(error));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listSites.list.entries[i].entry.id === 'ApsModeling') {
|
|
||||||
apsModelingNodeId = listSites.list.entries[i].entry.guid;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listSites.list.entries[i].entry.id === 'ApsRelease') {
|
|
||||||
apsReleaseNodeId = listSites.list.entries[i].entry.guid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`====== Delete Folder in apsModeling`);
|
|
||||||
await deleteChildrenNodeByName(alfrescoJsApi, name, apsModelingNodeId);
|
|
||||||
|
|
||||||
console.log(`====== Delete Folder in apsRelease`);
|
|
||||||
await deleteChildrenNodeByName(alfrescoJsApi, name, apsReleaseNodeId);
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
@@ -1,6 +1,6 @@
|
|||||||
let alfrescoApi = require('@alfresco/js-api');
|
let alfrescoApi = require('@alfresco/js-api');
|
||||||
let program = require('commander');
|
let program = require('commander');
|
||||||
let ACTIVITI7_APPS = require('../../e2e/util/resources').ACTIVITI7_APPS;
|
const RESOURCES_CLOUD = require("@alfresco/adf-process-services-cloud");
|
||||||
|
|
||||||
let config = {};
|
let config = {};
|
||||||
let absentApps = [];
|
let absentApps = [];
|
||||||
@@ -42,8 +42,8 @@ async function main() {
|
|||||||
console.log('Login error' + e);
|
console.log('Login error' + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const key of Object.keys(ACTIVITI7_APPS)) {
|
for (const key of Object.keys(RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS)) {
|
||||||
await deleteApp(alfrescoJsApi, ACTIVITI7_APPS[key].name);
|
await deleteApp(alfrescoJsApi, RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS[key].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
let notRunning = await getNotRunningApps(this.alfrescoJsApi);
|
||||||
@@ -56,10 +56,10 @@ async function main() {
|
|||||||
async function getNotRunningApps(alfrescoJsApi) {
|
async function getNotRunningApps(alfrescoJsApi) {
|
||||||
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
let allStatusApps = await getDeployedApplicationsByStatus(alfrescoJsApi, '');
|
||||||
|
|
||||||
Object.keys(ACTIVITI7_APPS).forEach((key) => {
|
Object.keys(RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS).forEach((key) => {
|
||||||
let isNotRunning = allStatusApps.find((currentApp) => {
|
let isNotRunning = allStatusApps.find((currentApp) => {
|
||||||
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
//console.log(currentApp.entry.name + ' ' +currentApp.entry.status);
|
||||||
return ACTIVITI7_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
return RESOURCES_CLOUD.ACTIVITI_CLOUD_APPS[key].name === currentApp.entry.name && currentApp.entry.status !== 'Running';
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isNotRunning && isNotRunning.entry.status !== 'ImagePushFailed') {
|
if (isNotRunning && isNotRunning.entry.status !== 'ImagePushFailed') {
|
||||||
|
@@ -221,6 +221,11 @@ fi
|
|||||||
echo "====== Update webdriver-manager ====="
|
echo "====== Update webdriver-manager ====="
|
||||||
./node_modules/protractor/bin/webdriver-manager update --gecko=false
|
./node_modules/protractor/bin/webdriver-manager update --gecko=false
|
||||||
|
|
||||||
|
export DEBUG_OPTION=''
|
||||||
|
if [[ $DEBUG == "true" ]]; then
|
||||||
|
DEBUG_OPTION=' node --inspect-brk '
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $DEVELOPMENT == "true" ]]; then
|
if [[ $DEVELOPMENT == "true" ]]; then
|
||||||
echo "====== Run against local development ====="
|
echo "====== Run against local development ====="
|
||||||
npm run e2e-lib || exit 1
|
npm run e2e-lib || exit 1
|
||||||
@@ -243,14 +248,8 @@ else
|
|||||||
sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
|
sed -e "s/\"ecmHost\": \".*\"/\"ecmHost\": \"${encoded}\"/g" "${sedi[@]}" demo-shell/dist/app.config.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
npm run lite-server-e2e>/dev/null & $DEBUG_OPTION ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
||||||
else
|
else
|
||||||
if [[ $DEBUG == "true" ]]; then
|
$DEBUG_OPTION ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
||||||
echo "====== DEBUG npm run lite-server-e2e>/dev/null & ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
|
||||||
else====="
|
|
||||||
node --inspect-brk ./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
|
||||||
else
|
|
||||||
./node_modules/protractor/bin/protractor protractor.conf.ts || exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@@ -13,17 +13,18 @@ AFFECTED_E2E="$(./scripts/git-util/affected-folder.sh -b $TRAVIS_BRANCH -f "e2e/
|
|||||||
|
|
||||||
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -gnu )
|
RUN_E2E=$(echo ./scripts/test-e2e-lib.sh -host http://localhost:4200 -proxy "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" -e "$E2E_EMAIL" -host_sso "$E2E_HOST_SSO" -host_bpm "$E2E_HOST_BPM" -host_identity "$E2E_HOST_IDENTITY" -identity_admin_email "$E2E_ADMIN_EMAIL_IDENTITY" -identity_admin_password "$E2E_ADMIN_PASSWORD_IDENTITY" -prefix $TRAVIS_BUILD_NUMBER --use-dist -gnu )
|
||||||
|
|
||||||
|
./node_modules/@alfresco/adf-cli/bin/adf-cli init-aae-env --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" --username "$E2E_USERNAME" --password "$E2E_PASSWORD" --clientId 'activiti' || exit 1
|
||||||
|
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
||||||
|
|
||||||
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
if [[ $AFFECTED_LIBS =~ "testing" || $AFFECTED_LIBS =~ "$CONTEXT_ENV" || $TRAVIS_PULL_REQUEST == "false" ]];
|
||||||
then
|
then
|
||||||
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1
|
echo "Case 1 - adf-testing has been changed";
|
||||||
node ./scripts/check-env/check-cs-env.js --host "$E2E_HOST_BPM" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" || exit 1
|
|
||||||
|
|
||||||
$RUN_E2E --folder $CONTEXT_ENV
|
$RUN_E2E --folder $CONTEXT_ENV
|
||||||
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
|
else if [[ $AFFECTED_E2E = "e2e/$CONTEXT_ENV" ]];
|
||||||
then
|
then
|
||||||
|
echo "Case 2 - e2e/$CONTEXT_ENV folder has been changed";
|
||||||
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
|
HEAD_SHA_BRANCH="$(git merge-base origin/$TRAVIS_BRANCH HEAD)"
|
||||||
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"
|
LIST_SPECS="$(git diff --name-only $HEAD_SHA_BRANCH HEAD | grep "^e2e/$CONTEXT_ENV/" | paste -sd , -)"
|
||||||
node ./scripts/check-env/check-activiti-env.js --host "$E2E_HOST_BPM" --oauth "$E2E_HOST_SSO" -u "$E2E_USERNAME" -p "$E2E_PASSWORD" --client 'activiti' || exit 1
|
|
||||||
if [[ $LIST_SPECS != "" ]];
|
if [[ $LIST_SPECS != "" ]];
|
||||||
then
|
then
|
||||||
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
|
echo "Run $CONTEXT_ENV e2e based on the sha $HEAD_SHA_BRANCH with the specs: "$LIST_SPECS
|
||||||
|
Reference in New Issue
Block a user