diff options
author | Lorraine Welch <lb2391@att.com> | 2020-04-27 00:08:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-27 00:08:34 +0000 |
commit | 977e26f9697ad01bae3d354bf7c60279fd034aa0 (patch) | |
tree | 701b8c095c2182cbe37094a584a24280626b4023 /ecomp-sdk/epsdk-app-overlay/src/main/webapp | |
parent | da7f81c50c38739f63763eb4c5b6ad4156b1706f (diff) | |
parent | 4d1ac762a89617d59867661df153c4d40a59e8cc (diff) |
Merge "some test cases in sidebar component"
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp')
-rw-r--r-- | ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts | 19 |
1 files changed, 15 insertions, 4 deletions
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 7f5a43fe..42c176bf 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 @@ -37,6 +37,7 @@ * * */ + import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; @@ -55,13 +56,15 @@ describe('SidebarComponent', () => { let sidebarService: SidebarService; var stubData1={ - "data":'{"data":"cachedRegions"}', - "data2":'{"data2":"cachedRegions2"}' + "data":'"d"', + "data2":'"data2"' }; - + var stubData2={ + "data":'"d"', + "data2":'" "' + }; beforeEach(async(() => { - let sidebarService: SidebarService; TestBed.configureTestingModule({ imports: [ LayoutModule, @@ -102,6 +105,14 @@ describe('SidebarComponent', () => { }) }) + //describe('should test ngOnInit if part',()=>{ + //it('should validate on ngOnInit',()=>{ + //let spy=spyOn(sidebarService,'getLeftMenu').and.returnValue(Observable.of(stubData2)); + // component.ngOnInit(); + //expect(spy).toHaveBeenCalled(); + //}) + //}) + it('should test addExpandClass if element and showMenu variable value are same', () => { component.showMenu= '1'; component.addExpandClass('1'); |