mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-40254 Remove excludeByProcessCategoryName input (#11392)
This commit is contained in:
-10
@@ -65,14 +65,4 @@ describe('ProcessFilterCloudModel', () => {
|
|||||||
expect(model.startFrom).toEqual(startOfDay(date).toISOString());
|
expect(model.startFrom).toEqual(startOfDay(date).toISOString());
|
||||||
expect(model.startTo).toEqual(endOfDay(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();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
-2
@@ -58,7 +58,6 @@ export class ProcessFilterCloudModel {
|
|||||||
initiators: string[] | null;
|
initiators: string[] | null;
|
||||||
appVersions: string[] | null;
|
appVersions: string[] | null;
|
||||||
statuses: string[] | null;
|
statuses: string[] | null;
|
||||||
excludeByProcessCategoryName: string | null;
|
|
||||||
|
|
||||||
processVariableFilters?: ProcessVariableFilterModel[];
|
processVariableFilters?: ProcessVariableFilterModel[];
|
||||||
|
|
||||||
@@ -111,7 +110,6 @@ export class ProcessFilterCloudModel {
|
|||||||
this.completedFrom = obj._completedFrom || null;
|
this.completedFrom = obj._completedFrom || null;
|
||||||
this.completedTo = obj._completedTo || null;
|
this.completedTo = obj._completedTo || null;
|
||||||
this.completedDate = obj.completedDate || null;
|
this.completedDate = obj.completedDate || null;
|
||||||
this.excludeByProcessCategoryName = obj.excludeByProcessCategoryName || null;
|
|
||||||
this._suspendedFrom = obj._suspendedFrom || null;
|
this._suspendedFrom = obj._suspendedFrom || null;
|
||||||
this._suspendedTo = obj._suspendedTo || null;
|
this._suspendedTo = obj._suspendedTo || null;
|
||||||
|
|
||||||
|
|||||||
-22
@@ -846,28 +846,6 @@ describe('ProcessListCloudComponent', () => {
|
|||||||
expect(fetchProcessListSpy).toHaveBeenCalled();
|
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', () => {
|
it('should reload process list when sorting on a column changes', () => {
|
||||||
const fetchProcessListSpy = spyOn(processListCloudService, 'fetchProcessList').and.returnValue(of(fakeProcessCloudList));
|
const fetchProcessListSpy = spyOn(processListCloudService, 'fetchProcessList').and.returnValue(of(fakeProcessCloudList));
|
||||||
component.onSortingChanged(
|
component.onSortingChanged(
|
||||||
|
|||||||
+1
-4
@@ -290,8 +290,6 @@ export class ProcessListCloudComponent
|
|||||||
@Input()
|
@Input()
|
||||||
processVariables: ProcessVariableFilterModel[];
|
processVariables: ProcessVariableFilterModel[];
|
||||||
|
|
||||||
@Input() excludeByProcessCategoryName: string = '';
|
|
||||||
|
|
||||||
/** Emitted when a row in the process list is clicked. */
|
/** Emitted when a row in the process list is clicked. */
|
||||||
@Output()
|
@Output()
|
||||||
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
rowClick: EventEmitter<string> = new EventEmitter<string>();
|
||||||
@@ -609,8 +607,7 @@ export class ProcessListCloudComponent
|
|||||||
suspendedFrom: this.suspendedFrom,
|
suspendedFrom: this.suspendedFrom,
|
||||||
suspendedTo: this.suspendedTo,
|
suspendedTo: this.suspendedTo,
|
||||||
processVariableKeys: this.getVariableDefinitionsRequestModel(),
|
processVariableKeys: this.getVariableDefinitionsRequestModel(),
|
||||||
processVariableFilters: this.processVariables,
|
processVariableFilters: this.processVariables
|
||||||
excludeByProcessCategoryName: this.excludeByProcessCategoryName
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return new ProcessListRequestModel(requestNode);
|
return new ProcessListRequestModel(requestNode);
|
||||||
|
|||||||
-2
@@ -102,7 +102,6 @@ export class ProcessListRequestModel {
|
|||||||
completedTo?: string;
|
completedTo?: string;
|
||||||
suspendedFrom?: string;
|
suspendedFrom?: string;
|
||||||
suspendedTo?: string;
|
suspendedTo?: string;
|
||||||
excludeByProcessCategoryName?: string;
|
|
||||||
|
|
||||||
processVariableFilters?: ProcessVariableFilterModel[];
|
processVariableFilters?: ProcessVariableFilterModel[];
|
||||||
processVariableKeys?: string[];
|
processVariableKeys?: string[];
|
||||||
@@ -133,7 +132,6 @@ export class ProcessListRequestModel {
|
|||||||
this.suspendedTo = obj.suspendedTo;
|
this.suspendedTo = obj.suspendedTo;
|
||||||
this.processVariableKeys = obj.processVariableKeys;
|
this.processVariableKeys = obj.processVariableKeys;
|
||||||
this.processVariableFilters = obj.processVariableFilters;
|
this.processVariableFilters = obj.processVariableFilters;
|
||||||
this.excludeByProcessCategoryName = obj.excludeByProcessCategoryName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-5
@@ -119,8 +119,7 @@ describe('ProcessListCloudService', () => {
|
|||||||
const processRequest = {
|
const processRequest = {
|
||||||
appName: 'fakeName',
|
appName: 'fakeName',
|
||||||
pagination: { skipCount: 0, maxItems: 20 },
|
pagination: { skipCount: 0, maxItems: 20 },
|
||||||
parentId: ['fakeParentId'],
|
parentId: ['fakeParentId']
|
||||||
excludeByProcessCategoryName: 'fakeCategory'
|
|
||||||
} as ProcessListRequestModel;
|
} as ProcessListRequestModel;
|
||||||
requestSpy.and.callFake(returnCallQueryParameters);
|
requestSpy.and.callFake(returnCallQueryParameters);
|
||||||
|
|
||||||
@@ -133,14 +132,13 @@ describe('ProcessListCloudService', () => {
|
|||||||
const processRequest = {
|
const processRequest = {
|
||||||
appName: 'fakeName',
|
appName: 'fakeName',
|
||||||
pagination: { skipCount: 0, maxItems: 20 },
|
pagination: { skipCount: 0, maxItems: 20 },
|
||||||
parentId: ['fakeParentId'],
|
parentId: ['fakeParentId']
|
||||||
excludeByProcessCategoryName: 'fakeCategory'
|
|
||||||
} as ProcessListRequestModel;
|
} as ProcessListRequestModel;
|
||||||
requestSpy.and.callFake(returnCallBody);
|
requestSpy.and.callFake(returnCallBody);
|
||||||
|
|
||||||
const requestBodyParams = await firstValueFrom(service.fetchProcessList(processRequest));
|
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 () => {
|
it('should concat the app name to the request url', async () => {
|
||||||
|
|||||||
+1
-2
@@ -118,8 +118,7 @@ export class ProcessListCloudService extends BaseCloudService {
|
|||||||
suspendedFrom: requestNode.suspendedFrom,
|
suspendedFrom: requestNode.suspendedFrom,
|
||||||
suspendedTo: requestNode.suspendedTo,
|
suspendedTo: requestNode.suspendedTo,
|
||||||
processVariableKeys: requestNode.processVariableKeys,
|
processVariableKeys: requestNode.processVariableKeys,
|
||||||
processVariableFilters: requestNode.processVariableFilters,
|
processVariableFilters: requestNode.processVariableFilters
|
||||||
excludeByProcessCategoryName: requestNode.excludeByProcessCategoryName
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (requestNode.sorting) {
|
if (requestNode.sorting) {
|
||||||
|
|||||||
-1
@@ -26,7 +26,6 @@ import { TaskVariableCloud } from '../../../form/models/task-variable-cloud.mode
|
|||||||
|
|
||||||
export interface QueryParams {
|
export interface QueryParams {
|
||||||
include: string;
|
include: string;
|
||||||
excludedCategory?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
|
|||||||
Reference in New Issue
Block a user