diff --git a/src/app/imex/dialog-import-from-url/dialog-import-from-url.component.spec.ts b/src/app/imex/dialog-import-from-url/dialog-import-from-url.component.spec.ts index 3833ac2f8b..c4a5f1b389 100644 --- a/src/app/imex/dialog-import-from-url/dialog-import-from-url.component.spec.ts +++ b/src/app/imex/dialog-import-from-url/dialog-import-from-url.component.spec.ts @@ -11,6 +11,7 @@ import { By } from '@angular/platform-browser'; import { DialogImportFromUrlComponent } from './dialog-import-from-url.component'; import { T } from '../../t.const'; +import { Log } from '../../core/log'; describe('DialogImportFromUrlComponent', () => { let component: DialogImportFromUrlComponent; @@ -161,12 +162,12 @@ describe('DialogImportFromUrlComponent', () => { }); it('should log error when URL is empty', () => { - spyOn(console, 'error'); + spyOn(Log, 'err'); component.url = ''; component.submit(); - expect(console.error).toHaveBeenCalledWith('', 'URL is required.'); + expect(Log.err).toHaveBeenCalledWith('URL is required.'); }); }); diff --git a/src/app/pages/config-page/config-page.component.ts b/src/app/pages/config-page/config-page.component.ts index 541dd9c219..feca1e3101 100644 --- a/src/app/pages/config-page/config-page.component.ts +++ b/src/app/pages/config-page/config-page.component.ts @@ -42,6 +42,7 @@ import { PluginShortcutCfg } from '../../plugins/plugin-api.model'; import { ThemeSelectorComponent } from '../../core/theme/theme-selector/theme-selector.component'; import { Log } from '../../core/log'; import { downloadLogs } from '../../util/download'; +import { SnackService } from '../../core/snack/snack.service'; @Component({ selector: 'config-page', diff --git a/src/app/pfapi/repair/auto-fix-typia-errors.spec.ts b/src/app/pfapi/repair/auto-fix-typia-errors.spec.ts index 46838b5795..df6ecc0b39 100644 --- a/src/app/pfapi/repair/auto-fix-typia-errors.spec.ts +++ b/src/app/pfapi/repair/auto-fix-typia-errors.spec.ts @@ -3,6 +3,7 @@ import { createAppDataCompleteMock } from '../../util/app-data-mock'; import { createValidate } from 'typia'; import { initialTaskState } from '../../features/tasks/store/task.reducer'; import { DEFAULT_TASK, TaskState } from '../../features/tasks/task.model'; +import { PFLog } from '../../core/log'; interface TestInterface { globalConfig: { @@ -20,16 +21,16 @@ interface TestInterface { describe('autoFixTypiaErrors', () => { const validate = createValidate(); - let warnSpy: jasmine.Spy; + let errSpy: jasmine.Spy; beforeEach(() => { - // Spy on console.warn to prevent test output cluttering - warnSpy = spyOn(console, 'warn').and.stub(); + // Spy on PFLog.err to prevent test output cluttering + errSpy = spyOn(PFLog, 'err').and.stub(); }); afterEach(() => { // Reset spies - warnSpy.calls.reset(); + errSpy.calls.reset(); }); it('should return data unchanged when no errors', () => { @@ -173,7 +174,7 @@ describe('autoFixTypiaErrors', () => { '2025-06-16' ], ).toBe(0); - expect(warnSpy).toHaveBeenCalledWith( + expect(errSpy).toHaveBeenCalledWith( "Fixed: simpleCounter.entities['BpYFLFtlIGGgTNfZB-t2-'].countOnDay['2025-06-16'] from null to 0 for simpleCounter", ); });