Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into w2p-121787_Investig…
Browse files Browse the repository at this point in the history
…ate-internal-server-error-on-browse-page-experiment
  • Loading branch information
Jens Vannerum committed Dec 16, 2024
2 parents 6f4491b + ac00f88 commit 4af5c41
Show file tree
Hide file tree
Showing 29 changed files with 265 additions and 172 deletions.
5 changes: 0 additions & 5 deletions cypress/e2e/item-edit.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
125 changes: 37 additions & 88 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
"compression-webpack-plugin": "^9.2.0",
"copy-webpack-plugin": "^6.4.1",
"cross-env": "^7.0.3",
"cypress": "^13.15.1",
"cypress": "^13.16.0",
"cypress-axe": "^1.5.0",
"deep-freeze": "0.0.1",
"eslint": "^8.39.0",
Expand Down
8 changes: 4 additions & 4 deletions src/app/admin/admin-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
REGISTRIES_MODULE_PATH,
REPORTS_MODULE_PATH,
} from './admin-routing-paths';
import { AdminSearchPageComponent } from './admin-search-page/admin-search-page.component';
import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow-page.component';
import { ThemedAdminSearchPageComponent } from './admin-search-page/themed-admin-search-page.component';
import { ThemedAdminWorkflowPageComponent } from './admin-workflow-page/themed-admin-workflow-page.component';

export const ROUTES: Route[] = [
{
Expand All @@ -28,13 +28,13 @@ export const ROUTES: Route[] = [
{
path: 'search',
resolve: { breadcrumb: i18nBreadcrumbResolver },
component: AdminSearchPageComponent,
component: ThemedAdminSearchPageComponent,
data: { title: 'admin.search.title', breadcrumbKey: 'admin.search' },
},
{
path: 'workflow',
resolve: { breadcrumb: i18nBreadcrumbResolver },
component: AdminWorkflowPageComponent,
component: ThemedAdminWorkflowPageComponent,
data: { title: 'admin.workflow.title', breadcrumbKey: 'admin.workflow' },
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Context } from '../../core/shared/context.model';
import { ThemedConfigurationSearchPageComponent } from '../../search-page/themed-configuration-search-page.component';

@Component({
selector: 'ds-admin-search-page',
selector: 'ds-base-admin-search-page',
templateUrl: './admin-search-page.component.html',
styleUrls: ['./admin-search-page.component.scss'],
standalone: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Component } from '@angular/core';

import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { AdminSearchPageComponent } from './admin-search-page.component';

/**
* Themed wrapper for {@link AdminSearchPageComponent}
*/
@Component({
selector: 'ds-admin-search-page',
templateUrl: '../../shared/theme-support/themed.component.html',
standalone: true,
imports: [AdminSearchPageComponent],
})
export class ThemedAdminSearchPageComponent extends ThemedComponent<AdminSearchPageComponent> {

protected getComponentName(): string {
return 'AdminSearchPageComponent';
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/admin/admin-search-page/admin-search-page.component`);
}

protected importUnthemedComponent(): Promise<any> {
return import('./admin-search-page.component');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ import { Context } from '../../core/shared/context.model';
import { ThemedConfigurationSearchPageComponent } from '../../search-page/themed-configuration-search-page.component';

@Component({
selector: 'ds-admin-workflow-page',
selector: 'ds-base-admin-workflow-page',
templateUrl: './admin-workflow-page.component.html',
styleUrls: ['./admin-workflow-page.component.scss'],
standalone: true,
imports: [ThemedConfigurationSearchPageComponent],
imports: [
ThemedConfigurationSearchPageComponent,
],
})

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Component } from '@angular/core';

import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { AdminWorkflowPageComponent } from './admin-workflow-page.component';

/**
* Themed wrapper for {@link AdminWorkflowPageComponent}
*/
@Component({
selector: 'ds-admin-workflow-page',
templateUrl: '../../shared/theme-support/themed.component.html',
standalone: true,
imports: [AdminWorkflowPageComponent],
})
export class ThemedAdminWorkflowPageComponent extends ThemedComponent<AdminWorkflowPageComponent> {

protected getComponentName(): string {
return 'AdminWorkflowPageComponent';
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/admin/admin-workflow-page/admin-workflow-page.component`);
}

protected importUnthemedComponent(): Promise<any> {
return import('./admin-workflow-page.component');
}

}
2 changes: 0 additions & 2 deletions src/app/browse-by/browse-by-page-routes.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -11,7 +10,6 @@ export const ROUTES: Route[] = [
path: '',
resolve: {
breadcrumb: browseByDSOBreadcrumbResolver,
menu: dsoEditMenuResolver,
},
children: [
{
Expand Down
Loading

0 comments on commit 4af5c41

Please sign in to comment.