perf(frontend): optimize initial bundle size with lazy-loaded dialogs and localized chart providers (#1110)
This commit is contained in:
@@ -4,6 +4,7 @@ import { Router } from '@angular/router';
|
||||
import { of } from 'rxjs';
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
|
||||
import { MessageService } from 'primeng/api';
|
||||
import { getTranslocoModule } from '../../core/testing/transloco-testing';
|
||||
import { BookDialogHelperService } from '../book/components/book-browser/book-dialog-helper.service';
|
||||
import { Book } from '../book/model/book.model';
|
||||
@@ -65,20 +66,21 @@ describe('CommandPaletteService', () => {
|
||||
{ provide: MagicShelfService, useValue: { shelves: signal([]) } },
|
||||
{ provide: LibraryService, useValue: { libraries: signal([]) } },
|
||||
{ provide: UserService, useValue: { currentUser: signal({ permissions: {} }) } },
|
||||
{ provide: MessageService, useValue: { add: vi.fn() } },
|
||||
{ provide: UrlHelperService, useValue: urlHelper },
|
||||
{ provide: IconService, useValue: { getSvgIconContent: vi.fn(() => of('')) } },
|
||||
{
|
||||
provide: DialogLauncherService,
|
||||
useValue: {
|
||||
openLibraryCreateDialog: vi.fn(),
|
||||
openMagicShelfCreateDialog: vi.fn(),
|
||||
openFileUploadDialog: vi.fn(),
|
||||
openLibraryCreateDialog: vi.fn(() => Promise.resolve(null)),
|
||||
openMagicShelfCreateDialog: vi.fn(() => Promise.resolve(null)),
|
||||
openFileUploadDialog: vi.fn(() => Promise.resolve(null)),
|
||||
},
|
||||
},
|
||||
{
|
||||
provide: BookDialogHelperService,
|
||||
useValue: {
|
||||
openShelfCreatorDialog: vi.fn(),
|
||||
openShelfCreatorDialog: vi.fn(() => Promise.resolve(null)),
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user