[MNT-22613] Viewer extensibility fixes (#7294)

* viewer fixes and unit tests

* update docs

* fix unit test
This commit is contained in:
Denys Vuika
2021-10-12 13:57:13 +01:00
committed by GitHub
parent 567ca18547
commit 254a6cd9d3
4 changed files with 63 additions and 14 deletions

View File

@@ -17,7 +17,7 @@
import { Location } from '@angular/common';
import { SpyLocation } from '@angular/common/testing';
import { ElementRef } from '@angular/core';
import { ChangeDetectorRef, ElementRef } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { ViewerComponent } from '../components/viewer.component';
import { ViewerExtensionDirective } from './viewer-extension.directive';
@@ -43,7 +43,8 @@ describe('ExtensionViewerDirective', () => {
{ provide: Location, useClass: SpyLocation },
ViewerExtensionDirective,
{provide: ElementRef, useClass: MockElementRef},
ViewerComponent
ViewerComponent,
{ provide: ChangeDetectorRef, useValue: { detectChanges: () => {} } }
]
});