diff --git a/apps/datahub-e2e/src/e2e/dataset.cy.ts b/apps/datahub-e2e/src/e2e/dataset.cy.ts index 6b9607ac..f442d5d1 100644 --- a/apps/datahub-e2e/src/e2e/dataset.cy.ts +++ b/apps/datahub-e2e/src/e2e/dataset.cy.ts @@ -46,7 +46,7 @@ describe('datasets', () => { cy.get('mel-datahub-text-expand') .find('mel-datahub-button-primary') .find('img') - .should('have.attr', 'src', '/assets/icons/arrow.svg') + .should('have.attr', 'src', 'assets/icons/arrow.svg') cy.get('mel-datahub-text-expand') .find('.bg-gradient-to-b') .should('have.css', 'max-height', '72px') @@ -63,7 +63,7 @@ describe('datasets', () => { cy.get('mel-datahub-text-expand') .find('mel-datahub-button-primary') .find('img') - .should('have.attr', 'src', '/assets/icons/arrow-up.svg') + .should('have.attr', 'src', 'assets/icons/arrow-up.svg') cy.get('mel-datahub-text-expand') .find('.bg-gradient-to-b') .should('not.exist') @@ -83,11 +83,11 @@ describe('datasets', () => { cy.get('mel-datahub-button-primary').eq(0).as('favoriteButton') cy.get('@favoriteButton') .find('img') - .should('have.attr', 'src', '/assets/icons/heart.svg') + .should('have.attr', 'src', 'assets/icons/heart.svg') cy.get('@favoriteButton').click() cy.get('@favoriteButton') .find('img') - .should('have.attr', 'src', '/assets/icons/heart-filled.svg') + .should('have.attr', 'src', 'assets/icons/heart-filled.svg') }) }) }) diff --git a/apps/datahub/src/app/app.module.ts b/apps/datahub/src/app/app.module.ts index 7895867a..0490feaf 100644 --- a/apps/datahub/src/app/app.module.ts +++ b/apps/datahub/src/app/app.module.ts @@ -8,6 +8,7 @@ import { FeatureCatalogModule, FeatureRecordModule, FeatureSearchModule, + LOGIN_URL, provideGn4, provideRepositoryUrl, RouterService, @@ -123,6 +124,10 @@ import { TextExpandComponent } from './common/text-expand/text-expand.component' importProvidersFrom(FeatureAuthModule), provideGn4(), provideRepositoryUrl(() => '/geonetwork/srv/api'), + { + provide: LOGIN_URL, + useFactory: () => '${current_url}?login', + }, { provide: RouterService, useClass: AppRouterService }, ], bootstrap: [AppComponent], diff --git a/apps/datahub/src/app/common/button-primary/button-primary.component.html b/apps/datahub/src/app/common/button-primary/button-primary.component.html index 3eef4fcb..deb83a5c 100644 --- a/apps/datahub/src/app/common/button-primary/button-primary.component.html +++ b/apps/datahub/src/app/common/button-primary/button-primary.component.html @@ -1,6 +1,6 @@