mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-42658 Remove check for outcome.id as name based outcomes are valid (#11685)
This commit is contained in:
@@ -610,6 +610,19 @@ describe('FormCloudComponent', () => {
|
||||
expect(formComponent.completeTaskForm).toHaveBeenCalledWith(outcomeName, outcomeId);
|
||||
});
|
||||
|
||||
it('should complete form on custom outcome click when id is null (APS)', () => {
|
||||
const formModel = new FormModel();
|
||||
const outcomeName = 'Custom Action';
|
||||
const outcome = new FormOutcomeModel(formModel, { name: outcomeName, id: null });
|
||||
|
||||
formComponent.form = formModel;
|
||||
spyOn(formComponent, 'completeTaskForm').and.stub();
|
||||
|
||||
const result = formComponent.onOutcomeClicked(outcome);
|
||||
expect(result).toBeTruthy();
|
||||
expect(formComponent.completeTaskForm).toHaveBeenCalledWith(outcomeName, null);
|
||||
});
|
||||
|
||||
it('should save form on [save] outcome click', () => {
|
||||
const formModel = new FormModel();
|
||||
const outcome = new FormOutcomeModel(formModel, {
|
||||
|
||||
Reference in New Issue
Block a user