diff --git a/src/app/map/services/map.service.spec.ts b/src/app/map/services/map.service.spec.ts index de3b0e0faebbcb5dfd143909227a334c629a1fde..eb3b55054360a7cfcab7375d35bb9e02d4e9a277 100644 --- a/src/app/map/services/map.service.spec.ts +++ b/src/app/map/services/map.service.spec.ts @@ -42,6 +42,6 @@ describe('MapService', () => { expect(service.getMarker(2)).toEqual(null); }); it('should not get marker, empty', () => { - expect(service.getMarker(1)).toEqual(null); + expect(service.getMarker(2)).toEqual(null); }); }); diff --git a/src/app/shared/components/logo-card/logo-card.component.html b/src/app/shared/components/logo-card/logo-card.component.html index dd679586ba9339286a7d0686ea671c88ccebf17e..3cc35f78f332a4ec3b744ff6f7ccb9ba60df9c89 100644 --- a/src/app/shared/components/logo-card/logo-card.component.html +++ b/src/app/shared/components/logo-card/logo-card.component.html @@ -1,4 +1,4 @@ -<div fxLayout="column" fxLayoutAlign="center center"> +<div fxLayout="column" fxLayoutAlign="center center" *ngIf="name"> <img [src]="'assets/logos/' + getLogoKey(name) + '.svg'" [alt]="'logo ' + name" /> <p>{{ name }}</p> </div> diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.spec.ts b/src/app/structure-list/components/modal-filter/modal-filter.component.spec.ts index 113f340a66937999f9b30393dd9b3db8dd57f7e4..d81c0bea51f58226b6a965e1961d508d2e6c0f93 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.spec.ts +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.spec.ts @@ -76,7 +76,7 @@ describe('ModalFilterComponent', () => { { id: '167', text: 'training', count: 0 }, ]; component.checkedModules = modules; - const category: Category = { name: 'morefilters', modules: [modules[0], modules[1], modules[2]] }; + const category: Category = new Category({ name: 'morefilters', modules: [modules[0], modules[1], modules[2]] }); component.categories = [category]; component.clearFilters(); expect(component.checkedModules.length).toEqual(3); diff --git a/src/app/structure-list/components/search/search.component.spec.ts b/src/app/structure-list/components/search/search.component.spec.ts index 3b89eff5b6a17a51bab02e5cf2c782abd83aca11..647c986a81195db21a32ba7708eb03e74c9d0296 100644 --- a/src/app/structure-list/components/search/search.component.spec.ts +++ b/src/app/structure-list/components/search/search.component.spec.ts @@ -33,7 +33,7 @@ describe('SearchComponent', () => { // applyFilter function it('should emit filters', () => { - const filter: Filter[] = [new Filter('nomDeVotreStructure', 'valInput', false)]; + const filter: Filter[] = [new Filter('nomDeVotreStructure', 'valInput')]; spyOn(component.searchEvent, 'emit'); component.applyFilter('valInput'); expect(component.searchEvent.emit).toHaveBeenCalled(); diff --git a/src/app/structure-list/components/structure-details/structure-details.component.html b/src/app/structure-list/components/structure-details/structure-details.component.html index 5edf8c8a507a9a924630e3bbfa01e93413c14806..742bd4ac926bda6564c11347a161036c1eaf7718 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.html +++ b/src/app/structure-list/components/structure-details/structure-details.component.html @@ -1,4 +1,4 @@ -<div class="structrue-details-container"> +<div class="structrue-details-container" *ngIf="structure"> <!-- Header info --> <div fxLayout="row" class="structrue-details-block" fxLayoutAlign="baseline baseline" fxLayoutGap="20px"> <em class="ic-arrow-left clickable" (click)="close()"></em> diff --git a/src/app/structure-list/components/structure-details/structure-details.component.spec.ts b/src/app/structure-list/components/structure-details/structure-details.component.spec.ts index c3ac8e9ae13f76c6017a69157462faea738ba19e..46990d19a415f1b9e73e905e7820e23cdb20d47a 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.spec.ts +++ b/src/app/structure-list/components/structure-details/structure-details.component.spec.ts @@ -1,3 +1,4 @@ +import { HttpClientTestingModule } from '@angular/common/http/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { StructureDetailsComponent } from './structure-details.component'; @@ -8,9 +9,9 @@ describe('StructureDetailsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ StructureDetailsComponent ] - }) - .compileComponents(); + declarations: [StructureDetailsComponent], + imports: [HttpClientTestingModule], + }).compileComponents(); }); beforeEach(() => { diff --git a/src/app/structure-list/components/structure-opening-status/structure-opening-status.component.html b/src/app/structure-list/components/structure-opening-status/structure-opening-status.component.html index a03a3a762955c03638985b1f0d9008dc714e76d7..13e779d1b605a7f10e18668a8658e08b72873e4b 100644 --- a/src/app/structure-list/components/structure-opening-status/structure-opening-status.component.html +++ b/src/app/structure-list/components/structure-opening-status/structure-opening-status.component.html @@ -1,4 +1,4 @@ -<div class="statusStructure" fxLayout="row" fxLayoutAlign="start center"> +<div class="statusStructure" fxLayout="row" fxLayoutAlign="start center" *ngIf="structure"> <div> <span *ngIf="structure.isOpen; else closed" class="ico-dot-available"></span> <span>{{ structure.openDisplay() }}</span> diff --git a/src/app/structure-list/services/search.service.spec.ts b/src/app/structure-list/services/search.service.spec.ts index 666955f99731e786af4843fb684ab70f5396b7ef..1103e22369e32ec40986313c9e3267d68f7ba63d 100644 --- a/src/app/structure-list/services/search.service.spec.ts +++ b/src/app/structure-list/services/search.service.spec.ts @@ -28,7 +28,7 @@ describe('SearchService', () => { const m1: Module = { id: '176', text: 'strm1', count: 0 }; const m2: Module = { id: '173', text: 'strm2', count: 0 }; const m3: Module = { id: '172', text: 'strm3', count: 0 }; - const category: Category = { name: 'strCateg', modules: [m1, m2, m3] }; + const category: Category = new Category({ name: 'strCateg', modules: [m1, m2, m3] }); const result = service.setCountModules(category, structureCount); expect(result.modules[0].count).toBe(2); expect(result.modules[1].count).toBe(1);