diff --git a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts index fdbe4805f6..1e7782078d 100755 --- a/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/start-process/components/start-process-cloud.component.spec.ts @@ -372,7 +372,7 @@ describe('StartProcessCloudComponent', () => { }); })); - it('should reload processes when appId input changed', async(() => { + it('should reload processes when appName input changed', async(() => { component.ngOnChanges({ appName: change }); fixture.detectChanges(); fixture.whenStable().then(() => { @@ -402,6 +402,23 @@ describe('StartProcessCloudComponent', () => { tick(3000); expect(component.filteredProcesses.length).toEqual(1); })); + + it('should display the matching results in the dropdown as the user types down', fakeAsync(() => { + component.processDefinitionList = fakeProcessDefinitions; + component.ngOnInit(); + component.ngOnChanges({ appName: change }); + fixture.detectChanges(); + + component.processForm.controls['processDefinition'].setValue('process'); + fixture.detectChanges(); + tick(3000); + expect(component.filteredProcesses.length).toEqual(3); + + component.processForm.controls['processDefinition'].setValue('processwithfo'); + fixture.detectChanges(); + tick(3000); + expect(component.filteredProcesses.length).toEqual(1); + })); }); describe('start process', () => { @@ -487,7 +504,7 @@ describe('StartProcessCloudComponent', () => { fixture.detectChanges(); }); - it('should able to start the process when the required fields are filled up', (done) => { + it('should be able to start the process when the required fields are filled up', (done) => { component.processForm.controls['processInstanceName'].setValue('My Process 1'); component.processForm.controls['processDefinition'].setValue('NewProcess 1');