mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[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:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user