[CST-5253] Fix view item button for pool tasks in the mydspace results list

This commit is contained in:
Giuseppe Digilio
2022-04-29 09:20:27 +02:00
parent bfb84c86df
commit 34ca590fa5
2 changed files with 9 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
<span *ngIf="!(processing$ | async)"><i class="fas fa-hand-paper"></i> {{'submission.workflow.tasks.pool.claim' |
translate}}</span>
</button>
<button class="btn btn-primary workflow-view ml-1 mt-1 mb-3"
<button class="btn btn-primary workflow-view ml-1 mt-1 mb-3" data-test="view-btn"
ngbTooltip="{{'submission.workflow.generic.view-help' | translate}}"
[routerLink]="[getWorkflowItemViewRoute((workflowitem$ | async))]">
<i class="fa fa-info-circle"></i> {{"submission.workflow.generic.view" | translate}}

View File

@@ -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';