From 094acf77ce698ac1b4b3ab7ee552b823b51baa5f Mon Sep 17 00:00:00 2001 From: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com> Date: Thu, 28 Sep 2023 10:44:07 +0200 Subject: [PATCH] [ACS-5613] process preview on popup displaying the details of selected running process on the popup (#8933) * ACS-5613 Renamed name column header for process details * ACS-5613 Change order of columns based on order property * ACS-5613 Added some unit test * ACS-5613 Added unit tests * ACS-5613 Added documentation * ACS-5613 Fixed e2e * ACS-5613 Fixed e2e * ACS-5613 Fixed e2e * ACS-5613 Fixed e2e * ACS-5613 Fixed e2e --- docs/core/components/data-column.component.md | 1 + e2e/process-services/pages/filters.page.ts | 2 +- e2e/process-services/pages/tasks-list.page.ts | 20 +++--- .../tasks/custom-tasks-filters.e2e.ts | 62 +++++++++---------- .../data-column/data-column.component.ts | 4 ++ .../lib/datatable/data/data-column.model.ts | 1 + .../lib/datatable/data/data-table.schema.ts | 2 + .../datatable/data/object-datacolumn.model.ts | 2 + .../process-list-cloud.component.spec.ts | 7 ++- .../service-task-list-cloud.component.spec.ts | 6 +- .../task-list-cloud.component.spec.ts | 7 ++- lib/process-services/src/lib/i18n/en.json | 2 +- .../components/process-list.component.spec.ts | 7 ++- .../components/task-list.component.spec.ts | 7 ++- 14 files changed, 72 insertions(+), 58 deletions(-) diff --git a/docs/core/components/data-column.component.md b/docs/core/components/data-column.component.md index 5825331a04..a9ade82ed6 100644 --- a/docs/core/components/data-column.component.md +++ b/docs/core/components/data-column.component.md @@ -60,6 +60,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo | srTitle | `string` | | Title to be used for screen readers. | | title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. | | type | `string` | "text" | Value type for the column. Possible settings are 'text', 'image', 'date', 'fileSize', 'location', and 'json'. | +| order | `number` | | Sets position of column. | ## Details diff --git a/e2e/process-services/pages/filters.page.ts b/e2e/process-services/pages/filters.page.ts index e9fe36717b..95089d0acb 100644 --- a/e2e/process-services/pages/filters.page.ts +++ b/e2e/process-services/pages/filters.page.ts @@ -39,7 +39,7 @@ export class FiltersPage { } async getAllRowsNameColumn(): Promise { - return this.dataTable.getAllRowsColumnValues('Name'); + return this.dataTable.getAllRowsColumnValues('Task Name'); } async checkFilterIsHighlighted(filterName: string): Promise { diff --git a/e2e/process-services/pages/tasks-list.page.ts b/e2e/process-services/pages/tasks-list.page.ts index c91ae063e2..d7a8411ea4 100644 --- a/e2e/process-services/pages/tasks-list.page.ts +++ b/e2e/process-services/pages/tasks-list.page.ts @@ -28,29 +28,29 @@ export class TasksListPage { return this.dataTable; } - getRowsDisplayedWithSameName(taskName: string): Promise { - return this.dataTable.getRowsWithSameColumnValues('Name', taskName); + getRowsDisplayedWithSameName(taskName: string, column = 'Task Name'): Promise { + return this.dataTable.getRowsWithSameColumnValues(column, taskName); } - async checkContentIsDisplayed(taskName: string): Promise { - await this.dataTable.checkContentIsDisplayed('Name', taskName); + async checkContentIsDisplayed(taskName: string, column = 'Task Name'): Promise { + await this.dataTable.checkContentIsDisplayed(column, taskName); } - async checkContentIsNotDisplayed(taskName: string): Promise { - await this.dataTable.checkContentIsNotDisplayed('Name', taskName); + async checkContentIsNotDisplayed(taskName: string, column = 'Task Name'): Promise { + await this.dataTable.checkContentIsNotDisplayed(column, taskName); } async checkRowIsSelected(taskName: string): Promise { - await this.dataTable.checkRowIsSelected('Name', taskName); + await this.dataTable.checkRowIsSelected('Task Name', taskName); } async selectRow(taskName: string): Promise { - await this.dataTable.selectRow('Name', taskName); + await this.dataTable.selectRow('Task Name', taskName); await browser.sleep(1000); } - getAllRowsNameColumn(): Promise { - return this.dataTable.getAllRowsColumnValues('Name'); + getAllRowsNameColumn(column = 'Task Name'): Promise { + return this.dataTable.getAllRowsColumnValues(column); } async checkTaskListIsLoaded(): Promise { diff --git a/e2e/process-services/tasks/custom-tasks-filters.e2e.ts b/e2e/process-services/tasks/custom-tasks-filters.e2e.ts index 0ef6bfcad0..ee8b371c46 100644 --- a/e2e/process-services/tasks/custom-tasks-filters.e2e.ts +++ b/e2e/process-services/tasks/custom-tasks-filters.e2e.ts @@ -132,7 +132,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName)).toEqual(true); }); @@ -150,7 +150,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + nrOfTasks + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName)).toEqual(true); }); await paginationPage.checkNextPageButtonIsDisabled(); @@ -164,7 +164,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true); }); @@ -176,7 +176,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getPaginationRange()).toEqual('Showing 6-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true); }); @@ -187,7 +187,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true); }); @@ -197,7 +197,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five); await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-' + itemsPerPage.fiveValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true); }); }); @@ -209,7 +209,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(0, 10))).toEqual(true); }); await paginationPage.clickOnNextPage(); @@ -218,7 +218,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.ten); await expect(await paginationPage.getPaginationRange()).toEqual('Showing 11-' + itemsPerPage.tenValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.tenValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(10, 20))).toEqual(true); }); }); @@ -230,7 +230,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getPaginationRange()).toEqual('Showing 1-' + itemsPerPage.fifteenValue * currentPage + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fifteenValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(0, 15))).toEqual(true); }); currentPage++; @@ -239,7 +239,7 @@ describe('Start Task - Custom App', () => { await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.fifteen); await expect(await paginationPage.getPaginationRange()).toEqual('Showing 16-' + nrOfTasks + ' of ' + nrOfTasks); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(nrOfTasks - itemsPerPage.fifteenValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true); }); }); @@ -272,7 +272,7 @@ describe('Start Task - Custom App', () => { await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(0, 5))).toEqual(true); }); @@ -288,7 +288,7 @@ describe('Start Task - Custom App', () => { await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(5, 10))).toEqual(true); }); @@ -302,7 +302,7 @@ describe('Start Task - Custom App', () => { await paginationPage.checkPageSelectorIsDisplayed(); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(10, 15))).toEqual(true); }); @@ -317,7 +317,7 @@ describe('Start Task - Custom App', () => { await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(itemsPerPage.fiveValue); - await taskListSinglePage.taskList().getAllRowsNameColumn().then(async (list) => { + await taskListSinglePage.taskList().getAllRowsNameColumn('Name').then(async (list) => { await expect(ArrayUtil.arrayContainsArray(list, allTasksName.slice(15, 20))).toEqual(true); }); }); @@ -388,9 +388,9 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.typeAppId(appRuntime.id); await expect(await taskListSinglePage.getAppId()).toEqual(appRuntime.id.toString()); - await taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName); - await taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName); - await taskListSinglePage.taskList().checkContentIsNotDisplayed(paginationTasksName[13]); + await taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName, 'Name'); + await taskListSinglePage.taskList().checkContentIsDisplayed(app.taskName, 'Name'); + await taskListSinglePage.taskList().checkContentIsNotDisplayed(paginationTasksName[13], 'Name'); }); it('[C280569] Should be able to see No tasks found when typing an invalid appId', async () => { @@ -404,8 +404,8 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.typeTaskName(paginationTasksName[13]); await expect(await taskListSinglePage.getTaskName()).toEqual(paginationTasksName[13]); - await taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[13]); - await expect((await taskListSinglePage.taskList().getRowsDisplayedWithSameName(paginationTasksName[13])).length).toBe(2); + await taskListSinglePage.taskList().checkContentIsDisplayed(paginationTasksName[13], 'Name'); + await expect((await taskListSinglePage.taskList().getRowsDisplayedWithSameName(paginationTasksName[13], 'Name')).length).toBe(2); }); it('[C280571] Should be able to see No tasks found when typing a task name that does not exist', async () => { @@ -420,7 +420,7 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.taskList().getDataTable().waitTillContentLoaded(); await expect(await taskListSinglePage.getTaskId()).toEqual(taskWithDueDate.id); - await taskListSinglePage.taskList().checkContentIsDisplayed(taskWithDueDate.name); + await taskListSinglePage.taskList().checkContentIsDisplayed(taskWithDueDate.name, 'Name'); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(1); }); @@ -436,9 +436,9 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.selectState('Completed'); await taskListSinglePage.taskList().getDataTable().waitTillContentLoaded(); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name, 'Name'); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(3); }); @@ -446,11 +446,11 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.selectState('Active'); await taskListSinglePage.taskList().getDataTable().waitTillContentLoaded(); - await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[0].name); - await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[1].name); - await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[2].name); + await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[0].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[1].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsNotDisplayed(completedTasks[2].name, 'Name'); - const list = await taskListSinglePage.taskList().getAllRowsNameColumn(); + const list = await taskListSinglePage.taskList().getAllRowsNameColumn('Name'); await expect(ArrayUtil.arrayContainsArray(list, allTasksName)).toEqual(true); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(20); @@ -460,11 +460,11 @@ describe('Start Task - Custom App', () => { await taskListSinglePage.selectState('All'); await taskListSinglePage.taskList().getDataTable().waitTillContentLoaded(); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name); - await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[0].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[1].name, 'Name'); + await taskListSinglePage.taskList().checkContentIsDisplayed(completedTasks[2].name, 'Name'); - const list = await taskListSinglePage.taskList().getAllRowsNameColumn(); + const list = await taskListSinglePage.taskList().getAllRowsNameColumn('Name'); await expect(ArrayUtil.arrayContainsArray(list, allTasksName)).toEqual(true); await expect(await taskListSinglePage.taskList().getDataTable().numberOfRows()).toBe(23); diff --git a/lib/core/src/lib/datatable/data-column/data-column.component.ts b/lib/core/src/lib/datatable/data-column/data-column.component.ts index 182e5bbddf..1e9e9969f7 100644 --- a/lib/core/src/lib/datatable/data-column/data-column.component.ts +++ b/lib/core/src/lib/datatable/data-column/data-column.component.ts @@ -98,6 +98,10 @@ export class DataColumnComponent implements OnInit { @Input() sortingKey: string; + /** Sets position of column. **/ + @Input() + order?: number; + /** Data column header template */ header?: TemplateRef; diff --git a/lib/core/src/lib/datatable/data/data-column.model.ts b/lib/core/src/lib/datatable/data/data-column.model.ts index 15cd07fb55..dce5919aa3 100644 --- a/lib/core/src/lib/datatable/data/data-column.model.ts +++ b/lib/core/src/lib/datatable/data/data-column.model.ts @@ -49,4 +49,5 @@ export interface DataColumn { isHidden?: boolean; width?: number; customData?: T; + order?: number; } diff --git a/lib/core/src/lib/datatable/data/data-table.schema.ts b/lib/core/src/lib/datatable/data/data-table.schema.ts index f37d1cb60c..1615b5c2d6 100644 --- a/lib/core/src/lib/datatable/data/data-table.schema.ts +++ b/lib/core/src/lib/datatable/data/data-table.schema.ts @@ -82,6 +82,8 @@ export abstract class DataTableSchema { if (customSchemaColumns.length === 0) { customSchemaColumns = this.getDefaultLayoutPreset(); + } else { + customSchemaColumns.sort((col1, col2) => (col1.order || 0) - (col2.order || 0)); } return customSchemaColumns; diff --git a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts index 01439396ac..5ae054f955 100644 --- a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts +++ b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts @@ -37,6 +37,7 @@ export class ObjectDataColumn implements DataColumn { isHidden: boolean; customData?: T; width?: number; + order?: number; constructor(input: any) { this.id = input.id ?? ''; @@ -56,5 +57,6 @@ export class ObjectDataColumn implements DataColumn { this.isHidden = input.isHidden ?? false; this.customData = input.customData; this.width = input.width; + this.order = input.order; } } diff --git a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts index a0cf246e60..340e7d8d48 100644 --- a/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/process/process-list/components/process-list-cloud.component.spec.ts @@ -48,7 +48,7 @@ import { PreferenceCloudServiceInterface } from '@alfresco/adf-process-services- @Component({ template: ` - + @@ -606,8 +606,9 @@ describe('ProcessListCloudComponent: Injecting custom columns for task list - Cu it('should fetch custom schemaColumn from html', () => { fixtureCustom.detectChanges(); expect(componentCustom.processListCloud.columnList).toBeDefined(); - expect(componentCustom.processListCloud.columns[0]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.NAME'); - expect(componentCustom.processListCloud.columns[1]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED'); + expect(componentCustom.processListCloud.columns[0].key).toEqual('created'); + expect(componentCustom.processListCloud.columns[1].key).toEqual('startedBy'); + expect(componentCustom.processListCloud.columns[2].key).toEqual('name'); expect(componentCustom.processListCloud.columns.length).toEqual(3); }); }); diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.spec.ts index ce5ea3eb19..e72b9ae65a 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/service-task-list-cloud.component.spec.ts @@ -32,7 +32,7 @@ import { ServiceTaskListCloudService } from '../services/service-task-list-cloud template: ` - + ` @@ -387,8 +387,8 @@ describe('ServiceTaskListCloudComponent: Injecting custom columns for task list it('should fetch custom schemaColumn from html', () => { fixtureCustom.detectChanges(); expect(componentCustom.taskList.columnList).toBeDefined(); - expect(componentCustom.taskList.columns[0]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.NAME'); - expect(componentCustom.taskList.columns[1]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED'); + expect(componentCustom.taskList.columns[0].key).toEqual('startedDate'); + expect(componentCustom.taskList.columns[1].key).toEqual('activityName'); expect(componentCustom.taskList.columns.length).toEqual(2); }); diff --git a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts index 49d495ff1e..b7ee661dae 100644 --- a/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-list/components/task-list-cloud.component.spec.ts @@ -48,7 +48,7 @@ import { PreferenceCloudServiceInterface } from '../../../services/preference-cl template: ` - + @@ -533,8 +533,9 @@ describe('TaskListCloudComponent: Injecting custom colums for tasklist - CustomT it('should fetch custom schemaColumn from html', () => { copyFixture.detectChanges(); expect(componentCustom.taskList.columnList).toBeDefined(); - expect(componentCustom.taskList.columns[0]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.NAME'); - expect(componentCustom.taskList.columns[1]['title']).toEqual('ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED'); + expect(componentCustom.taskList.columns[0].key).toEqual('created'); + expect(componentCustom.taskList.columns[1].key).toEqual('startedBy'); + expect(componentCustom.taskList.columns[2].key).toEqual('name'); expect(componentCustom.taskList.columns.length).toEqual(3); }); diff --git a/lib/process-services/src/lib/i18n/en.json b/lib/process-services/src/lib/i18n/en.json index a5501b28a0..b2b68c3bb7 100644 --- a/lib/process-services/src/lib/i18n/en.json +++ b/lib/process-services/src/lib/i18n/en.json @@ -29,7 +29,7 @@ "THUMBNAIL": "Thumbnail", "DURATION": "Duration", "PARENT_TASK_ID": "Parent task id", - "NAME": "Name", + "NAME": "Task Name", "ASSIGNEE": "Assignee", "ASSIGNEE_DEFAULT": "No assignee", "PRIORITY": "Priority", diff --git a/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts b/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts index 93a66e5812..a141e5038e 100644 --- a/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts +++ b/lib/process-services/src/lib/process-list/components/process-list.component.spec.ts @@ -460,7 +460,7 @@ describe('ProcessInstanceListComponent', () => { template: ` - + @@ -498,8 +498,9 @@ describe('CustomProcessListComponent', () => { fixture.detectChanges(); expect(component.processList.columns).toBeDefined(); expect(component.processList.columns.length).toEqual(3); - expect(component.processList.columns[1]['title']).toEqual('ADF_PROCESS_LIST.PROPERTIES.END_DATE'); - expect(component.processList.columns[2]['title']).toEqual('ADF_PROCESS_LIST.PROPERTIES.CREATED'); + expect(component.processList.columns[0].key).toEqual('created'); + expect(component.processList.columns[1].key).toEqual('startedBy'); + expect(component.processList.columns[2].key).toEqual('name'); }); }); diff --git a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts index 2ed8f6998f..cd8ec39896 100644 --- a/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts +++ b/lib/process-services/src/lib/task-list/components/task-list.component.spec.ts @@ -664,7 +664,7 @@ describe('TaskListComponent', () => { template: ` - + @@ -705,8 +705,9 @@ describe('CustomTaskListComponent', () => { it('should fetch custom schemaColumn from html', () => { fixture.detectChanges(); expect(component.taskList.columnList).toBeDefined(); - expect(component.taskList.columns[0]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.NAME'); - expect(component.taskList.columns[1]['title']).toEqual('ADF_TASK_LIST.PROPERTIES.CREATED'); + expect(component.taskList.columns[0].key).toEqual('created'); + expect(component.taskList.columns[1].key).toEqual('startedBy'); + expect(component.taskList.columns[2].key).toEqual('name'); expect(component.taskList.columns.length).toEqual(3); }); });