[AAE-27160] Fix the structure of data returned from service-tasks API (#10711)

This commit is contained in:
Stephen Donnell 2025-03-14 14:22:24 -05:00 committed by GitHub
parent 5912423f96
commit d5bd97e3d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 34 additions and 33 deletions

View File

@ -230,7 +230,7 @@ describe('ServiceTaskListCloudComponent', () => {
describe('component changes', () => { describe('component changes', () => {
beforeEach(() => { beforeEach(() => {
component.rows = fakeServiceTask.list.entries; component.rows = fakeServiceTask.list.entries.map((task) => task.entry);
fixture.detectChanges(); fixture.detectChanges();
}); });

View File

@ -87,7 +87,7 @@ export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent {
.pipe(takeUntilDestroyed(this.destroyRef)) .pipe(takeUntilDestroyed(this.destroyRef))
.subscribe( .subscribe(
([tasks]) => { ([tasks]) => {
this.rows = tasks.list.entries; this.rows = tasks.list.entries.map((task) => task.entry);
this.success.emit(tasks); this.success.emit(tasks);
this.pagination.next(tasks.list.pagination); this.pagination.next(tasks.list.pagination);
this.isReloadingSubject$.next(false); this.isReloadingSubject$.next(false);

View File

@ -51,6 +51,7 @@ export const fakeServiceTask = {
list: { list: {
entries: [ entries: [
{ {
entry: {
activityType: 'serviceTask', activityType: 'serviceTask',
activityName: 'serviceTaskName', activityName: 'serviceTaskName',
appName: 'simpleapp', appName: 'simpleapp',
@ -68,6 +69,7 @@ export const fakeServiceTask = {
startedDate: '2020-09-22T16:03:37.444+0000', startedDate: '2020-09-22T16:03:37.444+0000',
status: 'COMPLETED' status: 'COMPLETED'
} }
}
], ],
pagination: { pagination: {
skipCount: 0, skipCount: 0,
@ -79,8 +81,7 @@ export const fakeServiceTask = {
} }
}; };
export const fakeCustomSchema = export const fakeCustomSchema = [
[
new ObjectDataColumn<ProcessListDataColumnCustomData>({ new ObjectDataColumn<ProcessListDataColumnCustomData>({
key: 'fakeName', key: 'fakeName',
type: 'text', type: 'text',
@ -93,4 +94,4 @@ export const fakeCustomSchema =
title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE', title: 'ADF_CLOUD_TASK_LIST.PROPERTIES.TASK_FAKE',
sortable: true sortable: true
}) })
]; ];