diff --git a/cspell.json b/cspell.json index 0d69f62980..3442ccab09 100644 --- a/cspell.json +++ b/cspell.json @@ -127,6 +127,7 @@ "subfolders", "ECMBPM", "processwithvariables", + "dropdownrestprocess", "devops" ], "dictionaries": [ diff --git a/e2e/process-services-cloud/form-field/dropdown-widget.e2e.ts b/e2e/process-services-cloud/form-field/dropdown-widget.e2e.ts index a4802b0d3c..d12e910f28 100644 --- a/e2e/process-services-cloud/form-field/dropdown-widget.e2e.ts +++ b/e2e/process-services-cloud/form-field/dropdown-widget.e2e.ts @@ -63,7 +63,8 @@ describe('Form Field Component - Dropdown Widget', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('dropdownrestprocess', simpleApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.SIMPLE_APP.processes.dropdownrestprocess, simpleApp); processInstancesService = new ProcessInstancesService(apiService); await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp); diff --git a/e2e/process-services-cloud/process-custom-filters.e2e.ts b/e2e/process-services-cloud/process-custom-filters.e2e.ts index aeb2c8d73b..d92bf522ca 100644 --- a/e2e/process-services-cloud/process-custom-filters.e2e.ts +++ b/e2e/process-services-cloud/process-custom-filters.e2e.ts @@ -53,7 +53,8 @@ describe('Process list cloud', () => { let processInstancesService: ProcessInstancesService; let queryService: QueryService; - let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps, testUser, groupInfo, anotherProcessInstance; + let completedProcess, runningProcessInstance, switchProcessInstance, noOfApps, testUser, groupInfo, + anotherProcessInstance; const candidateBaseApp = resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name; beforeAll(async (done) => { @@ -68,8 +69,11 @@ describe('Process list cloud', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateGroupProcess', candidateBaseApp); - const anotherProcessDefinition = await processDefinitionService.getProcessDefinitionByName('anotherCandidateGroupProcess', candidateBaseApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp); + + const anotherProcessDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp); processInstancesService = new ProcessInstancesService(apiService); await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); @@ -95,6 +99,7 @@ describe('Process list cloud', () => { }); queryService = new QueryService(apiService); + await browser.driver.sleep(4000); // eventual consistency query const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateBaseApp); tasksService = new TasksService(apiService); const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp); diff --git a/e2e/process-services-cloud/process-filter-results.e2e.ts b/e2e/process-services-cloud/process-filter-results.e2e.ts index f900df48ba..de39f0fa1c 100644 --- a/e2e/process-services-cloud/process-filter-results.e2e.ts +++ b/e2e/process-services-cloud/process-filter-results.e2e.ts @@ -57,7 +57,8 @@ describe('Process filters cloud', () => { let processInstancesService: ProcessInstancesService; let queryService: QueryService; - let completedProcess, runningProcessInstance, suspendProcessInstance, testUser, anotherUser, groupInfo, anotherProcessInstance, processDefinition, anotherProcessDefinition, + let completedProcess, runningProcessInstance, suspendProcessInstance, testUser, anotherUser, groupInfo, + anotherProcessInstance, processDefinition, anotherProcessDefinition, differentAppUserProcessInstance, simpleAppProcessDefinition; const candidateBaseApp = resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name; const simpleApp = resources.ACTIVITI7_APPS.SIMPLE_APP.name; @@ -76,7 +77,9 @@ describe('Process filters cloud', () => { await apiService.login(anotherUser.email, anotherUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - simpleAppProcessDefinition = await processDefinitionService.getProcessDefinitionByName('simpleProcess', simpleApp); + simpleAppProcessDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp); + processInstancesService = new ProcessInstancesService(apiService); differentAppUserProcessInstance = await processInstancesService.createProcessInstance(simpleAppProcessDefinition.entry.key, simpleApp, { 'name': StringUtil.generateRandomString(), @@ -84,8 +87,11 @@ describe('Process filters cloud', () => { }); await apiService.login(testUser.email, testUser.password); - processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateGroupProcess', candidateBaseApp); - anotherProcessDefinition = await processDefinitionService.getProcessDefinitionByName('anotherCandidateGroupProcess', candidateBaseApp); + processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp); + + anotherProcessDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.anotherCandidateGroupProcess, candidateBaseApp); runningProcessInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, { 'name': StringUtil.generateRandomString(), @@ -109,6 +115,7 @@ describe('Process filters cloud', () => { }); queryService = new QueryService(apiService); + await browser.driver.sleep(4000); // eventual consistency query const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateBaseApp); tasksService = new TasksService(apiService); const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp); diff --git a/e2e/process-services-cloud/process-filters-cloud.e2e.ts b/e2e/process-services-cloud/process-filters-cloud.e2e.ts index 4f9eeef252..fb433311a6 100644 --- a/e2e/process-services-cloud/process-filters-cloud.e2e.ts +++ b/e2e/process-services-cloud/process-filters-cloud.e2e.ts @@ -68,12 +68,16 @@ describe('Process filters cloud', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateGroupProcess', candidateBaseApp); - processInstancesService = new ProcessInstancesService(apiService); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp); + + processInstancesService = new ProcessInstancesService(apiService); runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); completedProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); queryService = new QueryService(apiService); + + await browser.driver.sleep(4000); // eventual consistency query const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateBaseApp); tasksService = new TasksService(apiService); const claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp); @@ -87,7 +91,7 @@ describe('Process filters cloud', () => { done(); }, 5 * 60 * 1000); - afterAll(async(done) => { + afterAll(async (done) => { await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password); await identityService.deleteIdentityUser(testUser.idIdentityService); done(); diff --git a/e2e/process-services-cloud/process-list-cloud-component.e2e.ts b/e2e/process-services-cloud/process-list-cloud-component.e2e.ts index 7568c79ff6..e81d08328e 100644 --- a/e2e/process-services-cloud/process-list-cloud-component.e2e.ts +++ b/e2e/process-services-cloud/process-list-cloud-component.e2e.ts @@ -62,7 +62,9 @@ describe('Process list cloud', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateGroupProcess', candidateBaseApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateGroupProcess, candidateBaseApp); + processInstancesService = new ProcessInstancesService(apiService); runningProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); @@ -74,7 +76,7 @@ describe('Process list cloud', () => { done(); }); - afterAll(async(done) => { + afterAll(async (done) => { await apiService.login(browser.params.identityAdmin.email, browser.params.identityAdmin.password); await identityService.deleteIdentityUser(testUser.idIdentityService); done(); diff --git a/e2e/process-services-cloud/process-list-selection-cloud.e2e.ts b/e2e/process-services-cloud/process-list-selection-cloud.e2e.ts index 580b9f8d0d..2e7a5f5a65 100644 --- a/e2e/process-services-cloud/process-list-selection-cloud.e2e.ts +++ b/e2e/process-services-cloud/process-list-selection-cloud.e2e.ts @@ -58,7 +58,8 @@ describe('Process list cloud', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('simpleProcess', simpleApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp); processInstancesService = new ProcessInstancesService(apiService); for (let i = 0; i < noOfProcesses; i++) { diff --git a/e2e/process-services-cloud/start-task-form-cloud.e2e.ts b/e2e/process-services-cloud/start-task-form-cloud.e2e.ts index e846fe22f5..b1596244e8 100644 --- a/e2e/process-services-cloud/start-task-form-cloud.e2e.ts +++ b/e2e/process-services-cloud/start-task-form-cloud.e2e.ts @@ -113,7 +113,9 @@ describe('Start Task Form', () => { await apiService.login(testUser.email, testUser.password); processDefinitionService = new ProcessDefinitionsService(apiService); processInstancesService = new ProcessInstancesService(apiService); - processDefinition = await processDefinitionService.getProcessDefinitionByName('uploadFileProcess', candidateBaseApp); + processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.uploadFileProcess, candidateBaseApp); + await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); uploadLocalFileProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp, { diff --git a/e2e/process-services-cloud/task-form-cloud-component.e2e.ts b/e2e/process-services-cloud/task-form-cloud-component.e2e.ts index 55200764bd..a5d0abe7e7 100644 --- a/e2e/process-services-cloud/task-form-cloud-component.e2e.ts +++ b/e2e/process-services-cloud/task-form-cloud-component.e2e.ts @@ -78,11 +78,13 @@ describe('Task form cloud component', () => { await tasksService.createAndCompleteTask(completedTaskName, candidateBaseApp); processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateUserProcess', candidateBaseApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.processes.candidateUserProcess, candidateBaseApp); processInstancesService = new ProcessInstancesService(apiService); completedProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp); + await browser.driver.sleep(4000); // eventual consistency query const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateBaseApp); claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp); diff --git a/e2e/process-services-cloud/task-list-properties.e2e.ts b/e2e/process-services-cloud/task-list-properties.e2e.ts index 3b0a16adc8..49a7c45a7b 100644 --- a/e2e/process-services-cloud/task-list-properties.e2e.ts +++ b/e2e/process-services-cloud/task-list-properties.e2e.ts @@ -81,7 +81,9 @@ describe('Edit task filters and task list properties', () => { await tasksService.claimTask(notDisplayedTask.entry.id, candidateBaseApp); processDefinitionService = new ProcessDefinitionsService(apiService); - processDefinition = await processDefinitionService.getProcessDefinitionByName('simpleProcess', simpleApp); + processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp); + processInstancesService = new ProcessInstancesService(apiService); processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp); diff --git a/e2e/process-services-cloud/tasks-custom-filters.e2e.ts b/e2e/process-services-cloud/tasks-custom-filters.e2e.ts index 19f87f1c67..dc4aeb7e31 100644 --- a/e2e/process-services-cloud/tasks-custom-filters.e2e.ts +++ b/e2e/process-services-cloud/tasks-custom-filters.e2e.ts @@ -84,12 +84,16 @@ describe('Task filters cloud', () => { } processDefinitionService = new ProcessDefinitionsService(apiService); - const processDefinition = await processDefinitionService.getProcessDefinitionByName('simpleProcess', simpleApp); + const processDefinition = await processDefinitionService + .getProcessDefinitionByName(resources.ACTIVITI7_APPS.SIMPLE_APP.processes.simpleProcess, simpleApp); + processInstancesService = new ProcessInstancesService(apiService); const processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp); const secondProcessInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp); queryService = new QueryService(apiService); + + await browser.driver.sleep(4000); // eventual consistency query await queryService.getProcessInstanceTasks(secondProcessInstance.entry.id, simpleApp); await processInstancesService.suspendProcessInstance(processInstance.entry.id, simpleApp); await processInstancesService.deleteProcessInstance(secondProcessInstance.entry.id, simpleApp); diff --git a/e2e/util/resources.js b/e2e/util/resources.js index 731d0b6a65..60983c11ff 100644 --- a/e2e/util/resources.js +++ b/e2e/util/resources.js @@ -516,14 +516,21 @@ exports.Files = { exports.ACTIVITI7_APPS = { CANDIDATE_BASE_APP: { name: "candidatebaseapp", - file_location: "/resources/activiti7/candidatebaseapp.zip" + file_location: "/resources/activiti7/candidatebaseapp.zip", + processes: { + candidateUserProcess: "candidateUserProcess", + candidateGroupProcess: "candidateGroupProcess", + anotherCandidateGroupProcess: "anotherCandidateGroupProcess", + uploadFileProcess: "uploadFileProcess" + } }, SIMPLE_APP: { name: "simpleapp", file_location: "/resources/activiti7/simpleapp.zip", processes: { processwithvariables: "processwithvariables", - simpleProcess: "simpleProcess" + simpleProcess: "simpleProcess", + dropdownrestprocess: "dropdownrestprocess" } }, SUB_PROCESS_APP: { diff --git a/scripts/build/build-all-lib.sh b/scripts/build/build-all-lib.sh index 9c6ef73f11..02dd8ab0b3 100755 --- a/scripts/build/build-all-lib.sh +++ b/scripts/build/build-all-lib.sh @@ -34,4 +34,6 @@ echo "====== Copy schema =====" cp ../../lib/core/app-config/schema.json ../../lib/dist/core/app.config.schema.json -npm run bundlesize-check +echo "====== Bundle check =====" + +npm run bundlesize-check || exit 1