mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
120109: Updated the route configuration to only resolve the dsoEditMenuResolver on pages who use the DsoEditMenuComponent
(cherry picked from commit 5c9f494f76
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
c9ba47b9af
commit
970544c130
@@ -9,11 +9,6 @@ beforeEach(() => {
|
||||
|
||||
// This page is restricted, so we will be shown the login form. Fill it out & submit.
|
||||
cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD'));
|
||||
|
||||
// We need to wait for the correction types allowed for the item to be loaded to be sure that each tab is fully loaded.
|
||||
// This because the edit item page causes often tests to fails due to timeout.
|
||||
cy.intercept('GET', 'server/api/config/correctiontypes/search/findByItem*').as('correctionTypes');
|
||||
cy.wait('@correctionTypes');
|
||||
});
|
||||
|
||||
describe('Edit Item > Edit Metadata tab', () => {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
import { Route } from '@angular/router';
|
||||
|
||||
import { dsoEditMenuResolver } from '../shared/dso-page/dso-edit-menu.resolver';
|
||||
import { browseByDSOBreadcrumbResolver } from './browse-by-dso-breadcrumb.resolver';
|
||||
import { browseByGuard } from './browse-by-guard';
|
||||
import { browseByI18nBreadcrumbResolver } from './browse-by-i18n-breadcrumb.resolver';
|
||||
@@ -11,7 +10,6 @@ export const ROUTES: Route[] = [
|
||||
path: '',
|
||||
resolve: {
|
||||
breadcrumb: browseByDSOBreadcrumbResolver,
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@@ -54,7 +54,6 @@ export const ROUTES: Route[] = [
|
||||
resolve: {
|
||||
dso: collectionPageResolver,
|
||||
breadcrumb: collectionBreadcrumbResolver,
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
children: [
|
||||
@@ -83,6 +82,9 @@ export const ROUTES: Route[] = [
|
||||
{
|
||||
path: '',
|
||||
component: ThemedCollectionPageComponent,
|
||||
resolve: {
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
|
@@ -51,7 +51,6 @@ export const ROUTES: Route[] = [
|
||||
resolve: {
|
||||
dso: communityPageResolver,
|
||||
breadcrumb: communityBreadcrumbResolver,
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
children: [
|
||||
@@ -70,6 +69,9 @@ export const ROUTES: Route[] = [
|
||||
{
|
||||
path: '',
|
||||
component: ThemedCommunityPageComponent,
|
||||
resolve: {
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
|
@@ -27,7 +27,6 @@ export const ROUTES: Route[] = [
|
||||
resolve: {
|
||||
dso: itemPageResolver,
|
||||
breadcrumb: itemBreadcrumbResolver,
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
runGuardsAndResolvers: 'always',
|
||||
children: [
|
||||
@@ -35,10 +34,16 @@ export const ROUTES: Route[] = [
|
||||
path: '',
|
||||
component: ThemedItemPageComponent,
|
||||
pathMatch: 'full',
|
||||
resolve: {
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'full',
|
||||
component: ThemedFullItemPageComponent,
|
||||
resolve: {
|
||||
menu: dsoEditMenuResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ITEM_EDIT_PATH,
|
||||
|
@@ -155,7 +155,7 @@ export class DSOEditMenuResolverService {
|
||||
this.dsoVersioningModalService.getVersioningTooltipMessage(dso, 'item.page.version.hasDraft', 'item.page.version.create'),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanSynchronizeWithORCID, dso.self),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanClaimItem, dso.self),
|
||||
this.correctionTypeDataService.findByItem(dso.uuid, false).pipe(
|
||||
this.correctionTypeDataService.findByItem(dso.uuid, true).pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
getRemoteDataPayload()),
|
||||
]).pipe(
|
||||
|
Reference in New Issue
Block a user