mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
fix tslint error in tasklist
This commit is contained in:
@@ -50,7 +50,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
ActivitiStartProcessInstance
|
ActivitiStartProcessInstance
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoTranslationService, useClass: TranslationMock },
|
{provide: AlfrescoTranslationService, useClass: TranslationMock},
|
||||||
ActivitiProcessService,
|
ActivitiProcessService,
|
||||||
FormService
|
FormService
|
||||||
]
|
]
|
||||||
@@ -80,7 +80,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
|
|
||||||
it('should call service to fetch process definitions', () => {
|
it('should call service to fetch process definitions', () => {
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(getDefinitionsSpy).toHaveBeenCalled();
|
expect(getDefinitionsSpy).toHaveBeenCalled();
|
||||||
@@ -88,7 +88,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
|
|
||||||
it('should call service to fetch process definitions with appId when provided', () => {
|
it('should call service to fetch process definitions with appId when provided', () => {
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(getDefinitionsSpy).toHaveBeenCalledWith('123');
|
expect(getDefinitionsSpy).toHaveBeenCalledWith('123');
|
||||||
@@ -96,7 +96,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
|
|
||||||
it('should display the correct number of processes in the select list', () => {
|
it('should display the correct number of processes in the select list', () => {
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
let selectElement = debugElement.query(By.css('select'));
|
let selectElement = debugElement.query(By.css('select'));
|
||||||
@@ -105,7 +105,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
|
|
||||||
it('should display the correct process def details', async(() => {
|
it('should display the correct process def details', async(() => {
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -118,7 +118,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
it('should indicate an error to the user if process defs cannot be loaded', async(() => {
|
it('should indicate an error to the user if process defs cannot be loaded', async(() => {
|
||||||
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.throw({}));
|
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.throw({}));
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -131,7 +131,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
it('should show no process available message when no process definition is loaded', async(() => {
|
it('should show no process available message when no process definition is loaded', async(() => {
|
||||||
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.of([]));
|
getDefinitionsSpy = getDefinitionsSpy.and.returnValue(Observable.of([]));
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
@@ -158,12 +158,12 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should reload processes when appId input changed', () => {
|
it('should reload processes when appId input changed', () => {
|
||||||
component.ngOnChanges({ appId: change });
|
component.ngOnChanges({appId: change});
|
||||||
expect(getDefinitionsSpy).toHaveBeenCalledWith('456');
|
expect(getDefinitionsSpy).toHaveBeenCalledWith('456');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should reload processes when appId input changed to null', () => {
|
it('should reload processes when appId input changed to null', () => {
|
||||||
component.ngOnChanges({ appId: nullChange });
|
component.ngOnChanges({appId: nullChange});
|
||||||
expect(getDefinitionsSpy).toHaveBeenCalledWith(null);
|
expect(getDefinitionsSpy).toHaveBeenCalledWith(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
component.name = 'My new process';
|
component.name = 'My new process';
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call service to start process if required fields provided', async(() => {
|
it('should call service to start process if required fields provided', async(() => {
|
||||||
@@ -207,7 +207,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should call service to start process with the variables setted', async(() => {
|
it('should call service to start process with the variables setted', async(() => {
|
||||||
let inputProcessVariable:RestVariable[] = [];
|
let inputProcessVariable: RestVariable[] = [];
|
||||||
|
|
||||||
let variable: RestVariable;
|
let variable: RestVariable;
|
||||||
variable.name = 'nodeId';
|
variable.name = 'nodeId';
|
||||||
@@ -234,7 +234,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
|
|
||||||
it('should throw error event when process cannot be started', async(() => {
|
it('should throw error event when process cannot be started', async(() => {
|
||||||
let errorSpy = spyOn(component.error, 'error');
|
let errorSpy = spyOn(component.error, 'error');
|
||||||
let error = { message: 'My error' };
|
let error = {message: 'My error'};
|
||||||
startProcessSpy = startProcessSpy.and.returnValue(Observable.throw(error));
|
startProcessSpy = startProcessSpy.and.returnValue(Observable.throw(error));
|
||||||
component.onProcessDefChange('my:process1');
|
component.onProcessDefChange('my:process1');
|
||||||
component.startProcess();
|
component.startProcess();
|
||||||
@@ -266,7 +266,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
component.name = 'My new process';
|
component.name = 'My new process';
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.onProcessDefChange('my:process1');
|
component.onProcessDefChange('my:process1');
|
||||||
fixture.whenStable();
|
fixture.whenStable();
|
||||||
@@ -298,7 +298,7 @@ describe('ActivitiStartProcessInstance', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
getDefinitionsSpy.and.returnValue(Observable.of(fakeProcessDefWithForm));
|
getDefinitionsSpy.and.returnValue(Observable.of(fakeProcessDefWithForm));
|
||||||
let change = new SimpleChange(null, '123', true);
|
let change = new SimpleChange(null, '123', true);
|
||||||
component.ngOnChanges({ 'appId': change });
|
component.ngOnChanges({'appId': change});
|
||||||
component.onProcessDefChange('my:process1');
|
component.onProcessDefChange('my:process1');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
fixture.whenStable();
|
fixture.whenStable();
|
||||||
|
Reference in New Issue
Block a user