mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
68729: E-Person link on version list + test fixes
This commit is contained in:
@@ -26,7 +26,7 @@ describe('VersionHistoryDataService', () => {
|
||||
let result;
|
||||
|
||||
beforeEach(() => {
|
||||
result = service.getVersions(1);
|
||||
result = service.getVersions('1');
|
||||
});
|
||||
|
||||
it('should configure a GET request', () => {
|
||||
@@ -49,6 +49,6 @@ describe('VersionHistoryDataService', () => {
|
||||
halService = new HALEndpointServiceStub(url);
|
||||
notificationsService = new NotificationsServiceStub();
|
||||
|
||||
service = new VersionHistoryDataService(requestService, rdbService, null, null, objectCache, halService, notificationsService, null, null);
|
||||
service = new VersionHistoryDataService(requestService, rdbService, null, objectCache, halService, notificationsService, null, null);
|
||||
}
|
||||
});
|
||||
|
@@ -27,12 +27,12 @@ describe('OrgUnitItemMetadataListElementComponent', () => {
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(OrgUnitItemMetadataListElementComponent);
|
||||
comp = fixture.componentInstance;
|
||||
comp.metadataRepresentation = mockItemMetadataRepresentation;
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should show the name of the organisation as a link', () => {
|
||||
const linkText = fixture.debugElement.query(By.css('a')).nativeElement.textContent;
|
||||
|
@@ -16,17 +16,17 @@ describe('ItemVersionsComponent', () => {
|
||||
let fixture: ComponentFixture<ItemVersionsComponent>;
|
||||
|
||||
const versionHistory = Object.assign(new VersionHistory(), {
|
||||
id: 1
|
||||
id: '1'
|
||||
});
|
||||
const version1 = Object.assign(new Version(), {
|
||||
id: 1,
|
||||
id: '1',
|
||||
version: 1,
|
||||
created: new Date(2020, 1, 1),
|
||||
summary: 'first version',
|
||||
versionhistory: createSuccessfulRemoteDataObject$(versionHistory)
|
||||
});
|
||||
const version2 = Object.assign(new Version(), {
|
||||
id: 2,
|
||||
id: '2',
|
||||
version: 2,
|
||||
summary: 'second version',
|
||||
created: new Date(2020, 1, 2),
|
||||
|
@@ -13,7 +13,6 @@ import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';
|
||||
import { VersionHistoryDataService } from '../../../core/data/version-history-data.service';
|
||||
import { PaginatedSearchOptions } from '../../search/paginated-search-options.model';
|
||||
import { AlertType } from '../../alert/aletr-type';
|
||||
import { hasValueOperator } from '../../empty.util';
|
||||
import { followLink } from '../../utils/follow-link-config.model';
|
||||
|
||||
@Component({
|
||||
@@ -104,7 +103,7 @@ export class ItemVersionsComponent implements OnInit {
|
||||
switchMap(([versionHistory, page]: [VersionHistory, number]) =>
|
||||
this.versionHistoryService.getVersions(versionHistory.id,
|
||||
new PaginatedSearchOptions({pagination: Object.assign({}, this.options, { currentPage: page })}),
|
||||
followLink('item')))
|
||||
followLink('item'), followLink('eperson')))
|
||||
);
|
||||
this.hasEpersons$ = this.versionsRD$.pipe(
|
||||
getAllSucceededRemoteData(),
|
||||
|
Reference in New Issue
Block a user