summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src
diff options
context:
space:
mode:
authorIndrijeet kumar <indriku1@in.ibm.com>2020-06-14 23:42:42 +0530
committerIndrijeet kumar <indriku1@in.ibm.com>2020-06-14 23:42:58 +0530
commit5ac0ca9da72b3340b1fae90c07ea058ee227c313 (patch)
tree5c083db8d53e27d4578f9032c82de2a9b515cc24 /ecomp-sdk/epsdk-app-overlay/src
parent88a56a8071697d2a7dfa7db7e32c8a496218fb70 (diff)
Some modifications in header components
Some modifications in header components Issue-ID: PORTAL-813 Change-Id: I97e0eed195c48c2779440e71cb33a577d19f801e Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-overlay/src')
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.spec.ts9
-rw-r--r--ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts2
2 files changed, 4 insertions, 7 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 bd9bea48..4b3e1c7c 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
@@ -47,7 +47,6 @@ import { LayoutModule } from '../../layout.module';
import { CookieService } from 'ngx-cookie-service';
import { HeaderService } from 'src/app/shared/services/header/header.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { Router } from '@angular/router';
import 'rxjs/add/observable/of';
import { Observable } from 'rxjs/Observable';
@@ -55,11 +54,8 @@ import { Observable } from 'rxjs/Observable';
describe('HeaderComponent', () => {
let headerService:HeaderService;
- let cookieService:CookieService;
- let router:Router;
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
- let spy: any;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -83,7 +79,6 @@ describe('HeaderComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
headerService = TestBed.get(HeaderService);
- cookieService=TestBed.get(CookieService);
});
@@ -96,6 +91,10 @@ describe('HeaderComponent', () => {
let spy=spyOn(headerService, 'getTopMenuItems').and.returnValue(Observable.of('you object'));
component.ngOnInit();
expect(spy).toHaveBeenCalled();
+ expect(component.userFirstName).toEqual(component.response.firstName);
+ expect(component.userEmail).toEqual(component.response.email);
+ expect(component.userId).toEqual(component.response.userid);
+ expect(component.userName).toEqual(component.userName);
})
})
diff --git a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
index 7bf5c649..1e447c72 100644
--- a/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
+++ b/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/layout/components/header/header.component.ts
@@ -38,8 +38,6 @@
import { Component, OnInit } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { HeaderService } from '../../../shared/services/header/header.service';
-import { UserService } from 'src/app/shared/services/user/user.service';
-import { User } from 'src/app/shared/services/user/user';
import { CookieService } from 'ngx-cookie-service';
@Component({