summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-03 12:12:38 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-12-03 14:38:23 +0200
commitd00cf8079f6ec7d791aa92d9991d95ea0bb4a0e6 (patch)
treea4e3aa972af54847a396e23881c70718f5e4c0d3 /vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts
parent3250d40c952004bb08a1f54dcc7f816a9de09e1f (diff)
free text filter in instantiationStatus Page
Issue-ID: VID-724 Change-Id: I5f363ecc66ff1f1fef9c9d75a12a9c43403aa905 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Diffstat (limited to 'vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts')
-rw-r--r--vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts24
1 files changed, 20 insertions, 4 deletions
diff --git a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts
index 53dfcc1f2..e6ccdda8e 100644
--- a/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts
+++ b/vid-webpack-master/src/app/instantiationStatus/instantiationStatus.component.spec.ts
@@ -17,7 +17,10 @@ import {FeatureFlagsService} from "../shared/services/featureFlag/feature-flags.
import {JobStatus, ServiceAction} from "../shared/models/serviceInstanceActions";
import each from 'jest-each';
import {ServiceInfoModel} from "../shared/server/serviceInfo/serviceInfo.model";
-import { TooltipModule } from 'ngx-tooltip';
+import {TooltipModule} from 'ngx-tooltip';
+import {SearchFilterPipe} from "../shared/pipes/searchFilter/search-filter.pipe";
+import {ActivatedRoute} from "@angular/router";
+import {FormsModule} from "@angular/forms";
class MockAppStore<T> {
@@ -36,10 +39,21 @@ class MockAppStore<T> {
}
}
+class ActivatedRouteMock<T>{
+ queryParams() {
+ return {}
+ };
+
+ snapshot = {
+ queryParams : {}
+ }
+}
+
describe('Instantiation Status Component', () => {
let component: InstantiationStatusComponent;
let fixture: ComponentFixture<InstantiationStatusComponent>;
-let item = new ServiceInfoModel();
+ let item = new ServiceInfoModel();
+
beforeAll(done => (async () => {
TestBed.configureTestingModule({
@@ -48,7 +62,8 @@ let item = new ServiceInfoModel();
ContextMenuModule,
ScrollToModule.forRoot(),
RouterTestingModule,
- TooltipModule
+ TooltipModule,
+ FormsModule,
],
providers: [
ServiceInfoService,
@@ -59,9 +74,10 @@ let item = new ServiceInfoModel();
FeatureFlagsService,
ConfigurationService,
LogService,
+ {provide: ActivatedRoute, useClass: ActivatedRouteMock},
{provide: NgRedux, useClass: MockAppStore}
],
- declarations: [InstantiationStatusComponent, CapitalizeAndFormatPipe],
+ declarations: [InstantiationStatusComponent, CapitalizeAndFormatPipe, SearchFilterPipe],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
});
await TestBed.compileComponents();