diff --git a/src/app/shared/cms/components/cms-navigation-page/cms-navigation-page.component.spec.ts b/src/app/shared/cms/components/cms-navigation-page/cms-navigation-page.component.spec.ts index e6955e4759..cef467f48c 100644 --- a/src/app/shared/cms/components/cms-navigation-page/cms-navigation-page.component.spec.ts +++ b/src/app/shared/cms/components/cms-navigation-page/cms-navigation-page.component.spec.ts @@ -89,9 +89,11 @@ describe('Cms Navigation Page Component', () => { }, }, }; + const contentPageTreeView = createCompleteContentPageTreeView(pageTree, 'ebene_1', 8); beforeEach(async () => { - cmsFacade = mock(cmsFacade); + cmsFacade = mock(CMSFacade); + when(cmsFacade.completeContentPageTree$(anything(), anything())).thenReturn(of(contentPageTreeView)); await TestBed.configureTestingModule({ imports: [RouterTestingModule], @@ -109,10 +111,6 @@ describe('Cms Navigation Page Component', () => { fixture = TestBed.createComponent(CMSNavigationPageComponent); component = fixture.componentInstance; element = fixture.nativeElement; - - when(cmsFacade.completeContentPageTree$(anything(), anything())).thenReturn( - of(createCompleteContentPageTreeView(pageTree, 'ebene_1', 8)) - ); }); it('should be created', () => {