From bfb84c86df0136d3c978b42dca756dcd467043c0 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Fri, 29 Apr 2022 09:19:56 +0200 Subject: [PATCH] [CST-5253] Fix view item button for claim task in the mydspace results list --- .../claimed-task-actions.component.html | 4 +-- .../claimed-task-actions.component.spec.ts | 31 +++++++++---------- .../claimed-task-actions.component.ts | 8 ----- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html index 0b2398791e..47ae8cdb8e 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.html @@ -4,15 +4,13 @@ (processCompleted)="this.processCompleted.emit($event)"> - - - \ No newline at end of file + diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts index 5e6938853a..6f7970d71f 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts @@ -161,25 +161,22 @@ describe('ClaimedTaskActionsComponent', () => { }); })); - describe('when edit options is not available', () => { - it('should display a view button', waitForAsync(() => { - component.object = null; - component.initObjects(mockObject); - fixture.detectChanges(); + it('should display a view button', waitForAsync(() => { + component.object = null; + component.initObjects(mockObject); + fixture.detectChanges(); - fixture.whenStable().then(() => { - const debugElement = fixture.debugElement.query(By.css('.workflow-view')); - expect(debugElement).toBeTruthy(); - expect(debugElement.nativeElement.innerText.trim()).toBe('submission.workflow.generic.view'); - }); + fixture.whenStable().then(() => { + const debugElement = fixture.debugElement.query(By.css('.workflow-view')); + expect(debugElement).toBeTruthy(); + expect(debugElement.nativeElement.innerText.trim()).toBe('submission.workflow.generic.view'); + }); - })); - - it('getWorkflowItemViewRoute should return the combined uri to show a workspaceitem', waitForAsync(() => { - const href = component.getWorkflowItemViewRoute(workflowitem); - expect(href).toEqual('/workflowitems/333/view'); - })); - }); + })); + it('getWorkflowItemViewRoute should return the combined uri to show a workspaceitem', waitForAsync(() => { + const href = component.getWorkflowItemViewRoute(workflowitem); + expect(href).toEqual('/workflowitems/333/view'); + })); }); diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts index 65ddd76bc4..386d2c2805 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts @@ -102,14 +102,6 @@ export class ClaimedTaskActionsComponent extends MyDSpaceActionsComponent