[ADF-645] added claim and unclaim event for task details action (#3038)

* [ADF-645] added claim and unclaim event for task details action

* [ADF-645] added new events to documentation
This commit is contained in:
Vito
2018-03-06 15:54:44 +00:00
committed by Eugenio Romano
parent d8e5e55ffa
commit 0f64af39d9
4 changed files with 31 additions and 1 deletions

View File

@@ -108,6 +108,20 @@ describe('TaskDetailsComponent', () => {
expect(getTaskDetailsSpy).not.toHaveBeenCalled();
});
it('should send a claim task event when a task is claimed', async(() => {
component.claimedTask.subscribe((taskId) => {
expect(taskId).toBe('FAKE-TASK-CLAIM');
});
component.onClaimAction('FAKE-TASK-CLAIM');
}));
it('should send a unclaim task event when a task is unclaimed', async(() => {
component.claimedTask.subscribe((taskId) => {
expect(taskId).toBe('FAKE-TASK-UNCLAIM');
});
component.onUnclaimAction('FAKE-TASK-UNCLAIM');
}));
it('should set a placeholder message when taskId not initialised', () => {
fixture.detectChanges();
expect(fixture.nativeElement.innerText).toBe('ADF_TASK_LIST.DETAILS.MESSAGES.NONE');