AAE-40254 Remove excludeByProcessCategoryName input (#11406)

This commit is contained in:
Wiktor Danielewski
2025-12-01 08:24:27 +01:00
committed by GitHub
parent f379d99474
commit 5625cf72d6
8 changed files with 5 additions and 48 deletions
@@ -65,14 +65,4 @@ describe('ProcessFilterCloudModel', () => {
expect(model.startFrom).toEqual(startOfDay(date).toISOString());
expect(model.startTo).toEqual(endOfDay(date).toISOString());
});
it('should assign value to the excludeByProcessCategoryName if provided', () => {
const model = new ProcessFilterCloudModel({ excludeByProcessCategoryName: 'test' });
expect(model.excludeByProcessCategoryName).toBe('test');
});
it('should assign null to the excludeByProcessCategoryName if value not provided', () => {
const model = new ProcessFilterCloudModel({});
expect(model.excludeByProcessCategoryName).toBeNull();
});
});
@@ -58,7 +58,6 @@ export class ProcessFilterCloudModel {
initiators: string[] | null;
appVersions: string[] | null;
statuses: string[] | null;
excludeByProcessCategoryName: string | null;
processVariableFilters?: ProcessVariableFilterModel[];
@@ -111,7 +110,6 @@ export class ProcessFilterCloudModel {
this.completedFrom = obj._completedFrom || null;
this.completedTo = obj._completedTo || null;
this.completedDate = obj.completedDate || null;
this.excludeByProcessCategoryName = obj.excludeByProcessCategoryName || null;
this._suspendedFrom = obj._suspendedFrom || null;
this._suspendedTo = obj._suspendedTo || null;
@@ -846,28 +846,6 @@ describe('ProcessListCloudComponent', () => {
expect(fetchProcessListSpy).toHaveBeenCalled();
});
it('should reload process list when excludeByProcessCategoryName changes', () => {
const fetchProcessListSpy = spyOn(processListCloudService, 'fetchProcessList').and.returnValue(of(fakeProcessCloudList));
fixture.componentRef.setInput('excludeByProcessCategoryName', 'mock-category');
fixture.detectChanges();
fixture.componentRef.setInput('excludeByProcessCategoryName', 'mock-category-2');
fixture.detectChanges();
expect(fetchProcessListSpy).toHaveBeenCalledTimes(2);
expect(fetchProcessListSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
excludeByProcessCategoryName: 'mock-category'
})
);
expect(fetchProcessListSpy).toHaveBeenCalledWith(
jasmine.objectContaining({
excludeByProcessCategoryName: 'mock-category-2'
})
);
});
it('should reload process list when sorting on a column changes', () => {
const fetchProcessListSpy = spyOn(processListCloudService, 'fetchProcessList').and.returnValue(of(fakeProcessCloudList));
component.onSortingChanged(
@@ -290,8 +290,6 @@ export class ProcessListCloudComponent
@Input()
processVariables: ProcessVariableFilterModel[];
@Input() excludeByProcessCategoryName: string = '';
/** Emitted when a row in the process list is clicked. */
@Output()
rowClick: EventEmitter<string> = new EventEmitter<string>();
@@ -609,8 +607,7 @@ export class ProcessListCloudComponent
suspendedFrom: this.suspendedFrom,
suspendedTo: this.suspendedTo,
processVariableKeys: this.getVariableDefinitionsRequestModel(),
processVariableFilters: this.processVariables,
excludeByProcessCategoryName: this.excludeByProcessCategoryName
processVariableFilters: this.processVariables
};
return new ProcessListRequestModel(requestNode);
@@ -102,7 +102,6 @@ export class ProcessListRequestModel {
completedTo?: string;
suspendedFrom?: string;
suspendedTo?: string;
excludeByProcessCategoryName?: string;
processVariableFilters?: ProcessVariableFilterModel[];
processVariableKeys?: string[];
@@ -133,7 +132,6 @@ export class ProcessListRequestModel {
this.suspendedTo = obj.suspendedTo;
this.processVariableKeys = obj.processVariableKeys;
this.processVariableFilters = obj.processVariableFilters;
this.excludeByProcessCategoryName = obj.excludeByProcessCategoryName;
}
}
@@ -119,8 +119,7 @@ describe('ProcessListCloudService', () => {
const processRequest = {
appName: 'fakeName',
pagination: { skipCount: 0, maxItems: 20 },
parentId: ['fakeParentId'],
excludeByProcessCategoryName: 'fakeCategory'
parentId: ['fakeParentId']
} as ProcessListRequestModel;
requestSpy.and.callFake(returnCallQueryParameters);
@@ -133,14 +132,13 @@ describe('ProcessListCloudService', () => {
const processRequest = {
appName: 'fakeName',
pagination: { skipCount: 0, maxItems: 20 },
parentId: ['fakeParentId'],
excludeByProcessCategoryName: 'fakeCategory'
parentId: ['fakeParentId']
} as ProcessListRequestModel;
requestSpy.and.callFake(returnCallBody);
const requestBodyParams = await firstValueFrom(service.fetchProcessList(processRequest));
expect(requestBodyParams).toEqual({ excludeByProcessCategoryName: 'fakeCategory', parentId: ['fakeParentId'] });
expect(requestBodyParams).toEqual({ parentId: ['fakeParentId'] });
});
it('should concat the app name to the request url', async () => {
@@ -118,8 +118,7 @@ export class ProcessListCloudService extends BaseCloudService {
suspendedFrom: requestNode.suspendedFrom,
suspendedTo: requestNode.suspendedTo,
processVariableKeys: requestNode.processVariableKeys,
processVariableFilters: requestNode.processVariableFilters,
excludeByProcessCategoryName: requestNode.excludeByProcessCategoryName
processVariableFilters: requestNode.processVariableFilters
};
if (requestNode.sorting) {
@@ -26,7 +26,6 @@ import { TaskVariableCloud } from '../../../form/models/task-variable-cloud.mode
export interface QueryParams {
include: string;
excludedCategory?: string;
}
@Injectable({