diff --git a/alfa-client/libs/collaboration-shared/test/collaboration.ts b/alfa-client/libs/collaboration-shared/test/collaboration.ts index da923fb34b96e475b692c6212297e6f612f90be6..6eb8cfcd78c22cd95777be2eab44ddaf0b402ed0 100644 --- a/alfa-client/libs/collaboration-shared/test/collaboration.ts +++ b/alfa-client/libs/collaboration-shared/test/collaboration.ts @@ -9,7 +9,7 @@ import { Collaboration, CollaborationListResource, CollaborationResource } from export function createCollaboration(): Collaboration { return { titel: faker.word.sample(2), - anfrage: faker.word.sample(10), + beschreibung: faker.word.sample(10), zustaendigeStelle: faker.internet.url(), }; } diff --git a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-list-container/collaboration-request/collaboration-request.component.spec.ts b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-list-container/collaboration-request/collaboration-request.component.spec.ts index 475110f0bed27e0514bb693db39a1795a9931f3f..f71e02109844e9cb70d3bcf4e0c17400be4c63e5 100644 --- a/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-list-container/collaboration-request/collaboration-request.component.spec.ts +++ b/alfa-client/libs/collaboration/src/lib/collaboration-in-vorgang-container/collaboration-list-container/collaboration-request/collaboration-request.component.spec.ts @@ -1,19 +1,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { CollaborationResource } from '@alfa-client/collaboration-shared'; +import { createCollaboration } from 'libs/collaboration-shared/test/collaboration'; +import { toResource } from 'libs/tech-shared/test/resource'; import { CollaborationRequestComponent } from './collaboration-request.component'; describe('CollaborationRequestComponent', () => { let component: CollaborationRequestComponent; let fixture: ComponentFixture<CollaborationRequestComponent>; + const collaboration: CollaborationResource = toResource(createCollaboration()); + beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [CollaborationRequestComponent] - }) - .compileComponents(); + declarations: [CollaborationRequestComponent], + }).compileComponents(); fixture = TestBed.createComponent(CollaborationRequestComponent); component = fixture.componentInstance; + component.collaboration = collaboration; fixture.detectChanges(); }); diff --git a/alfa-client/libs/externe-fachstelle/src/lib/externe-fachstelle-list-item-container/externe-fachstelle-list-item/externe-fachstelle-list-item.component.spec.ts b/alfa-client/libs/externe-fachstelle/src/lib/externe-fachstelle-list-item-container/externe-fachstelle-list-item/externe-fachstelle-list-item.component.spec.ts index 2f29f74af186c573cbbaad8c9429b604e9a5a9d7..b9d04c2a4947c3bf9df0b2de18081fbebacb17a1 100644 --- a/alfa-client/libs/externe-fachstelle/src/lib/externe-fachstelle-list-item-container/externe-fachstelle-list-item/externe-fachstelle-list-item.component.spec.ts +++ b/alfa-client/libs/externe-fachstelle/src/lib/externe-fachstelle-list-item-container/externe-fachstelle-list-item/externe-fachstelle-list-item.component.spec.ts @@ -1,19 +1,24 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ExterneFachstelleResource } from '@alfa-client/zustaendige-stelle-shared'; +import { toResource } from 'libs/tech-shared/test/resource'; +import { createExterneFachstelle } from 'libs/zustaendige-stelle-shared/test/externe-fachstelle'; import { ExterneFachstelleListItemComponent } from './externe-fachstelle-list-item.component'; describe('ExterneFachstelleListItemComponent', () => { let component: ExterneFachstelleListItemComponent; let fixture: ComponentFixture<ExterneFachstelleListItemComponent>; + const externeFachstelle: ExterneFachstelleResource = toResource(createExterneFachstelle()); + beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ExterneFachstelleListItemComponent] - }) - .compileComponents(); + imports: [ExterneFachstelleListItemComponent], + }).compileComponents(); fixture = TestBed.createComponent(ExterneFachstelleListItemComponent); component = fixture.componentInstance; + component.externeFachstelle = externeFachstelle; fixture.detectChanges(); }); diff --git a/alfa-client/libs/organisations-einheit/src/lib/organisations-einheit-list-item-container/organisations-einheit-list-item-container.component.spec.ts b/alfa-client/libs/organisations-einheit/src/lib/organisations-einheit-list-item-container/organisations-einheit-list-item-container.component.spec.ts index b45ef3e02085766a278f52ff56fec2cb4a09ec38..299f0da625eb1d9a59c10a186ba3b62c47d4aeaf 100644 --- a/alfa-client/libs/organisations-einheit/src/lib/organisations-einheit-list-item-container/organisations-einheit-list-item-container.component.spec.ts +++ b/alfa-client/libs/organisations-einheit/src/lib/organisations-einheit-list-item-container/organisations-einheit-list-item-container.component.spec.ts @@ -1,6 +1,8 @@ -import { createStateResource } from '@alfa-client/tech-shared'; +import { createStateResource, StateResource } from '@alfa-client/tech-shared'; import { mock, Mock } from '@alfa-client/test-utils'; +import { OrganisationsEinheitResource } from '@alfa-client/zustaendige-stelle-shared'; import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; +import { toResource } from 'libs/tech-shared/test/resource'; import { ZustaendigeStelleResourceService } from 'libs/zustaendige-stelle-shared/src/lib/zustaendige-stelle-resource.service'; import { createOrganisationsEinheit } from 'libs/zustaendige-stelle-shared/test/organisations-einheit'; import { of } from 'rxjs'; @@ -12,12 +14,14 @@ describe('OrganisationsEinheitListItemContainerComponent', () => { let zustaendigeStelleResourceService: Mock<ZustaendigeStelleResourceService>; - const organisationsEinheit = createOrganisationsEinheit(); + const organisationsEinheit: OrganisationsEinheitResource = toResource(createOrganisationsEinheit()); + const organisationsEInheitStateResource: StateResource<OrganisationsEinheitResource> = + createStateResource(organisationsEinheit); beforeEach(async () => { zustaendigeStelleResourceService = { ...mock(ZustaendigeStelleResourceService), - getLinkedResource: jest.fn().mockReturnValue(of(createStateResource(organisationsEinheit))), + getLinkedResource: jest.fn().mockReturnValue(of(organisationsEInheitStateResource)), }; await TestBed.configureTestingModule({ imports: [OrganisationsEinheitListItemContainerComponent] }) @@ -58,7 +62,7 @@ describe('OrganisationsEinheitListItemContainerComponent', () => { component.ngOnInit(); tick(); - expect(component.organisationsEinheit).toBe(organisationsEinheit); + expect(component.organisationsEinheitStateResource.resource).toBe(organisationsEinheit); })); }); });