summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/sidebar/sidebar.component.spec.ts19
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');