[ADF - 1114] Process comments - Share the same comment between Task and Process (#2105)

* changed process comment template and used task comment component

* changed getTaskComment, getProcessInstanceComment, addTaskComment and addProcessInstanceComment to getComments and addComment

* removed provider from task comment component

* extended tasklist service and changed comment-list container css

* changed process service methods and associated test cases

* added error emitter and test cases for process-comments component

* fixed process header component test case
This commit is contained in:
Infad Kachancheri
2017-07-19 22:26:12 +05:30
committed by Maurizio Vitale
parent 85f9f5415d
commit cd03f6a435
12 changed files with 154 additions and 317 deletions

View File

@@ -66,12 +66,12 @@ describe('CommentsComponent', () => {
component = fixture.componentInstance;
service = fixture.debugElement.injector.get(TaskListService);
getCommentsSpy = spyOn(service, 'getTaskComments').and.returnValue(Observable.of([
getCommentsSpy = spyOn(service, 'getComments').and.returnValue(Observable.of([
{ message: 'Test1', created: Date.now(), createdBy: {firstName: 'Admin', lastName: 'User'} },
{ message: 'Test2', created: Date.now(), createdBy: {firstName: 'Admin', lastName: 'User'} },
{ message: 'Test3', created: Date.now(), createdBy: {firstName: 'Admin', lastName: 'User'} }
]));
addCommentSpy = spyOn(service, 'addTaskComment').and.returnValue(Observable.of({id: 123, message: 'Test Comment'}));
addCommentSpy = spyOn(service, 'addComment').and.returnValue(Observable.of({id: 123, message: 'Test Comment'}));
componentHandler = jasmine.createSpyObj('componentHandler', [
'upgradeAllRegistered',