diff --git a/client/src/app/portal/containers/portal-home.component.spec.ts b/client/src/app/portal/containers/portal-home.component.spec.ts index 18f1e20ca2e61cc33804cfa2cf6196ae2458bfe6..e7e405cbf2d0ba90f1a60e9f8ee896b3f11ecc02 100644 --- a/client/src/app/portal/containers/portal-home.component.spec.ts +++ b/client/src/app/portal/containers/portal-home.component.spec.ts @@ -47,6 +47,7 @@ describe('PortalHomeComponent', () => { fixture = TestBed.createComponent(PortalHomeComponent); component = fixture.componentInstance; store = TestBed.inject(MockStore); + document.body.innerHTML = '<link id="favicon" href="">'; })); it('should create the component', () => { @@ -61,6 +62,7 @@ describe('PortalHomeComponent', () => { { label: 'Admin', icon: 'fas fa-tools', routerLink: '/admin' } ]; expect(component.links).toEqual(expected); + expect(component.favIcon.href).toEqual('http://localhost/favicon.ico'); }); it('should execute ngOnInit lifecycle and add admin link depending on user rights', () => { diff --git a/client/src/app/portal/containers/portal-home.component.ts b/client/src/app/portal/containers/portal-home.component.ts index 62f20635b2c2befe9b69d5eb0d997a1b62e2b058..5a7e3ae9eb65d592850815589e008bffd20c4f9c 100644 --- a/client/src/app/portal/containers/portal-home.component.ts +++ b/client/src/app/portal/containers/portal-home.component.ts @@ -47,7 +47,7 @@ export class PortalHomeComponent implements OnInit, OnDestroy { } ngOnInit() { - // this.favIcon.href = 'favicon.ico'; + this.favIcon.href = 'favicon.ico'; const adminLink = { label: 'Admin', icon: 'fas fa-tools', routerLink: '/admin' }; if (!this.config.authenticationEnabled) { this.links.push(adminLink);