From 34ca590fa5b57a3aa25d960545777e174b742dc5 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Fri, 29 Apr 2022 09:20:27 +0200 Subject: [PATCH] [CST-5253] Fix view item button for pool tasks in the mydspace results list --- .../pool-task/pool-task-actions.component.html | 4 ++-- .../pool-task/pool-task-actions.component.spec.ts | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.html b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.html index c2f0158c12..57617d8151 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.html +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.html @@ -6,8 +6,8 @@ {{'submission.workflow.tasks.pool.claim' | translate}} - \ No newline at end of file + diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts index bce1f1a467..5686030510 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Injector, NO_ERRORS_SCHEMA } from '@angular/core'; -import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { Router } from '@angular/router'; import { By } from '@angular/platform-browser'; @@ -133,6 +133,12 @@ describe('PoolTaskActionsComponent', () => { expect(btn).toBeDefined(); }); + it('should display view button', () => { + const btn = fixture.debugElement.query(By.css('button [data-test="view-btn"]')); + + expect(btn).toBeDefined(); + }); + it('should call claim task with href of getPoolTaskEndpointById', ((done) => { const poolTaskHref = 'poolTaskHref';