From 18febff7a6c8e92d3d30016e6a4d93f7fe521dd0 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Fri, 1 Sep 2023 21:09:40 +0200 Subject: [PATCH] Fix routes not working with baseHref --- .../item-edit-bitstream/item-edit-bitstream.component.html | 2 +- .../item-edit-bitstream.component.spec.ts | 6 +++++- src/app/shared/cookies/klaro-configuration.ts | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html index 0f0fad21993..a3e29ac10c2 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.html @@ -25,7 +25,7 @@
- diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts index aafa5a4fe45..f3c897aa738 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts @@ -13,6 +13,7 @@ import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-dat import { getBitstreamDownloadRoute } from '../../../../app-routing-paths'; import { By } from '@angular/platform-browser'; import { BrowserOnlyMockPipe } from '../../../../shared/testing/browser-only-mock.pipe'; +import { RouterTestingModule } from '@angular/router/testing'; let comp: ItemEditBitstreamComponent; let fixture: ComponentFixture; @@ -72,7 +73,10 @@ describe('ItemEditBitstreamComponent', () => { ); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], + imports: [ + RouterTestingModule.withRoutes([]), + TranslateModule.forRoot(), + ], declarations: [ ItemEditBitstreamComponent, VarDirective, diff --git a/src/app/shared/cookies/klaro-configuration.ts b/src/app/shared/cookies/klaro-configuration.ts index a41b641dec1..c818ddc19cb 100644 --- a/src/app/shared/cookies/klaro-configuration.ts +++ b/src/app/shared/cookies/klaro-configuration.ts @@ -22,7 +22,7 @@ export const GOOGLE_ANALYTICS_KLARO_KEY = 'google-analytics'; export const klaroConfiguration: any = { storageName: ANONYMOUS_STORAGE_NAME_KLARO, - privacyPolicy: '/info/privacy', + privacyPolicy: './info/privacy', /* Setting 'hideLearnMore' to 'true' will hide the "learn more / customize" link in