forked from CIT/Vmeda.Online
		
	MOBILE-4138 core: Unprotect updateHandlers on delegates
This commit is contained in:
		
							parent
							
								
									bd96f1a2ae
								
							
						
					
					
						commit
						a6cfe91003
					
				@ -317,7 +317,7 @@ export class CoreDelegate<HandlerType extends CoreDelegateHandler> {
 | 
				
			|||||||
     *
 | 
					     *
 | 
				
			||||||
     * @returns Resolved when done.
 | 
					     * @returns Resolved when done.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    protected async updateHandlers(): Promise<void> {
 | 
					    async updateHandlers(): Promise<void> {
 | 
				
			||||||
        this.handlersLoaded = false;
 | 
					        this.handlersLoaded = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        const enabled = await this.isEnabled();
 | 
					        const enabled = await this.isEnabled();
 | 
				
			||||||
 | 
				
			|||||||
@ -16,7 +16,6 @@ import { mock, mockSingleton } from '@/testing/utils';
 | 
				
			|||||||
import { CoreSite } from '@classes/sites/site';
 | 
					import { CoreSite } from '@classes/sites/site';
 | 
				
			||||||
import { CorePluginFileDelegateService, CorePluginFileHandler } from '@services/plugin-file-delegate';
 | 
					import { CorePluginFileDelegateService, CorePluginFileHandler } from '@services/plugin-file-delegate';
 | 
				
			||||||
import { CoreSites } from '@services/sites';
 | 
					import { CoreSites } from '@services/sites';
 | 
				
			||||||
import { CoreEvents } from '@singletons/events';
 | 
					 | 
				
			||||||
import { CoreUrl } from '@singletons/url';
 | 
					import { CoreUrl } from '@singletons/url';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
describe('CorePluginFileDelegate', () => {
 | 
					describe('CorePluginFileDelegate', () => {
 | 
				
			||||||
@ -33,8 +32,7 @@ describe('CorePluginFileDelegate', () => {
 | 
				
			|||||||
        pluginFileDelegate = new CorePluginFileDelegateService();
 | 
					        pluginFileDelegate = new CorePluginFileDelegateService();
 | 
				
			||||||
        pluginFileDelegate.registerHandler(new ModFooRevisionHandler());
 | 
					        pluginFileDelegate.registerHandler(new ModFooRevisionHandler());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        CoreEvents.trigger(CoreEvents.LOGIN, { siteId: '42' }, '42');
 | 
					        await pluginFileDelegate.updateHandlers();
 | 
				
			||||||
        await pluginFileDelegate.waitForReady();
 | 
					 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it('removes revision from a URL', () => {
 | 
					    it('removes revision from a URL', () => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user