mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
[ADF-4089] Refactoring ContentListPage (#4162)
* [ADF-NO-ISSUE] Refactoring ContentListPage * Applying changes * [ADF-4089] contentListPage refactoring * Fixing missing dependencies * Fixing core and search failing tests * Fix tooltip document-list tests * no message
This commit is contained in:
committed by
Eugenio Romano
parent
88ef01011e
commit
27c6e18a10
@@ -62,6 +62,7 @@ describe('Start Task', () => {
|
||||
|
||||
it('[C290166] Should be possible to cancel a task', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.checkStartButtonIsDisabled()
|
||||
.blur(startTask.name)
|
||||
.checkValidationErrorIsDisplayed(requiredError);
|
||||
@@ -70,21 +71,23 @@ describe('Start Task', () => {
|
||||
.addDueDate('12/12/2018');
|
||||
startTask.checkStartButtonIsEnabled();
|
||||
startTask.clickCancelButton();
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsNotDisplayed(standaloneTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(standaloneTaskName);
|
||||
});
|
||||
|
||||
it('[C290180] Should be able to create a new standalone task', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.addName(standaloneTaskName)
|
||||
.addDescription('descriptions')
|
||||
.addDueDate('12/12/2018')
|
||||
.addPriority('50')
|
||||
.clickStartButton();
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsDisplayed(standaloneTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(standaloneTaskName);
|
||||
});
|
||||
|
||||
it('[C290181] Should be displayed an error message if task name exceed 255 characters', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.addName(taskName255Characters)
|
||||
.checkStartButtonIsEnabled();
|
||||
startTask.addName(taskNameBiggerThen255Characters)
|
||||
@@ -107,50 +110,55 @@ describe('Start Task', () => {
|
||||
|
||||
it('[C290182] Should be possible to assign the task to another user', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.addName(standaloneTaskName);
|
||||
peopleCloudComponent.searchAssigneeAndSelect('Super Admin');
|
||||
startTask.checkStartButtonIsEnabled();
|
||||
startTask.clickStartButton();
|
||||
tasksCloudDemoPage.myTasksFilter().clickTaskFilter();
|
||||
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsNotDisplayed(standaloneTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(standaloneTaskName);
|
||||
});
|
||||
|
||||
it('[C291953] Assignee field should display the logged user as default', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
expect(peopleCloudComponent.getAssignee()).toContain('Admin', 'does not contain Admin');
|
||||
startTask.clickCancelButton();
|
||||
});
|
||||
|
||||
it('[C291956] Should be able to create a new standalone task without assignee', () => {
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.addName(standaloneTaskName);
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.clearField(peopleCloudComponent.peopleCloudSearch);
|
||||
startTask.addName(unassignedTaskName);
|
||||
startTask.clickStartButton();
|
||||
startTask.checkStartButtonIsEnabled();
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent()
|
||||
.clickCustomiseFilterHeader()
|
||||
.setStateFilterDropDown('CREATED')
|
||||
.clearAssignment();
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsDisplayed(standaloneTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
|
||||
});
|
||||
|
||||
it('[C297675] Should create a task unassigned when assignee field is empty in Start Task form', () => {
|
||||
|
||||
tasksCloudDemoPage.openNewTaskForm();
|
||||
startTask.checkFormIsDisplayed();
|
||||
startTask.addName(unassignedTaskName);
|
||||
startTask.clearField(peopleCloudComponent.peopleCloudSearch);
|
||||
startTask.clickStartButton();
|
||||
tasksCloudDemoPage.editTaskFilterCloudComponent()
|
||||
.clickCustomiseFilterHeader()
|
||||
.setStateFilterDropDown('CREATED')
|
||||
.clearAssignment();
|
||||
.clearAssignment()
|
||||
.setStateFilterDropDown('CREATED');
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().waitForTableBody();
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().checkContentIsDisplayed(unassignedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedByName(unassignedTaskName);
|
||||
let taskId = tasksCloudDemoPage.taskListCloudComponent().getIdCellValue(unassignedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().getDataTable().selectRowByContentName(unassignedTaskName);
|
||||
tasksCloudDemoPage.taskListCloudComponent().getRow(unassignedTaskName).click();
|
||||
expect(taskDetailsPage.getTaskDetailsHeader()).toContain(taskId);
|
||||
expect(taskDetailsPage.getPropertyLabel('assignee')).toBe('Assignee');
|
||||
expect(taskDetailsPage.getPropertyValue('assignee')).toBe('No assignee');
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user