mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3586] Add processInstanceId input and fix empty response (#3916)
* [ADF-3586] Add processInstanceId input and fix empty response * [ADF-3586] Fix Task Details Model * [ADF-3586] Fix Dates on ProcessList Component * [ADF-3586] Fix Task Details Model * [ADF-3586] Fix attach form unit tests * [ADF-3586] Fix moment.js import * [ADF-3586] Remove fdescribe * [ADF-3586] Fix Attach Form Component unit test
This commit is contained in:
committed by
Eugenio Romano
parent
f0dff4d011
commit
3d0c7449b4
@@ -155,7 +155,7 @@ describe('StartTaskComponent', () => {
|
||||
let successSpy = spyOn(component.success, 'emit');
|
||||
component.appId = 42;
|
||||
component.startTaskModel = new StartTaskModel(startTaskMock);
|
||||
component.formKey = 1204;
|
||||
component.formKey = '1204';
|
||||
fixture.detectChanges();
|
||||
let createTaskButton = <HTMLElement> element.querySelector('#button-start');
|
||||
createTaskButton.click();
|
||||
@@ -216,7 +216,7 @@ describe('StartTaskComponent', () => {
|
||||
let successSpy = spyOn(component.success, 'emit');
|
||||
component.appId = 42;
|
||||
component.startTaskModel = new StartTaskModel(startTaskMock);
|
||||
component.formKey = 1204;
|
||||
component.formKey = '1204';
|
||||
component.assigneeId = testUser.id;
|
||||
fixture.detectChanges();
|
||||
let createTaskButton = <HTMLElement> element.querySelector('#button-start');
|
||||
@@ -232,7 +232,7 @@ describe('StartTaskComponent', () => {
|
||||
it('should not assign task when no assignee is selected', () => {
|
||||
let successSpy = spyOn(component.success, 'emit');
|
||||
component.appId = 42;
|
||||
component.formKey = 1204;
|
||||
component.formKey = '1204';
|
||||
component.assigneeId = null;
|
||||
component.startTaskModel = new StartTaskModel(startTaskMock);
|
||||
fixture.detectChanges();
|
||||
@@ -250,7 +250,7 @@ describe('StartTaskComponent', () => {
|
||||
let successSpy = spyOn(component.success, 'emit');
|
||||
component.appId = 42;
|
||||
component.startTaskModel = new StartTaskModel(startTaskMock);
|
||||
component.formKey = 1204;
|
||||
component.formKey = '1204';
|
||||
component.getAssigneeId(testUser.id);
|
||||
fixture.detectChanges();
|
||||
let createTaskButton = <HTMLElement> element.querySelector('#button-start');
|
||||
|
@@ -63,7 +63,7 @@ export class StartTaskComponent implements OnInit {
|
||||
|
||||
assigneeId: number;
|
||||
|
||||
formKey: number;
|
||||
formKey: string;
|
||||
|
||||
taskId: string;
|
||||
|
||||
@@ -124,10 +124,10 @@ export class StartTaskComponent implements OnInit {
|
||||
this.assigneeId = userId;
|
||||
}
|
||||
|
||||
private attachForm(taskId: string, formKey: number): Observable<any> {
|
||||
private attachForm(taskId: string, formKey: string): Observable<any> {
|
||||
let response = of();
|
||||
if (taskId && formKey) {
|
||||
response = this.taskService.attachFormToATask(taskId, formKey);
|
||||
response = this.taskService.attachFormToATask(taskId, parseInt(formKey, 10));
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
Reference in New Issue
Block a user