[ADF-3274] people widget instead of the people list (#3582)

* people list added

* tests added

* style fix

* Update start-task.component.ts

Use correct import

* Update people.widget.spec.ts

add the async

* peopleSelected test fixed
This commit is contained in:
Maurizio Vitale
2018-07-23 09:23:33 +01:00
committed by Eugenio Romano
parent 855fdd8f48
commit 0274088114
7 changed files with 63 additions and 9 deletions

View File

@@ -245,6 +245,23 @@ describe('StartTaskComponent', () => {
assignee: null
});
});
it('should assign task with id of selected user assigned', () => {
let successSpy = spyOn(component.success, 'emit');
component.appId = 42;
component.startTaskmodel = new StartTaskModel(startTaskMock);
component.formKey = 1204;
component.getAssigneeId(testUser.id);
fixture.detectChanges();
let createTaskButton = <HTMLElement> element.querySelector('#button-start');
createTaskButton.click();
expect(successSpy).toHaveBeenCalledWith({
id: 91,
name: 'fakeName',
formKey: 1204,
assignee: testUser
});
});
});
it('should not attach a form when a form id is not slected', () => {