mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Enable tests and add a newly created user to run the tests. (#4796)
* enabled tests and added the new user to run the tests. * lint fix * adding a new user and add the user to hr group which will be used when deploying the apps. * Test commit * adding a new user and add the user to hr group which will be used when deploying the apps. * linting fixes * crc's moved the roles constants to identityService. * crc's moved the roles constants to identityService. * wrapped the createIdentityUser and assign Role calls into 1 method and used in the tests. * wrapped the createIdentityUser and assign Role calls into 1 method and used in the tests. * Added a method in identityService to pass the required roles to be added in a string array. * linting fixes * added the command line arguments to run the e2e tests -identity_admin_email and -identity_admin_password * added the command line arguments to run the e2e tests -identity_admin_email and -identity_admin_password * crc's, removed the step to add user to the hr group, as not needed in this test. * renamed the E2E travis variable to end with identity. * replaced the candidateuserapp with candidatebaseapp * replaced candidateuserapp with candidatebaseapp * replaced candidateuserapp with candidatebaseapp * replaced candidateuserapp with candidatebaseapp * timeout wait for the test to pass. * crc's
This commit is contained in:
committed by
Eugenio Romano
parent
3d73e94b5d
commit
e65e32e0cf
@@ -39,7 +39,7 @@ describe('Task form cloud component', () => {
|
||||
let queryService: QueryService;
|
||||
|
||||
let completedTask, createdTask, assigneeTask, toBeCompletedTask, completedProcess, claimedTask;
|
||||
const candidateuserapp = resources.ACTIVITI7_APPS.CANDIDATE_USER_APP.name;
|
||||
const candidateBaseApp = resources.ACTIVITI7_APPS.CANDIDATE_BASE_APP.name;
|
||||
const completedTaskName = StringUtil.generateRandomString(), assignedTaskName = StringUtil.generateRandomString();
|
||||
|
||||
beforeAll(async (done) => {
|
||||
@@ -48,26 +48,26 @@ describe('Task form cloud component', () => {
|
||||
|
||||
tasksService = new TasksService(apiService);
|
||||
queryService = new QueryService(apiService);
|
||||
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateuserapp);
|
||||
createdTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||
|
||||
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateuserapp);
|
||||
await tasksService.claimTask(assigneeTask.entry.id, candidateuserapp);
|
||||
assigneeTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||
await tasksService.claimTask(assigneeTask.entry.id, candidateBaseApp);
|
||||
|
||||
toBeCompletedTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateuserapp);
|
||||
await tasksService.claimTask(toBeCompletedTask.entry.id, candidateuserapp);
|
||||
toBeCompletedTask = await tasksService.createStandaloneTask(StringUtil.generateRandomString(), candidateBaseApp);
|
||||
await tasksService.claimTask(toBeCompletedTask.entry.id, candidateBaseApp);
|
||||
|
||||
completedTask = await tasksService.createStandaloneTask(assignedTaskName, candidateuserapp);
|
||||
await tasksService.claimTask(completedTask.entry.id, candidateuserapp);
|
||||
await tasksService.createAndCompleteTask(completedTaskName, candidateuserapp);
|
||||
completedTask = await tasksService.createStandaloneTask(assignedTaskName, candidateBaseApp);
|
||||
await tasksService.claimTask(completedTask.entry.id, candidateBaseApp);
|
||||
await tasksService.createAndCompleteTask(completedTaskName, candidateBaseApp);
|
||||
|
||||
processDefinitionService = new ProcessDefinitionsService(apiService);
|
||||
const processDefinition = await processDefinitionService.getProcessDefinitions(candidateuserapp);
|
||||
const processDefinition = await processDefinitionService.getProcessDefinitionByName('candidateUserProcess', candidateBaseApp);
|
||||
|
||||
processInstancesService = new ProcessInstancesService(apiService);
|
||||
completedProcess = await processInstancesService.createProcessInstance(processDefinition.list.entries[0].entry.key, candidateuserapp);
|
||||
completedProcess = await processInstancesService.createProcessInstance(processDefinition.entry.key, candidateBaseApp);
|
||||
|
||||
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateuserapp);
|
||||
claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateuserapp);
|
||||
const task = await queryService.getProcessInstanceTasks(completedProcess.entry.id, candidateBaseApp);
|
||||
claimedTask = await tasksService.claimTask(task.list.entries[0].entry.id, candidateBaseApp);
|
||||
|
||||
await settingsPage.setProviderBpmSso(
|
||||
browser.params.config.bpmHost,
|
||||
@@ -75,12 +75,12 @@ describe('Task form cloud component', () => {
|
||||
browser.params.config.identityHost);
|
||||
loginSSOPage.loginSSOIdentityService(browser.params.identityUser.email, browser.params.identityUser.password);
|
||||
done();
|
||||
});
|
||||
}, 5 * 60 * 1000);
|
||||
|
||||
it('[C307032] Should display the appropriate title for the unclaim option of a Task', async () => {
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
appListCloudComponent.goToApp(candidateuserapp);
|
||||
appListCloudComponent.goToApp(candidateBaseApp);
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(assigneeTask.entry.name);
|
||||
tasksCloudDemoPage.taskListCloudComponent().selectRow(assigneeTask.entry.name);
|
||||
@@ -92,7 +92,7 @@ describe('Task form cloud component', () => {
|
||||
beforeEach((done) => {
|
||||
navigationBarPage.navigateToProcessServicesCloudPage();
|
||||
appListCloudComponent.checkApsContainer();
|
||||
appListCloudComponent.goToApp(candidateuserapp);
|
||||
appListCloudComponent.goToApp(candidateBaseApp);
|
||||
done();
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user