From a6cfe910034c16769fc09af15e3ef1d70530ff01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 20 Nov 2024 16:01:30 +0100 Subject: [PATCH] MOBILE-4138 core: Unprotect updateHandlers on delegates --- src/core/classes/delegate.ts | 2 +- src/core/services/tests/plugin-file-delegate.test.ts | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/classes/delegate.ts b/src/core/classes/delegate.ts index cc0675e66..b491379c8 100644 --- a/src/core/classes/delegate.ts +++ b/src/core/classes/delegate.ts @@ -317,7 +317,7 @@ export class CoreDelegate { * * @returns Resolved when done. */ - protected async updateHandlers(): Promise { + async updateHandlers(): Promise { this.handlersLoaded = false; const enabled = await this.isEnabled(); diff --git a/src/core/services/tests/plugin-file-delegate.test.ts b/src/core/services/tests/plugin-file-delegate.test.ts index 1db9bdd0c..9fafa1324 100644 --- a/src/core/services/tests/plugin-file-delegate.test.ts +++ b/src/core/services/tests/plugin-file-delegate.test.ts @@ -16,7 +16,6 @@ import { mock, mockSingleton } from '@/testing/utils'; import { CoreSite } from '@classes/sites/site'; import { CorePluginFileDelegateService, CorePluginFileHandler } from '@services/plugin-file-delegate'; import { CoreSites } from '@services/sites'; -import { CoreEvents } from '@singletons/events'; import { CoreUrl } from '@singletons/url'; describe('CorePluginFileDelegate', () => { @@ -33,8 +32,7 @@ describe('CorePluginFileDelegate', () => { pluginFileDelegate = new CorePluginFileDelegateService(); pluginFileDelegate.registerHandler(new ModFooRevisionHandler()); - CoreEvents.trigger(CoreEvents.LOGIN, { siteId: '42' }, '42'); - await pluginFileDelegate.waitForReady(); + await pluginFileDelegate.updateHandlers(); }); it('removes revision from a URL', () => {