mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#1308 - fix test for PR
This commit is contained in:
@@ -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', () => {
|
||||||
|
@@ -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.
|
||||||
|
@@ -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();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user