[ADF-5167] [FORM] Task action name inconsistency (#5816)

* [ADF-5167] [FORM] Task action name inconsistency

* * fixed UT
This commit is contained in:
dhrn 2020-06-25 14:25:47 +05:30 committed by GitHub
parent 663d7fefc6
commit bd074c83e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 9 deletions

View File

@ -346,7 +346,9 @@
"COMPLETE-TASK-SUB-MESSAGE": "No forms to be added",
"BUTTONS": {
"COMPLETE": "COMPLETE",
"CANCEL": "CANCEL"
"CANCEL": "CANCEL",
"CLAIM": "ClAIM",
"UNCLAIM": "RELEASE"
}
},
"COMPLETED_TASK": {

View File

@ -84,7 +84,7 @@
[taskId]="taskId"
(success)="onClaimTask($event)"
(error)="onClaimTaskError($event)">
{{ 'ADF_TASK_LIST.DETAILS.BUTTON.CLAIM' | translate }}
{{ 'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.CLAIM' | translate }}
</button>
<button mat-button data-automation-id="adf-task-form-unclaim-button"
*ngIf="isTaskClaimedByCandidateMember()"
@ -92,7 +92,7 @@
[taskId]="taskId"
(success)="onUnclaimTask($event)"
(error)="onUnclaimTaskError($event)">
{{ 'ADF_TASK_LIST.DETAILS.BUTTON.UNCLAIM' | translate }}
{{ 'ADF_TASK_FORM.EMPTY_FORM.BUTTONS.UNCLAIM' | translate }}
</button>
</ng-template>
</ng-container>

View File

@ -585,7 +585,7 @@ describe('TaskFormComponent', () => {
await fixture.whenStable();
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() => {
@ -614,7 +614,7 @@ describe('TaskFormComponent', () => {
const claimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-claim-button"]'));
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() => {
@ -628,7 +628,7 @@ describe('TaskFormComponent', () => {
const unclaimButton = fixture.debugElement.query(By.css('[data-automation-id="adf-task-form-unclaim-button"]'));
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() => {