mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-4388]Added edit task filter cloud component - taskId filter tests (#4596)
* Added edit task filter cloud component - taskId filter tests * Update edit-task-filter-cloud-component.page.ts * Fix tests * Fix property test * Fix lint issues
This commit is contained in:
parent
3b83539b13
commit
b87c18bc13
@ -68,6 +68,7 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
await LocalStorageUtil.setConfigField('adf-cloud-task-list', JSON.stringify(jsonFile));
|
await LocalStorageUtil.setConfigField('adf-cloud-task-list', JSON.stringify(jsonFile));
|
||||||
await LocalStorageUtil.setConfigField('adf-edit-task-filter', JSON.stringify({
|
await LocalStorageUtil.setConfigField('adf-edit-task-filter', JSON.stringify({
|
||||||
'filterProperties': [
|
'filterProperties': [
|
||||||
|
'taskId',
|
||||||
'appName',
|
'appName',
|
||||||
'status',
|
'status',
|
||||||
'assignee',
|
'assignee',
|
||||||
@ -163,6 +164,28 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
|
tasksCloudDemoPage.taskListCloudComponent().checkContentIsNotDisplayedByName(createdTask.entry.name);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('[C291906] Should be able to see only the task with specific taskId when typing it in the task Id field', () => {
|
||||||
|
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
|
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
tasksCloudDemoPage.editTaskFilterCloudComponent().setId(createdTask.entry.id);
|
||||||
|
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getId()).toEqual(createdTask.entry.id);
|
||||||
|
tasksCloudDemoPage.taskListCloudComponent().checkContentIsDisplayedById(createdTask.entry.id);
|
||||||
|
tasksCloudDemoPage.taskListCloudComponent().getRowsWithSameId(createdTask.entry.id).then((list) => {
|
||||||
|
expect(list.length).toEqual(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('[C291907] Should be able to see No tasks found when typing an invalid task id', () => {
|
||||||
|
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
|
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
|
||||||
|
tasksCloudDemoPage.editTaskFilterCloudComponent().setId('invalidId');
|
||||||
|
expect(tasksCloudDemoPage.editTaskFilterCloudComponent().getId()).toEqual('invalidId');
|
||||||
|
|
||||||
|
expect(tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||||
|
});
|
||||||
|
|
||||||
it('[C297476] Filter by taskName', () => {
|
it('[C297476] Filter by taskName', () => {
|
||||||
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
@ -239,8 +262,7 @@ describe('Edit task filters and task list properties', () => {
|
|||||||
it('[C297687] Should be able to see No tasks found when typing unused value for priority field', () => {
|
it('[C297687] Should be able to see No tasks found when typing unused value for priority field', () => {
|
||||||
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
tasksCloudDemoPage.myTasksFilter().checkTaskFilterIsDisplayed();
|
||||||
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
expect(tasksCloudDemoPage.getActiveFilterName()).toBe('My Tasks');
|
||||||
|
tasksCloudDemoPage.editTaskFilterCloudComponent().setPriority('87650');
|
||||||
tasksCloudDemoPage.editTaskFilterCloudComponent().setPriority('700');
|
|
||||||
|
|
||||||
expect(tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
expect(tasksCloudDemoPage.taskListCloudComponent().getNoTasksFoundMessage()).toEqual(noTasksFoundMessage);
|
||||||
});
|
});
|
||||||
|
@ -26,6 +26,7 @@ export class EditTaskFilterCloudComponentPage {
|
|||||||
assignee = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
assignee = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-assignee"]'));
|
||||||
priority = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
|
priority = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-priority"]'));
|
||||||
taskName = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
|
taskName = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskName"]'));
|
||||||
|
id = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-taskId"]'));
|
||||||
processDefinitionId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
|
processDefinitionId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processDefinitionId"]'));
|
||||||
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
processInstanceId = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-processInstanceId"]'));
|
||||||
lastModifiedFrom = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-lastModifiedFrom"]'));
|
lastModifiedFrom = element(by.css('input[data-automation-id="adf-cloud-edit-task-property-lastModifiedFrom"]'));
|
||||||
@ -230,6 +231,14 @@ export class EditTaskFilterCloudComponentPage {
|
|||||||
return locator.getText();
|
return locator.getText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setId(option) {
|
||||||
|
return this.setProperty('taskId', option);
|
||||||
|
}
|
||||||
|
|
||||||
|
getId() {
|
||||||
|
return this.id.getAttribute('value');
|
||||||
|
}
|
||||||
|
|
||||||
setTaskName(option) {
|
setTaskName(option) {
|
||||||
return this.setProperty('taskName', option);
|
return this.setProperty('taskName', option);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,10 @@ export class TaskListCloudComponentPage {
|
|||||||
return this.dataTable.getRowsWithSameColumnValues(column.name, taskName);
|
return this.dataTable.getRowsWithSameColumnValues(column.name, taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRowsWithSameId(taskId) {
|
||||||
|
return this.dataTable.getRowsWithSameColumnValues('Id', taskId);
|
||||||
|
}
|
||||||
|
|
||||||
checkRowIsSelected(taskName) {
|
checkRowIsSelected(taskName) {
|
||||||
return this.dataTable.checkRowIsSelected(column.name, taskName);
|
return this.dataTable.checkRowIsSelected(column.name, taskName);
|
||||||
}
|
}
|
||||||
@ -78,12 +82,12 @@ export class TaskListCloudComponentPage {
|
|||||||
return this.dataTable.getCellElementByValue(column.name, taskName);
|
return this.dataTable.getCellElementByValue(column.name, taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkContentIsDisplayedByProcessInstanceId(taskName) {
|
checkContentIsDisplayedById(taskId) {
|
||||||
return this.dataTable.checkContentIsDisplayed(column.processInstanceId, taskName);
|
return this.dataTable.checkContentIsDisplayed(column.id, taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkContentIsDisplayedById(taskName) {
|
checkContentIsDisplayedByProcessInstanceId(taskName) {
|
||||||
return this.dataTable.checkContentIsDisplayed(column.id, taskName);
|
return this.dataTable.checkContentIsDisplayed(column.processInstanceId, taskName);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkContentIsDisplayedByName(taskName) {
|
checkContentIsDisplayedByName(taskName) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user