summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay
diff options
context:
space:
mode:
authorRupinder <rupinsi1@in.ibm.com>2020-03-25 20:13:48 +0530
committerRupinder <rupinsi1@in.ibm.com>2020-03-25 20:15:15 +0530
commit115fbf27c5f61991e3f6ff6e807e35fd3aff4c80 (patch)
tree6cb6f0bafe9b6beb2c5c24ac6da449329cb832cf /ecomp-sdk/epsdk-app-overlay
parentbd71f49adb681c96fd2517662a08ebd41c7e6e3f (diff)
fixed some import errors
Fixed some import errors which was causing the build to fail sometime. Issue-ID: PORTAL-834 Change-Id: Ib4a2a6e5f18b76b8585ad380287184fefdacde87 Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts7
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts8
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.spec.ts3
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/cache-admin/cache-admin.component.spec.ts6
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts13
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.service.spec.ts5
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.spec.ts3
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts5
8 files changed, 20 insertions, 30 deletions
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
index ecbbcc60..ecfd694d 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts
@@ -40,8 +40,6 @@
import { async, ComponentFixture, TestBed, inject } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
-import { HttpClientModule } from '@angular/common/http';
-
import { HeaderComponent } from './header.component';
import { LayoutModule } from '../../layout.module';
import { CookieService } from 'ngx-cookie-service';
@@ -68,7 +66,6 @@ describe('HeaderComponent', () => {
LayoutModule,
RouterTestingModule,
TranslateModule.forRoot(),
- HttpClientModule,
HttpClientTestingModule
],
providers:[CookieService,HeaderService,MockBackend, BaseRequestOptions, {
@@ -116,6 +113,4 @@ describe('HeaderComponent', () => {
it('should test on onLoggedout method',()=>{
expect(localStorage.getItem('isLoggedin')).toBeFalsy
})
-
-
-});
+}); \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts
index 38902784..cc710b5c 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts
@@ -40,7 +40,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
-import { HttpClientModule } from '@angular/common/http';
import { SidebarComponent } from './sidebar.component';
import { LayoutModule } from '../../layout.module';
import { Session } from 'protractor';
@@ -72,7 +71,6 @@ describe('SidebarComponent', () => {
LayoutModule,
RouterTestingModule,
TranslateModule.forRoot(),
- HttpClientModule,
HttpClientTestingModule
],
providers:[CookieService, SidebarService,MockBackend, BaseRequestOptions, {
@@ -136,15 +134,15 @@ describe('SidebarComponent', () => {
it('should test isToggled method',()=>{
expect(component.isToggled()).toBe(false);
- })
+ });
it('should test toggleSidebar method',()=>{
component.pushRightClass="kumar";
expect(component.toggleSidebar()).toBeUndefined;
- })
+ });
it('should test on onLoggedout method',()=>{
expect(localStorage.getItem('isLoggedin')).toBeFalsy
- })
+ });
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.spec.ts
index 44df520c..d23489be 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/admin.service.spec.ts
@@ -2,7 +2,6 @@ import { TestBed, async } from '@angular/core/testing';
import { AdminService } from './admin.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { environment } from 'src/environments/environment';
-import { HttpClientModule } from '@angular/common/http';
describe('AdminService', () => {
@@ -11,7 +10,7 @@ describe('AdminService', () => {
beforeEach(() =>{
TestBed.configureTestingModule({
imports:[HttpClientTestingModule],
- providers: [HttpClientModule,AdminService]
+ providers: [AdminService]
})
service = TestBed.get(AdminService);
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/cache-admin/cache-admin.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/cache-admin/cache-admin.component.spec.ts
index ead4e571..7a4bcec0 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/cache-admin/cache-admin.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/cache-admin/cache-admin.component.spec.ts
@@ -2,19 +2,19 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { CacheAdminComponent } from './cache-admin.component';
import { MatExpansionModule } from '@angular/material';
-import { HttpClient, HttpClientModule } from '@angular/common/http';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('CacheAdminComponent', () => {
let component: CacheAdminComponent;
let fixture: ComponentFixture<CacheAdminComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
- imports:[MatExpansionModule, HttpClientModule],
+ imports:[MatExpansionModule, HttpClientTestingModule],
declarations: [ CacheAdminComponent ],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
.compileComponents();
- }));
+ }));
beforeEach(() => {
fixture = TestBed.createComponent(CacheAdminComponent);
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
index 601d05d7..5627abd0 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/admin/menus/menus.component.spec.ts
@@ -2,7 +2,6 @@ import { async, ComponentFixture, TestBed, inject } from '@angular/core/testing'
import { MatTableModule } from '@angular/material/table';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSortModule } from '@angular/material/sort';
-import { HttpClientModule } from '@angular/common/http';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing';
import { NgbModule, NgbModal } from '@ng-bootstrap/ng-bootstrap';
@@ -11,6 +10,7 @@ import { MenusComponent } from './menus.component';
import { InformationModalComponent } from 'src/app/modals/information-modal/information-modal.component';
import { AdminService } from '../admin.service';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('MenusComponent', () => {
let component: MenusComponent;
@@ -26,7 +26,7 @@ describe('MenusComponent', () => {
imports: [ MatTableModule,
MatPaginatorModule,
MatSortModule,
- HttpClientModule,
+ HttpClientTestingModule,
NoopAnimationsModule,
NgbModule.forRoot() ]
}).
@@ -52,9 +52,10 @@ describe('MenusComponent', () => {
// expect(modalService.open).toHaveBeenCalled();
// });
- // it('should test getDismissReason function', inject([AdminService],(adminservice) => {
- // component.getMenus();
- // expect(adminservice.getFnMenuItems).toHaveBeenCalled();
- // }));
+// it('should test getDismissReason function', inject([AdminService],(adminservice) => {
+// let spy = spyOn(adminservice, 'getFnMenuItems');
+// component.getMenus();
+// expect(spy).toHaveBeenCalled();
+// }));
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.service.spec.ts
index 74dc8b5e..9a734cf6 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/definition/definition.service.spec.ts
@@ -2,17 +2,16 @@ import { TestBed } from '@angular/core/testing';
import { DefinitionService } from './definition.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { HttpClientModule } from '@angular/common/http';
import { environment } from 'src/environments/environment';
-describe('DefinitionServiceService', () => {
+describe('DefinitionService', () => {
let service:DefinitionService;
beforeEach(() =>{
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
- providers:[HttpClientModule,DefinitionService]
+ providers:[DefinitionService]
})
service=TestBed.get(DefinitionService);
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.spec.ts
index acb7a952..f51e6c23 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/form-fields/form-fields.service.spec.ts
@@ -2,7 +2,6 @@ import { TestBed } from '@angular/core/testing';
import { FormFieldsService } from './form-fields.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { HttpClientModule } from '@angular/common/http';
import { environment } from 'src/environments/environment';
describe('FormFieldsService', () => {
@@ -10,7 +9,7 @@ describe('FormFieldsService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [HttpClientTestingModule],
- providers:[HttpClientModule,FormFieldsService]
+ providers:[FormFieldsService]
})
service=TestBed.get(FormFieldsService);
});
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
index d6d659b9..73bdc106 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/shared/services/user/user.service.spec.ts
@@ -1,11 +1,10 @@
import { TestBed } from '@angular/core/testing';
-import { HttpClientModule } from '@angular/common/http';
-
import { UserService } from './user.service';
+import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('UserService', () => {
beforeEach(() => TestBed.configureTestingModule({
- imports:[HttpClientModule]
+ imports:[HttpClientTestingModule]
}));
it('should be created', () => {