From bd074c83e102e80c8ef41ceedf7ea0b3bc5f21a1 Mon Sep 17 00:00:00 2001 From: dhrn <14145706+dhrn@users.noreply.github.com> Date: Thu, 25 Jun 2020 14:25:47 +0530 Subject: [PATCH] [ADF-5167] [FORM] Task action name inconsistency (#5816) * [ADF-5167] [FORM] Task action name inconsistency * * fixed UT --- lib/process-services/src/lib/i18n/en.json | 4 +++- .../components/task-form/task-form.component.html | 10 +++++----- .../components/task-form/task-form.component.spec.ts | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/process-services/src/lib/i18n/en.json b/lib/process-services/src/lib/i18n/en.json index 0d3b38437a..83624366d6 100644 --- a/lib/process-services/src/lib/i18n/en.json +++ b/lib/process-services/src/lib/i18n/en.json @@ -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": { diff --git a/lib/process-services/src/lib/task-list/components/task-form/task-form.component.html b/lib/process-services/src/lib/task-list/components/task-form/task-form.component.html index 85d96084d9..51c1faad68 100644 --- a/lib/process-services/src/lib/task-list/components/task-form/task-form.component.html +++ b/lib/process-services/src/lib/task-list/components/task-form/task-form.component.html @@ -73,18 +73,18 @@ - @@ -100,4 +100,4 @@
- \ No newline at end of file + diff --git a/lib/process-services/src/lib/task-list/components/task-form/task-form.component.spec.ts b/lib/process-services/src/lib/task-list/components/task-form/task-form.component.spec.ts index bfae1e5c4b..36dec7ea2d 100644 --- a/lib/process-services/src/lib/task-list/components/task-form/task-form.component.spec.ts +++ b/lib/process-services/src/lib/task-list/components/task-form/task-form.component.spec.ts @@ -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() => {