From c7649505e2651ea9877eae2316ebb3e44ee501d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Morin?= Date: Thu, 22 Feb 2024 18:42:32 -0500 Subject: [PATCH] Second attempt to fix menu.resolver.spec.ts --- src/app/menu.resolver.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/app/menu.resolver.spec.ts b/src/app/menu.resolver.spec.ts index 838d5a53c5b..9f812477b52 100644 --- a/src/app/menu.resolver.spec.ts +++ b/src/app/menu.resolver.spec.ts @@ -19,6 +19,8 @@ import { cold } from 'jasmine-marbles'; import createSpy = jasmine.createSpy; import { createSuccessfulRemoteDataObject$ } from './shared/remote-data.utils'; import { createPaginatedList } from './shared/testing/utils.test'; +import { ConfigurationDataService } from './core/data/configuration-data.service'; +import { ConfigurationDataServiceStub } from './shared/testing/configuration-data.service.stub'; const BOOLEAN = { t: true, f: false }; const MENU_STATE = { @@ -37,6 +39,7 @@ describe('MenuResolver', () => { let browseService; let authorizationService; let scriptService; + let configurationDataService; beforeEach(waitForAsync(() => { menuService = new MenuServiceStub(); @@ -53,6 +56,9 @@ describe('MenuResolver', () => { scriptWithNameExistsAndCanExecute: observableOf(true) }); + configurationDataService = new ConfigurationDataServiceStub(); + spyOn(configurationDataService, 'findByPropertyName').and.returnValue(observableOf(true)); + TestBed.configureTestingModule({ imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], declarations: [AdminSidebarComponent], @@ -61,6 +67,7 @@ describe('MenuResolver', () => { { provide: BrowseService, useValue: browseService }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: ScriptDataService, useValue: scriptService }, + { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: NgbModal, useValue: { open: () => {/*comment*/