mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ADF-4809] Automation for non-editable task details when completed (#5001)
This commit is contained in:
committed by
Eugenio Romano
parent
9960a37e9a
commit
023476e14f
@@ -28,7 +28,7 @@ import resources = require('../util/resources');
|
||||
import CONSTANTS = require('../util/constants');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import { LoginPage, BrowserActions } from '@alfresco/adf-testing';
|
||||
import { LoginPage, BrowserActions, StringUtil } from '@alfresco/adf-testing';
|
||||
import { TasksPage } from '../pages/adf/process-services/tasksPage';
|
||||
import { browser } from 'protractor';
|
||||
|
||||
@@ -42,6 +42,13 @@ describe('Task Details component', () => {
|
||||
let formModel;
|
||||
let apps;
|
||||
|
||||
const taskFormModel = {
|
||||
'name': StringUtil.generateRandomString(),
|
||||
'description': '',
|
||||
'modelType': 2,
|
||||
'stencilSet': 0
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const taskPage = new TasksPage();
|
||||
|
||||
@@ -317,4 +324,25 @@ describe('Task Details component', () => {
|
||||
await expect(await taskPage.taskDetails().getStatus()).toEqual(CONSTANTS.TASK_STATUS.COMPLETED);
|
||||
});
|
||||
|
||||
it('[C260321] Should not be able to edit a completed task\'s details', async () => {
|
||||
const taskName = 'TaskCompleted';
|
||||
const form = await this.alfrescoJsApi.activiti.modelsApi.createModel(taskFormModel);
|
||||
const task = await this.alfrescoJsApi.activiti.taskApi.createNewTask({ 'name': taskName });
|
||||
await this.alfrescoJsApi.activiti.taskApi.attachForm(task.id, { 'formId': form.id });
|
||||
await this.alfrescoJsApi.activiti.taskApi.completeTaskForm(task.id, { values: { label: null } });
|
||||
|
||||
await (await processServices.goToTaskApp()).clickTasksButton();
|
||||
|
||||
await taskPage.filtersPage().goToFilter(CONSTANTS.TASK_FILTERS.COMPLETED_TASKS);
|
||||
|
||||
await taskPage.tasksListPage().checkContentIsDisplayed(taskName);
|
||||
await taskPage.tasksListPage().selectRow(taskName);
|
||||
|
||||
await taskPage.taskDetails().checkEditableAssigneeIsNotDisplayed();
|
||||
await taskPage.taskDetails().checkEditableFormIsNotDisplayed();
|
||||
await taskPage.taskDetails().checkEditDescriptionButtonIsNotDisplayed();
|
||||
await taskPage.taskDetails().checkEditPriorityButtonIsNotDisplayed();
|
||||
await taskPage.taskDetails().checkDueDatePickerButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user