[AAE-4966] Extensible app config (#6914)

* merge app config from the extensions

* improved service injection in unit tests

* extra unit test

* fix content tests

* update code as per review

* fix lint

* fix lint

* update code and tests

* update schema
This commit is contained in:
Denys Vuika
2021-04-13 14:16:29 +01:00
committed by GitHub
parent bd8242922b
commit 84ce202ad2
54 changed files with 383 additions and 204 deletions

View File

@@ -16,8 +16,9 @@
*/
import { Injectable } from '@angular/core';
import { AppConfigService } from '../app-config/app-config.service';
import { AppConfigService, Status } from '../app-config/app-config.service';
import { HttpClient } from '@angular/common/http';
import { ExtensionService } from '@alfresco/adf-extensions';
@Injectable()
export class AppConfigServiceMock extends AppConfigService {
@@ -30,13 +31,14 @@ export class AppConfigServiceMock extends AppConfigService {
logLevel: 'silent'
};
constructor(http: HttpClient) {
super(http);
constructor(http: HttpClient, extensionService: ExtensionService) {
super(http, extensionService);
}
load(): Promise<any> {
return new Promise((resolve) => {
this.onLoadSubject.next(this.config);
this.status = Status.LOADED;
this.onDataLoaded(this.config);
resolve(this.config);
});
}