mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
69305: Refactor workflow-actions to be resolved as HAL links
This commit is contained in:
@@ -86,7 +86,11 @@ describe('ClaimedSearchResultListElementComponent', () => {
|
||||
|
||||
it('should init workflowitem properly', (done) => {
|
||||
component.workflowitemRD$.subscribe((workflowitemRD) => {
|
||||
expect(linkService.resolveLink).toHaveBeenCalled();
|
||||
expect(linkService.resolveLinks).toHaveBeenCalledWith(
|
||||
component.dso,
|
||||
jasmine.objectContaining({ name: 'workflowitem' }),
|
||||
jasmine.objectContaining({ name: 'action' })
|
||||
);
|
||||
expect(workflowitemRD.payload).toEqual(workflowitem);
|
||||
done();
|
||||
});
|
||||
|
@@ -55,12 +55,12 @@ export class ClaimedSearchResultListElementComponent extends SearchResultListEle
|
||||
*/
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.linkService.resolveLink(this.dso, followLink(
|
||||
this.linkService.resolveLinks(this.dso, followLink(
|
||||
'workflowitem',
|
||||
null,
|
||||
followLink('item'),
|
||||
followLink('submitter')
|
||||
));
|
||||
), followLink('action'));
|
||||
this.workflowitemRD$ = this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>;
|
||||
}
|
||||
}
|
||||
|
@@ -86,7 +86,11 @@ describe('PoolSearchResultListElementComponent', () => {
|
||||
|
||||
it('should init workflowitem properly', (done) => {
|
||||
component.workflowitemRD$.subscribe((workflowitemRD) => {
|
||||
expect(linkService.resolveLink).toHaveBeenCalled();
|
||||
expect(linkService.resolveLinks).toHaveBeenCalledWith(
|
||||
component.dso,
|
||||
jasmine.objectContaining({ name: 'workflowitem' }),
|
||||
jasmine.objectContaining({ name: 'action' })
|
||||
);
|
||||
expect(workflowitemRD.payload).toEqual(workflowitem);
|
||||
done();
|
||||
});
|
||||
|
@@ -58,12 +58,12 @@ export class PoolSearchResultListElementComponent extends SearchResultListElemen
|
||||
*/
|
||||
ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.linkService.resolveLink(this.dso, followLink(
|
||||
this.linkService.resolveLinks(this.dso, followLink(
|
||||
'workflowitem',
|
||||
null,
|
||||
followLink('item'),
|
||||
followLink('submitter')
|
||||
));
|
||||
), followLink('action'));
|
||||
this.workflowitemRD$ = this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user