Skip to content

Commit

Permalink
Second attempt to fix menu.resolver.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-François Morin committed Feb 22, 2024
1 parent 1c6216d commit c764950
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/menu.resolver.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -37,6 +39,7 @@ describe('MenuResolver', () => {
let browseService;
let authorizationService;
let scriptService;
let configurationDataService;

beforeEach(waitForAsync(() => {
menuService = new MenuServiceStub();
Expand All @@ -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],
Expand All @@ -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*/
Expand Down

0 comments on commit c764950

Please sign in to comment.