mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
Merge pull request #2985 from atmire/w2p-114596_CreatingTemplateItemResultsInPageWhichNeverFinishesLoading
Fixed the problem that creating template item results in page which never finishes loading
This commit is contained in:
15
cypress/e2e/item-template.cy.ts
Normal file
15
cypress/e2e/item-template.cy.ts
Normal file
@@ -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');
|
||||
});
|
||||
});
|
@@ -24,8 +24,8 @@ import {
|
||||
import {
|
||||
BehaviorSubject,
|
||||
combineLatest as observableCombineLatest,
|
||||
EMPTY,
|
||||
Observable,
|
||||
of,
|
||||
Subscription,
|
||||
} from 'rxjs';
|
||||
import {
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user