mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5479] Disable clam/release button for standalone tasks on APA (#7670)
* [ADF-5479] Disable clam/release button for standalone tasks on APA * [ADF-5479] remove focus on unit test describe * Trigger travis
This commit is contained in:
@@ -109,7 +109,8 @@ export class TaskCloudService extends BaseCloudService implements TaskCloudServi
|
||||
*/
|
||||
canClaimTask(taskDetails: TaskDetailsCloudModel): boolean {
|
||||
return taskDetails?.status === TASK_CREATED_STATE &&
|
||||
taskDetails?.permissions.includes(TASK_CLAIM_PERMISSION);
|
||||
taskDetails?.permissions.includes(TASK_CLAIM_PERMISSION) &&
|
||||
!taskDetails?.standalone;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -135,6 +135,17 @@ describe('TaskFormCloudComponent', () => {
|
||||
expect(unclaimBtn).toBeNull();
|
||||
});
|
||||
|
||||
it('should not show claim button for standalone task', () => {
|
||||
taskDetails.status = TASK_CREATED_STATE;
|
||||
taskDetails.permissions = [TASK_CLAIM_PERMISSION];
|
||||
taskDetails.standalone = true;
|
||||
getTaskSpy.and.returnValue(of(taskDetails));
|
||||
fixture.detectChanges();
|
||||
|
||||
const claimBtn = debugElement.query(By.css('[adf-cloud-claim-task]'));
|
||||
expect(claimBtn).toBeNull();
|
||||
});
|
||||
|
||||
it('should show release button when task is assigned to one of the candidate users', () => {
|
||||
taskDetails.permissions = [TASK_RELEASE_PERMISSION];
|
||||
fixture.detectChanges();
|
||||
|
Reference in New Issue
Block a user