#1308 - fix test for PR

This commit is contained in:
Vito Albano
2016-12-19 19:16:59 +00:00
parent 8e707e7d9b
commit 21d716c8a9
3 changed files with 6 additions and 7 deletions

View File

@@ -102,7 +102,7 @@ describe('ActivitiStartForm', () => {
component.ngOnInit(); component.ngOnInit();
}); });
it('should not show outcome buttons by default', () => { it('should show outcome buttons by default', () => {
getStartFormSpy.and.returnValue(Observable.of({ getStartFormSpy.and.returnValue(Observable.of({
id: '1', id: '1',
processDefinitionName: 'my:process', processDefinitionName: 'my:process',
@@ -114,7 +114,7 @@ describe('ActivitiStartForm', () => {
component.processDefinitionId = exampleId1; component.processDefinitionId = exampleId1;
component.ngOnInit(); component.ngOnInit();
fixture.detectChanges(); fixture.detectChanges();
expect(component.outcomesContainer).not.toBeTruthy(); expect(component.outcomesContainer).toBeTruthy();
}); });
it('should show outcome buttons if showOutcomeButtons is true', () => { it('should show outcome buttons if showOutcomeButtons is true', () => {

View File

@@ -39,8 +39,7 @@ import { WidgetVisibilityService } from './../services/widget-visibility.servic
* *
* @Input * @Input
* {processDefinitionId} string: The process definition ID * {processDefinitionId} string: The process definition ID
* {showOutcomeButtons} boolean: Whether form outcome buttons should be shown, as yet these don't do anything so this * {showOutcomeButtons} boolean: Whether form outcome buttons should be shown, this is now always active to show form outcomes
* is false by default
* @Output * @Output
* {formLoaded} EventEmitter - This event is fired when the form is loaded, it pass all the value in the form. * {formLoaded} EventEmitter - This event is fired when the form is loaded, it pass all the value in the form.
* {formSaved} EventEmitter - This event is fired when the form is saved, it pass all the value in the form. * {formSaved} EventEmitter - This event is fired when the form is saved, it pass all the value in the form.

View File

@@ -171,7 +171,7 @@ describe('ActivitiStartProcessInstance', () => {
component.onProcessDefChange('my:process1'); component.onProcessDefChange('my:process1');
component.startProcess(); component.startProcess();
fixture.whenStable().then(() => { fixture.whenStable().then(() => {
expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined); expect(startProcessSpy).toHaveBeenCalledWith('my:process1', 'My new process', undefined, undefined);
}); });
})); }));
@@ -262,10 +262,10 @@ describe('ActivitiStartProcessInstance', () => {
expect(getStartFormDefinitionSpy).toHaveBeenCalled(); expect(getStartFormDefinitionSpy).toHaveBeenCalled();
}); });
it('should leave start button disabled when mandatory fields not filled out', async(() => { it('should not show the start process button', async(() => {
component.name = 'My new process'; component.name = 'My new process';
fixture.detectChanges(); fixture.detectChanges();
expect(startBtn.properties['disabled']).toBe(true); expect(startBtn).toBeNull();
})); }));
}); });