[ACA-4022] Remove custom redirect strategy, the viewer doesn not reload (#1719)

* remove custom redirect strategy, the viewer doesn not reload

* Update extensions-data-loader.guard.ts

add return in case of no loaders

* remove the route strategy

* fix lint

* Fix link error

* Align unit test

Co-authored-by: Maurizio Vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Andras Popovics <popovics@ndras.hu>
This commit is contained in:
Eugenio Romano
2020-10-06 17:45:03 +01:00
committed by GitHub
parent 50c76f21e7
commit ba2961157a
8 changed files with 12 additions and 247 deletions

View File

@@ -126,13 +126,15 @@ describe('ExtensionsDataLoaderGuard', () => {
return subject1.asObservable();
}
};
const extensionLoaderSpy = spyOn(extensionLoaders, 'fct1');
const extensionLoaderSpy = spyOn(extensionLoaders, 'fct1').and.callThrough();
const guard = new ExtensionsDataLoaderGuard([extensionLoaders.fct1]);
guard.canActivate(route).subscribe(emittedSpy, erroredSpy, completedSpy);
expect(extensionLoaderSpy).toHaveBeenCalled();
extensionLoaderSpy.calls.reset();
subject1.next(true);
subject1.complete();
guard.canActivate(route).subscribe(emittedSpy, erroredSpy, completedSpy);
expect(extensionLoaderSpy).not.toHaveBeenCalled();
});