mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Use ecmHost in case of startFormEvent (#5318)
This commit is contained in:
parent
acd5d78662
commit
a63e487637
@ -37,16 +37,23 @@ describe('FormCloudComponent', () => {
|
||||
let visibilityService: WidgetVisibilityService;
|
||||
let logService: LogService;
|
||||
let formRenderingService: FormRenderingService;
|
||||
let appConfigService: AppConfigService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
logService = new LogService(null);
|
||||
formRenderingService = TestBed.get(FormRenderingService);
|
||||
visibilityService = new WidgetVisibilityService(null, logService);
|
||||
spyOn(visibilityService, 'refreshVisibility').and.stub();
|
||||
appConfigService = TestBed.get(AppConfigService);
|
||||
spyOn(appConfigService, 'get').and.returnValue([]);
|
||||
spyOn(formRenderingService, 'setComponentTypeResolver').and.returnValue(true);
|
||||
formCloudService = new FormCloudService(null, new AppConfigService(null));
|
||||
formService = new FormService(null, null, logService);
|
||||
formComponent = new FormCloudComponent(formCloudService, formService, null, formRenderingService, visibilityService);
|
||||
formComponent = new FormCloudComponent(formCloudService, formService, null, formRenderingService, visibilityService, appConfigService);
|
||||
|
||||
});
|
||||
|
||||
|
@ -33,7 +33,8 @@ import {
|
||||
FORM_FIELD_VALIDATORS,
|
||||
FormFieldValidator,
|
||||
FormValues,
|
||||
FormModel
|
||||
FormModel,
|
||||
AppConfigService
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
@ -110,7 +111,8 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
protected formService: FormService,
|
||||
private notificationService: NotificationService,
|
||||
private formRenderingService: FormRenderingService,
|
||||
protected visibilityService: WidgetVisibilityService) {
|
||||
protected visibilityService: WidgetVisibilityService,
|
||||
private appConfigService: AppConfigService) {
|
||||
super();
|
||||
|
||||
this.formService.formContentClicked
|
||||
@ -203,7 +205,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.visibilityService.refreshVisibility(<any> parsedForm);
|
||||
parsedForm.validateForm();
|
||||
this.form = parsedForm;
|
||||
|
||||
this.form.contentHost = this.appConfigService.get('ecmHost');
|
||||
this.onFormLoaded(this.form);
|
||||
resolve(this.form);
|
||||
},
|
||||
@ -231,6 +233,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.visibilityService.refreshVisibility(<any> parsedForm);
|
||||
parsedForm.validateForm();
|
||||
this.form = parsedForm;
|
||||
this.form.contentHost = this.appConfigService.get('ecmHost');
|
||||
this.onFormLoaded(this.form);
|
||||
},
|
||||
(error) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user