aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource')
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts9
-rw-r--r--vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts2
2 files changed, 6 insertions, 5 deletions
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
index f8ce819f7..f3f951870 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.spec.ts
@@ -24,7 +24,7 @@ describe('Collection Resource Model Info', () => {
let collectionResourceModel: CollectionResourceModelInfo;
let _sharedTreeService : SharedTreeService;
- beforeEach(() => {
+ beforeEach(done => (async () => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule, NgReduxTestingModule],
providers: [
@@ -38,16 +38,17 @@ describe('Collection Resource Model Info', () => {
FeatureFlagsService,
ComponentInfoService,
IframeService]
- }).compileComponents();
-
+ });
+ await TestBed.compileComponents();
injector = getTestBed();
_store = injector.get(NgRedux);
_componentInfoService = injector.get(ComponentInfoService);
+ _sharedTreeService = injector.get(SharedTreeService);
collectionResourceModel = new CollectionResourceModelInfo(_store, _sharedTreeService);
- });
+ })().then(done).catch(done.fail));
test('collection resource should be defined', () => {
expect(collectionResourceModel).toBeDefined();
diff --git a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
index 564e04bc2..339951de5 100644
--- a/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
+++ b/vid-webpack-master/src/app/drawingBoard/service-planning/objectsToTree/models/collectionResource/collectionResource.model.info.ts
@@ -30,7 +30,7 @@ export class CollectionResourceModelInfo implements ILevelNodeInfo{
getModel = (collectionResourceModelId: string, instance: CollectionResourceInstance, serviceHierarchy): CollectionResourceModel => {
const originalModelName = instance.originalName ? instance.originalName : collectionResourceModelId;
- return new CollectionResourceModel(serviceHierarchy[this.name][originalModelName]);
+ return new CollectionResourceModel(this._sharedTreeService.modelByIdentifier(serviceHierarchy, this.name, originalModelName));
};