mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3103] Task List Demo Component (#3486)
* [ADF-3103] Added Process Definition Id to task list component * [ADF-3103] Added @input variable * [ADF-3103] Added search inputs * [ADF-2753] Fixed select inputs * [ADF-3103] Improved logic and funcionality overall * [ADF-3103] FormControl implementation * [ADF-3103] Added AppId input * [ADF-3103] Fixed Link errors * [ADF-3103] Task list table hides when invalid app is selected * [ADF-3103] Lint error * [ADF-3103] Improved user experience * [ADF-3103] changed formControlNames to [FormControl] * [ADF-3103] Improved logic and added localization * [ADF-3103] Removed whitespace * [ADF-3103] Improved logic of task list form * [ADF-3103] fixed trailing whitespaces * [ADF-3103] trailing whitespace fix * [ADF-3103] Added documentation and tests * [ADF-3103] Added tests and documentation * [ADF-3103] Tests fixed
This commit is contained in:
committed by
Eugenio Romano
parent
6508b145d0
commit
495f9937fe
@@ -197,6 +197,32 @@ describe('TaskListComponent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should return the filtered task list by processDefinitionId', (done) => {
|
||||
let state = new SimpleChange(null, 'open', true);
|
||||
let processDefinitionId = new SimpleChange(null, 'fakeprocessDefinitionId', true);
|
||||
let assignment = new SimpleChange(null, 'fake-assignee', true);
|
||||
|
||||
component.success.subscribe((res) => {
|
||||
expect(res).toBeDefined();
|
||||
expect(component.rows).toBeDefined();
|
||||
expect(component.isListEmpty()).not.toBeTruthy();
|
||||
expect(component.rows.length).toEqual(2);
|
||||
expect(component.rows[0]['name']).toEqual('nameFake1');
|
||||
expect(component.rows[0]['processDefinitionId']).toEqual('myprocess:1:4');
|
||||
done();
|
||||
});
|
||||
|
||||
component.ngAfterContentInit();
|
||||
component.ngOnChanges({ 'state': state, 'processDefinitionId': processDefinitionId, 'assignment': assignment });
|
||||
fixture.detectChanges();
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
'status': 200,
|
||||
contentType: 'application/json',
|
||||
responseText: JSON.stringify(fakeGlobalTask)
|
||||
});
|
||||
});
|
||||
|
||||
it('should return the filtered task list for all state', (done) => {
|
||||
let state = new SimpleChange(null, 'all', true);
|
||||
let processInstanceId = new SimpleChange(null, 'fakeprocessId', true);
|
||||
|
@@ -51,6 +51,10 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
@Input()
|
||||
processInstanceId: string;
|
||||
|
||||
/** The Definition Id of the process. */
|
||||
@Input()
|
||||
processDefinitionId: string;
|
||||
|
||||
/** The Definition Key of the process.
|
||||
* @deprecated 2.4.0
|
||||
*/
|
||||
@@ -334,6 +338,7 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
let requestNode = {
|
||||
appDefinitionId: this.appId,
|
||||
processInstanceId: this.processInstanceId,
|
||||
processDefinitionId: this.processDefinitionId,
|
||||
processDefinitionKey: this.processDefinitionKey,
|
||||
text: this.name,
|
||||
assignment: this.assignment,
|
||||
|
Reference in New Issue
Block a user