Skip to content

Commit

Permalink
Merge pull request DSpace#2985 from atmire/w2p-114596_CreatingTemplat…
Browse files Browse the repository at this point in the history
…eItemResultsInPageWhichNeverFinishesLoading

Fixed the problem that creating template item results in page which never finishes loading
  • Loading branch information
tdonohue authored Apr 26, 2024
2 parents 3568acc + c5e3b18 commit 99bfe13
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions cypress/e2e/item-template.cy.ts
Original file line number Diff line number Diff line change
@@ -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('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');
cy.contains('.ds-header-row b', 'Edit', { timeout: 10000 }).should('exist').should('be.visible');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
import {
BehaviorSubject,
combineLatest as observableCombineLatest,
EMPTY,
Observable,
of,
Subscription,
} from 'rxjs';
import {
Expand Down Expand Up @@ -188,7 +188,7 @@ export class DsoEditMetadataComponent implements OnInit, OnDestroy {
const lazyProvider$: Observable<UpdateDataService<DSpaceObject>> = lazyDataService(this.dataServiceMap, this.dsoType, this.parentInjector);
return lazyProvider$;
} else {
return EMPTY;
return of(this.updateDataService);
}
}

Expand Down

0 comments on commit 99bfe13

Please sign in to comment.