mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-5167] [FORM] Task action name inconsistency (#5816)
* [ADF-5167] [FORM] Task action name inconsistency * * fixed UT
This commit is contained in:
parent
663d7fefc6
commit
bd074c83e1
@ -346,7 +346,9 @@
|
|||||||
"COMPLETE-TASK-SUB-MESSAGE": "No forms to be added",
|
"COMPLETE-TASK-SUB-MESSAGE": "No forms to be added",
|
||||||
"BUTTONS": {
|
"BUTTONS": {
|
||||||
"COMPLETE": "COMPLETE",
|
"COMPLETE": "COMPLETE",
|
||||||
"CANCEL": "CANCEL"
|
"CANCEL": "CANCEL",
|
||||||
|
"CLAIM": "ClAIM",
|
||||||
|
"UNCLAIM": "RELEASE"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"COMPLETED_TASK": {
|
"COMPLETED_TASK": {
|
||||||
|
@ -73,18 +73,18 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #taskFormButtons>
|
<ng-template #taskFormButtons>
|
||||||
<button mat-button id="adf-no-form-cancel-button"
|
<button mat-button id="adf-no-form-cancel-button"
|
||||||
*ngIf="showCancelButton"
|
*ngIf="showCancelButton"
|
||||||
(click)="onCancel()">
|
(click)="onCancel()">
|
||||||
{{'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CANCEL' | translate}}
|
{{'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CANCEL' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button mat-button data-automation-id="adf-task-form-claim-button"
|
<button mat-button data-automation-id="adf-task-form-claim-button"
|
||||||
*ngIf="isTaskClaimable()"
|
*ngIf="isTaskClaimable()"
|
||||||
adf-claim-task
|
adf-claim-task
|
||||||
[taskId]="taskId"
|
[taskId]="taskId"
|
||||||
(success)="onClaimTask($event)"
|
(success)="onClaimTask($event)"
|
||||||
(error)="onClaimTaskError($event)">
|
(error)="onClaimTaskError($event)">
|
||||||
{{ 'ADF_TASK_LIST.DETAILS.BUTTON.CLAIM' | translate }}
|
{{ 'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CLAIM' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button mat-button data-automation-id="adf-task-form-unclaim-button"
|
<button mat-button data-automation-id="adf-task-form-unclaim-button"
|
||||||
*ngIf="isTaskClaimedByCandidateMember()"
|
*ngIf="isTaskClaimedByCandidateMember()"
|
||||||
@ -92,7 +92,7 @@
|
|||||||
[taskId]="taskId"
|
[taskId]="taskId"
|
||||||
(success)="onUnclaimTask($event)"
|
(success)="onUnclaimTask($event)"
|
||||||
(error)="onUnclaimTaskError($event)">
|
(error)="onUnclaimTaskError($event)">
|
||||||
{{ 'ADF_TASK_LIST.DETAILS.BUTTON.UNCLAIM' | translate }}
|
{{ 'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.UNCLAIM' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
@ -100,4 +100,4 @@
|
|||||||
<div fxLayout="row" fxLayoutAlign="center stretch">
|
<div fxLayout="row" fxLayoutAlign="center stretch">
|
||||||
<mat-spinner></mat-spinner>
|
<mat-spinner></mat-spinner>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -585,7 +585,7 @@ describe('TaskFormComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
|
|
||||||
const claimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-claim-button"]'));
|
const claimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-claim-button"]'));
|
||||||
expect(claimButton.nativeElement.innerText).toBe('ADF_TASK_LIST.DETAILS.BUTTON.CLAIM');
|
expect(claimButton.nativeElement.innerText).toBe('ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CLAIM');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not display the claim/requeue button if the task is not claimable ', async() => {
|
it('should not display the claim/requeue button if the task is not claimable ', async() => {
|
||||||
@ -614,7 +614,7 @@ describe('TaskFormComponent', () => {
|
|||||||
const claimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-claim-button"]'));
|
const claimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-claim-button"]'));
|
||||||
|
|
||||||
expect(component.isTaskClaimable()).toBe(true);
|
expect(component.isTaskClaimable()).toBe(true);
|
||||||
expect(claimButton.nativeElement.innerText).toBe('ADF_TASK_LIST.DETAILS.BUTTON.CLAIM');
|
expect(claimButton.nativeElement.innerText).toBe('ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CLAIM');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display the release button if task is claimed by the current logged-in user', async() => {
|
it('should display the release button if task is claimed by the current logged-in user', async() => {
|
||||||
@ -628,7 +628,7 @@ describe('TaskFormComponent', () => {
|
|||||||
const unclaimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-unclaim-button"]'));
|
const unclaimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-unclaim-button"]'));
|
||||||
|
|
||||||
expect(component.isTaskClaimedByCandidateMember()).toBe(true);
|
expect(component.isTaskClaimedByCandidateMember()).toBe(true);
|
||||||
expect(unclaimButton.nativeElement.innerText).toBe('ADF_TASK_LIST.DETAILS.BUTTON.UNCLAIM');
|
expect(unclaimButton.nativeElement.innerText).toBe('ADF_TASK_FORM.EMPTY_FORM.BUTTONS.UNCLAIM');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not display the release button to logged in user if task is claimed by other candidate member', async() => {
|
it('should not display the release button to logged in user if task is claimed by other candidate member', async() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user