From f39997b98bb3f6626b1a22fcc5a455b2d83b6918 Mon Sep 17 00:00:00 2001 From: Silviu Popa Date: Fri, 4 Dec 2020 19:42:34 +0200 Subject: [PATCH] [AAE-3638] - update priority option (#6423) --- demo-shell/src/app.config.json | 2 +- e2e/process-services-cloud/task-header-cloud.e2e.ts | 8 ++++---- lib/core/assets/images/dynamic_feed-24px.svg | 1 + lib/process-services-cloud/src/lib/i18n/en.json | 2 +- .../src/lib/task/models/task.model.ts | 2 +- .../base-edit-task-filter-cloud.component.html | 3 ++- .../components/task-header-cloud.component.spec.ts | 2 +- .../src/lib/core/pages/data-table-component.page.ts | 4 ++-- 8 files changed, 13 insertions(+), 11 deletions(-) diff --git a/demo-shell/src/app.config.json b/demo-shell/src/app.config.json index 39d12c7768..f378e43847 100644 --- a/demo-shell/src/app.config.json +++ b/demo-shell/src/app.config.json @@ -1169,7 +1169,7 @@ { "key": "0", "value": "0", - "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET" + "label": "ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE" }, { "key": "1", diff --git a/e2e/process-services-cloud/task-header-cloud.e2e.ts b/e2e/process-services-cloud/task-header-cloud.e2e.ts index a5a318e8d6..0ec7eedb2f 100644 --- a/e2e/process-services-cloud/task-header-cloud.e2e.ts +++ b/e2e/process-services-cloud/task-header-cloud.e2e.ts @@ -68,7 +68,7 @@ describe('Task Header cloud component', () => { let groupInfo: any; let testUser: any; let unclaimedTask: any; - const priority = 0; // Not set + const priority = 0; const description = 'descriptionTask'; const formatDate = 'MMM D, YYYY'; const dateTimeFormat = 'MMM D, Y, H:mm'; @@ -146,7 +146,7 @@ describe('Task Header cloud component', () => { await expect(await taskHeaderCloudPage.getDescription()) .toEqual(isValueInvalid(basicCreatedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : basicCreatedTask.entry.description); await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED'); - await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set'); + await expect(await taskHeaderCloudPage.getPriority()).toEqual('None'); await expect(await taskHeaderCloudPage.getCategory()).toEqual(!basicCreatedTask.entry.category ? CONSTANTS.TASK_DETAILS.NO_CATEGORY : basicCreatedTask.entry.category); await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(basicCreatedTask.entry.dueDate) ? @@ -170,7 +170,7 @@ describe('Task Header cloud component', () => { await expect(await taskHeaderCloudPage.getDescription()) .toEqual(isValueInvalid(completedTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : completedTask.entry.description); await expect(await taskHeaderCloudPage.getStatus()).toEqual('COMPLETED'); - await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('Not set'); + await expect(await taskHeaderCloudPage.getReadonlyPriority()).toEqual('None'); await expect(await taskHeaderCloudPage.getCategory()).toEqual(!completedTask.entry.category ? CONSTANTS.TASK_DETAILS.NO_CATEGORY : completedTask.entry.category); await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(completedTask.entry.dueDate) ? @@ -194,7 +194,7 @@ describe('Task Header cloud component', () => { await expect(await taskHeaderCloudPage.getDescription()) .toEqual(isValueInvalid(subTask.entry.description) ? CONSTANTS.TASK_DETAILS.NO_DESCRIPTION : subTask.entry.description); await expect(await taskHeaderCloudPage.getStatus()).toEqual('ASSIGNED'); - await expect(await taskHeaderCloudPage.getPriority()).toEqual('Not set'); + await expect(await taskHeaderCloudPage.getPriority()).toEqual('None'); await expect(await taskHeaderCloudPage.getCategory()).toEqual(!subTask.entry.category ? CONSTANTS.TASK_DETAILS.NO_CATEGORY : subTask.entry.category); await expect(await taskHeaderCloudPage.getDueDate()).toEqual(isValueInvalid(subTask.entry.dueDate) ? CONSTANTS.TASK_DETAILS.NO_DATE : subTaskCreatedDate); diff --git a/lib/core/assets/images/dynamic_feed-24px.svg b/lib/core/assets/images/dynamic_feed-24px.svg index ebaef95343..1d4529e05a 100644 --- a/lib/core/assets/images/dynamic_feed-24px.svg +++ b/lib/core/assets/images/dynamic_feed-24px.svg @@ -12,3 +12,4 @@ + diff --git a/lib/process-services-cloud/src/lib/i18n/en.json b/lib/process-services-cloud/src/lib/i18n/en.json index 1f35ce8df9..5414f8d829 100644 --- a/lib/process-services-cloud/src/lib/i18n/en.json +++ b/lib/process-services-cloud/src/lib/i18n/en.json @@ -95,7 +95,7 @@ "JSON_CELL": "Json", "COMPLETED_BY": "Completed By", "PRIORITY_VALUES": { - "NOT_SET": "Not set", + "NONE": "None", "LOW": "Low", "NORMAL": "Normal", "HIGH": "High" diff --git a/lib/process-services-cloud/src/lib/task/models/task.model.ts b/lib/process-services-cloud/src/lib/task/models/task.model.ts index e2954475f9..0ff9625bb7 100644 --- a/lib/process-services-cloud/src/lib/task/models/task.model.ts +++ b/lib/process-services-cloud/src/lib/task/models/task.model.ts @@ -27,7 +27,7 @@ export interface TaskPriorityOption { } export const DEFAULT_TASK_PRIORITIES: TaskPriorityOption[] = [ - { label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET', value: '0', key: '0' }, + { label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE', value: '0', key: '0' }, { label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW', value: '1', key: '1' }, { label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL', value: '2', key: '2' }, { label: 'ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH', value: '3', key: '3' } diff --git a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.html b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.html index 2a309c3d10..d39a5b20a6 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.html +++ b/lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/base-edit-task-filter-cloud.component.html @@ -95,7 +95,8 @@ - { fixture.detectChanges(); const options: any = fixture.debugElement.queryAll(By.css('mat-option')); - expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NOT_SET'); + expect(options[0].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NONE'); expect(options[1].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.LOW'); expect(options[2].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.NORMAL'); expect(options[3].nativeElement.innerText).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.PRIORITY_VALUES.HIGH'); diff --git a/lib/testing/src/lib/core/pages/data-table-component.page.ts b/lib/testing/src/lib/core/pages/data-table-component.page.ts index fc6672de0c..2b1e21b5a6 100644 --- a/lib/testing/src/lib/core/pages/data-table-component.page.ts +++ b/lib/testing/src/lib/core/pages/data-table-component.page.ts @@ -187,12 +187,12 @@ export class DataTableComponentPage { return 0; } - if (a.toLocaleLowerCase() === 'not set') { + if (a.toLocaleLowerCase() === 'none') { return -1; } if (a.toLocaleLowerCase() === 'low') { - if (b === 'not set') { + if (b === 'none') { return 1; } else { return -1;