[ADF-3943] Remove non-working filters from Edit Task Filter Cloud (#4194)

* [ADF-3943] Remove non-working filters from Edit Task Filter Cloud and add live configuration for Task List Cloud Component

* [ADF-3943] Fix unit test
This commit is contained in:
davidcanonieto
2019-01-27 02:17:42 +00:00
committed by Eugenio Romano
parent eb3a45cde9
commit 6fffeef5c6
8 changed files with 63 additions and 62 deletions

View File

@@ -265,13 +265,13 @@ describe('EditTaskFilterCloudComponent', () => {
}));
it('should able to build a editTaskFilter form with given input properties', async(() => {
getTaskFilterSpy.and.returnValue({ processInstanceId: 'process-instance-id', dueBefore: 'Fri Jan 04 2019 19:16:32 GMT+0530 (IST)' });
getTaskFilterSpy.and.returnValue({ processInstanceId: 'process-instance-id', priority: '12' });
component.appName = 'mock-app-name';
component.filterProperties = ['appName', 'processInstanceId', 'dueBefore'];
component.filterProperties = ['appName', 'processInstanceId', 'priority'];
let change = new SimpleChange(undefined, 'mock-task-id', true);
component.ngOnChanges({ 'id': change });
const appController = component.editTaskFilterForm.get('appName');
const dueDateController = component.editTaskFilterForm.get('dueBefore');
const propertyController = component.editTaskFilterForm.get('priority');
const processInsIdController = component.editTaskFilterForm.get('processInstanceId');
fixture.detectChanges();
fixture.whenStable().then(() => {
@@ -281,7 +281,7 @@ describe('EditTaskFilterCloudComponent', () => {
expect(component.editTaskFilterForm).toBeDefined();
expect(component.taskFilterProperties.length).toBe(3);
expect(appController).toBeDefined();
expect(dueDateController).toBeDefined();
expect(propertyController.value).toBe('12');
expect(processInsIdController).toBeDefined();
expect(appController.value).toBe('mock-app-name');
expect(processInsIdController.value).toBe('process-instance-id');

View File

@@ -330,42 +330,6 @@ export class EditTaskFilterCloudComponent implements OnChanges {
key: 'processInstanceId',
value: currentTaskFilter.processInstanceId || ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_AFTER',
type: 'date',
key: 'dueAfter',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_BEFORE',
type: 'date',
key: 'dueBefore',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CLAIMED_DATE_FROM',
type: 'date',
key: 'claimedDateFrom',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CLAIMED_DATE_TO',
type: 'date',
key: 'claimedDateTo',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CREATED_DATE_FORM',
type: 'date',
key: 'createdDateFrom',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CREATED_DATE_TO',
type: 'date',
key: 'createdDateTo',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.TASK_NAME',
type: 'text',
@@ -409,18 +373,6 @@ export class EditTaskFilterCloudComponent implements OnChanges {
type: 'text',
key: 'owner',
value: currentTaskFilter.owner || ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_DATE_FROM',
type: 'date',
key: 'dueDateFrom',
value: ''
}),
new TaskFilterProperties({
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_DATE_TO',
type: 'date',
key: 'dueDateTo',
value: ''
})
];
}