errors resolved in 3 components 03/102203/1
authorIndrijeet kumar <indriku1@in.ibm.com>
Mon, 24 Feb 2020 08:06:06 +0000 (13:36 +0530)
committerIndrijeet kumar <indriku1@in.ibm.com>
Mon, 24 Feb 2020 08:07:04 +0000 (13:37 +0530)
errors resolved in new-role, column-list & edit-drill-down-link comp

Issue-ID: PORTAL-813
Change-Id: Ia9a0c102149f372cf2763d48f6717a9a24ed4d5f
Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/roles/new-role/new-role.component.spec.ts
ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/column-list/column-list.component.spec.ts
ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/columns/columns-edit-component/edit-drill-down-link/edit-drill-down-link.component.spec.ts

index 2049b85..b832b6a 100644 (file)
@@ -4,7 +4,9 @@
  * ===================================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
  * ===================================================================
- *
+ * Modification Copyright © 2020 IBM.
+ * ===================================================================
  * Unless otherwise specified, all software contained herein is licensed
  * under the Apache License, Version 2.0 (the "License");
  * you may not use this software except in compliance with the License.
  */
 
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
-
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
 import { NewRoleComponent } from './new-role.component';
+import { FormsModule } from '@angular/forms';
+import { MatTableModule } from '@angular/material';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
+import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
 
 describe('NewRoleComponent', () => {
   let component: NewRoleComponent;
@@ -46,7 +52,14 @@ describe('NewRoleComponent', () => {
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ NewRoleComponent ]
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+      declarations: [ NewRoleComponent ],
+      imports:[
+        FormsModule,
+        MatTableModule,
+        HttpClientTestingModule
+      ],
+      providers:[NgbActiveModal]
     })
     .compileComponents();
   }));
@@ -60,4 +73,4 @@ describe('NewRoleComponent', () => {
   it('should create', () => {
     expect(component).toBeTruthy();
   });
-});
+});
\ No newline at end of file
index a4364cc..6d6e943 100644 (file)
@@ -1,29 +1,35 @@
+
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 import { NoopAnimationsModule } from '@angular/platform-browser/animations';
 import { MatPaginatorModule } from '@angular/material/paginator';
 import { MatSortModule } from '@angular/material/sort';
 import { MatTableModule } from '@angular/material/table';
+import { ColumnListComponent } from './column-list.component';
+import { FormsModule } from '@angular/forms';
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 
-import { DataTableComponent } from './data-table.component';
-
-describe('DataTableComponent', () => {
-  let component: DataTableComponent;
-  let fixture: ComponentFixture<DataTableComponent>;
+describe('ColumnListComponent', () => {
+  let component: ColumnListComponent;
+  let fixture: ComponentFixture<ColumnListComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ DataTableComponent ],
+      declarations: [ ColumnListComponent ],
       imports: [
         NoopAnimationsModule,
         MatPaginatorModule,
         MatSortModule,
         MatTableModule,
-      ]
+        FormsModule,
+        HttpClientTestingModule
+      ],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA]
     }).compileComponents();
   }));
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(DataTableComponent);
+    fixture = TestBed.createComponent(ColumnListComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });
@@ -31,4 +37,5 @@ describe('DataTableComponent', () => {
   it('should compile', () => {
     expect(component).toBeTruthy();
   });
+
 });
index ad5f13f..957be88 100644 (file)
@@ -1,6 +1,8 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { EditDrillDownLinkComponent } from './edit-drill-down-link.component';
+import { FormsModule } from '@angular/forms';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
 
 describe('EditDrillDownLinkComponent', () => {
   let component: EditDrillDownLinkComponent;
@@ -8,7 +10,11 @@ describe('EditDrillDownLinkComponent', () => {
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ EditDrillDownLinkComponent ]
+      declarations: [ EditDrillDownLinkComponent ],
+      imports:[
+        FormsModule,
+        HttpClientTestingModule
+      ]
     })
     .compileComponents();
   }));
@@ -17,9 +23,4 @@ describe('EditDrillDownLinkComponent', () => {
     fixture = TestBed.createComponent(EditDrillDownLinkComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
-  });
-
-  it('should create', () => {
-    expect(component).toBeTruthy();
-  });
-});
+  });
\ No newline at end of file