From a7cdf2e97a09cc74cce81c0f5f9470dab9e5d503 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Mon, 22 Apr 2024 12:56:11 +0200 Subject: [PATCH 1/4] 114596: Fixed the issue that item template page never loads --- .../dso-edit-metadata/dso-edit-metadata.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts index cded29230e..3d9b067655 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts @@ -24,9 +24,9 @@ import { import { BehaviorSubject, combineLatest as observableCombineLatest, - EMPTY, Observable, Subscription, + of, } from 'rxjs'; import { map, @@ -188,7 +188,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy { const lazyProvider$: Observable> = lazyDataService(this.dataServiceMap, this.dsoType, this.parentInjector); return lazyProvider$; } else { - return EMPTY; + return of(this.updateDataService); } } From 0ded7a4e0316df31bc11f12ae71598b6cbf6fcd8 Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Tue, 23 Apr 2024 08:50:12 +0200 Subject: [PATCH 2/4] 114596: Added e2e tests for item template page --- cypress/e2e/item-template.cy.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cypress/e2e/item-template.cy.ts diff --git a/cypress/e2e/item-template.cy.ts b/cypress/e2e/item-template.cy.ts new file mode 100644 index 0000000000..149ec029bf --- /dev/null +++ b/cypress/e2e/item-template.cy.ts @@ -0,0 +1,15 @@ +const ADD_TEMPLATE_ITEM_PAGE = '/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')).concat('/itemtemplate'); + +describe('Item Template', () => { + beforeEach(() => { + cy.visit(ADD_TEMPLATE_ITEM_PAGE); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('It should display the elements with specific texts', () => { + cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible'); + cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible'); + }); +}); From 7767934a5bed328b9312153f5ac780797437ffba Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Tue, 23 Apr 2024 09:03:12 +0200 Subject: [PATCH 3/4] 114596: Small lint fix --- .../dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts index 3d9b067655..7704abc4ea 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts @@ -25,8 +25,8 @@ import { BehaviorSubject, combineLatest as observableCombineLatest, Observable, - Subscription, of, + Subscription, } from 'rxjs'; import { map, From c5e3b1801422d4d42478e44c7da3c7ee5bfc9a2c Mon Sep 17 00:00:00 2001 From: Kuno Vercammen Date: Fri, 26 Apr 2024 13:40:00 +0200 Subject: [PATCH 4/4] 114624: Added small naming fix to e2e test --- cypress/e2e/item-template.cy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/item-template.cy.ts b/cypress/e2e/item-template.cy.ts index 149ec029bf..5f5b21a16a 100644 --- a/cypress/e2e/item-template.cy.ts +++ b/cypress/e2e/item-template.cy.ts @@ -6,7 +6,7 @@ describe('Item Template', () => { cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); }); - it('It should display the elements with specific texts', () => { + it('should load properly', () => { cy.contains('.ds-header-row .lbl-cell', 'Field', { timeout: 10000 }).should('exist').should('be.visible'); cy.contains('.ds-header-row b', 'Value', { timeout: 10000 }).should('exist').should('be.visible'); cy.contains('.ds-header-row b', 'Lang', { timeout: 10000 }).should('exist').should('be.visible');