mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[MIGRATION] - Fixed lint errors for empty function
This commit is contained in:
+1
-1
@@ -55,4 +55,4 @@ const template: StoryFn<AppDetailsCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const AppDetailsCloud = template.bind({});
|
||||
export const AppDetailsCloud = template.bind({ /* empty */ });
|
||||
|
||||
@@ -49,7 +49,7 @@ describe('AppListCloudComponent', () => {
|
||||
</adf-cloud-app-list>
|
||||
`
|
||||
})
|
||||
class CustomEmptyAppListCloudTemplateComponent {}
|
||||
class CustomEmptyAppListCloudTemplateComponent { /* empty */ }
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -106,7 +106,7 @@ describe('AppListCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should display default no permissions template when response returns exception', (done) => {
|
||||
getAppsSpy.and.returnValue(throwError({}));
|
||||
getAppsSpy.and.returnValue(throwError({ /* empty */ }));
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
component.loadingError$.next(true);
|
||||
|
||||
+1
-1
@@ -57,4 +57,4 @@ const template: StoryFn<AppListCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const AppListCloud = template.bind({});
|
||||
export const AppListCloud = template.bind({ /* empty */ });
|
||||
|
||||
@@ -71,12 +71,12 @@ export class AppsProcessCloudService {
|
||||
return of([]);
|
||||
}
|
||||
const path = this.getApplicationUrl();
|
||||
const pathParams = {};
|
||||
const pathParams = { /* empty */ };
|
||||
const queryParams = { status, roles: role, sort: 'name' };
|
||||
const httpMethod = 'GET';
|
||||
const headerParams = {};
|
||||
const formParams = {};
|
||||
const bodyParam = {};
|
||||
const headerParams = { /* empty */ };
|
||||
const formParams = { /* empty */ };
|
||||
const bodyParam = { /* empty */ };
|
||||
const contentTypes = ['application/json'];
|
||||
const accepts = ['application/json'];
|
||||
const requestOptions: RequestOptions = {
|
||||
|
||||
+1
-1
@@ -64,4 +64,4 @@ const template: StoryFn<DateRangeFilterComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const DateRangeFilter = template.bind({});
|
||||
export const DateRangeFilter = template.bind({ /* empty */ });
|
||||
|
||||
@@ -29,4 +29,4 @@ import { ReactiveFormsModule } from '@angular/forms';
|
||||
exports: [DateRangeFilterComponent],
|
||||
providers: [DateRangeFilterService]
|
||||
})
|
||||
export class ProcessCommonModule {}
|
||||
export class ProcessCommonModule { /* empty */ }
|
||||
|
||||
+2
-2
@@ -35,9 +35,9 @@ class FormCloudWithCustomOutComesComponent {
|
||||
@ViewChild('adfCloudForm', { static: true })
|
||||
adfCloudForm: FormCloudComponent;
|
||||
|
||||
onCustomButtonOneClick() {}
|
||||
onCustomButtonOneClick() { /* empty */ }
|
||||
|
||||
onCustomButtonTwoClick() {}
|
||||
onCustomButtonTwoClick() { /* empty */ }
|
||||
}
|
||||
|
||||
describe('FormCloudWithCustomOutComesComponent', () => {
|
||||
|
||||
+1
-1
@@ -21,4 +21,4 @@ import { Component } from '@angular/core';
|
||||
selector: 'adf-cloud-form-custom-outcomes',
|
||||
template: '<ng-content></ng-content>'
|
||||
})
|
||||
export class FormCustomOutcomesComponent {}
|
||||
export class FormCustomOutcomesComponent { /* empty */ }
|
||||
|
||||
@@ -112,7 +112,7 @@ describe('FormCloudComponent', () => {
|
||||
providers: [
|
||||
{
|
||||
provide: VersionCompatibilityService,
|
||||
useValue: {}
|
||||
useValue: { /* empty */ }
|
||||
},
|
||||
{ provide: FormRenderingService, useClass: CloudFormRenderingService }
|
||||
]
|
||||
@@ -395,7 +395,7 @@ describe('FormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should refresh visibility when the form is loaded', () => {
|
||||
spyOn(formCloudService, 'getForm').and.returnValue(of({ formRepresentation: {} } as any));
|
||||
spyOn(formCloudService, 'getForm').and.returnValue(of({ formRepresentation: { /* empty */ } } as any));
|
||||
const formId = '123';
|
||||
const appName = 'test-app';
|
||||
|
||||
@@ -574,7 +574,7 @@ describe('FormCloudComponent', () => {
|
||||
const appName = 'test-app';
|
||||
const taskId = '456';
|
||||
|
||||
spyOn(formCloudService, 'getTask').and.returnValue(of({}));
|
||||
spyOn(formCloudService, 'getTask').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(formCloudService, 'getTaskVariables').and.returnValue(of([]));
|
||||
spyOn(formCloudService, 'getTaskForm').and.returnValue(of({ taskId, selectedOutcome: 'custom-outcome' }));
|
||||
|
||||
@@ -594,7 +594,7 @@ describe('FormCloudComponent', () => {
|
||||
it('should handle error when getting form by task id', (done) => {
|
||||
const error = 'Some error';
|
||||
|
||||
spyOn(formCloudService, 'getTask').and.returnValue(of({}));
|
||||
spyOn(formCloudService, 'getTask').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(formCloudService, 'getTaskVariables').and.returnValue(of([]));
|
||||
spyOn(formComponent, 'handleError').and.stub();
|
||||
spyOn(formCloudService, 'getTaskForm').and.callFake(() => throwError(error));
|
||||
@@ -1235,7 +1235,7 @@ describe('FormCloudComponent', () => {
|
||||
*/
|
||||
async function loadForm(form?: any): Promise<void> {
|
||||
formComponent.ngOnChanges({
|
||||
form: { currentValue: formComponent.parseForm(form || {}), firstChange: true, isFirstChange: () => true, previousValue: undefined }
|
||||
form: { currentValue: formComponent.parseForm(form || { /* empty */ }), firstChange: true, isFirstChange: () => true, previousValue: undefined }
|
||||
});
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
@@ -1390,10 +1390,10 @@ describe('FormCloudComponent', () => {
|
||||
{
|
||||
displayMode: FormCloudDisplayMode.fullScreen,
|
||||
options: {
|
||||
onCompleteTask: () => {},
|
||||
onDisplayModeOff: () => {},
|
||||
onDisplayModeOn: () => {},
|
||||
onSaveTask: () => {},
|
||||
onCompleteTask: () => { /* empty */ },
|
||||
onDisplayModeOff: () => { /* empty */ },
|
||||
onDisplayModeOn: () => { /* empty */ },
|
||||
onSaveTask: () => { /* empty */ },
|
||||
displayToolbar: false
|
||||
}
|
||||
}
|
||||
@@ -1545,7 +1545,7 @@ describe('retrieve metadata on submit', () => {
|
||||
provideTranslations('app', 'resources'),
|
||||
{
|
||||
provide: VersionCompatibilityService,
|
||||
useValue: {}
|
||||
useValue: { /* empty */ }
|
||||
}
|
||||
]
|
||||
});
|
||||
@@ -1561,7 +1561,7 @@ describe('retrieve metadata on submit', () => {
|
||||
});
|
||||
|
||||
it('should set values when updateFormValuesRequested is updated', async () => {
|
||||
formComponent.form.values['pfx_property_three'] = {};
|
||||
formComponent.form.values['pfx_property_three'] = { /* empty */ };
|
||||
formComponent.form.values['pfx_property_four'] = 'empty';
|
||||
formComponent.form.values['pfx_property_five'] = 'green';
|
||||
|
||||
@@ -1634,7 +1634,7 @@ describe('retrieve metadata on submit', () => {
|
||||
it('should enable save button when form field value changed', () => {
|
||||
formComponent.disableSaveButton = true;
|
||||
|
||||
formService.formFieldValueChanged.next({} as FormFieldEvent);
|
||||
formService.formFieldValueChanged.next({ /* empty */ } as FormFieldEvent);
|
||||
|
||||
expect(formComponent.disableSaveButton).toBeFalse();
|
||||
});
|
||||
|
||||
@@ -368,7 +368,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
parseForm(formCloudRepresentationJSON?: any): FormModel | null {
|
||||
if (formCloudRepresentationJSON) {
|
||||
const formValues: FormValues = {};
|
||||
const formValues: FormValues = { /* empty */ };
|
||||
(this.data || []).forEach((variable) => {
|
||||
formValues[variable.name] = variable.value;
|
||||
});
|
||||
@@ -457,7 +457,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
return !args.defaultPrevented;
|
||||
}
|
||||
|
||||
protected storeFormAsMetadata() {}
|
||||
protected storeFormAsMetadata() { /* empty */ }
|
||||
|
||||
ngOnDestroy() {
|
||||
this.onDestroy$.next(true);
|
||||
|
||||
+1
-1
@@ -59,4 +59,4 @@ const template: StoryFn<FormDefinitionSelectorCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const FormDefinitionSelectorCloud = template.bind({});
|
||||
export const FormDefinitionSelectorCloud = template.bind({ /* empty */ });
|
||||
|
||||
+1
-1
@@ -258,7 +258,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
|
||||
contentModelFormFileHandler(file?: any) {
|
||||
if (file?.id && this.isRetrieveMetadataOptionEnabled()) {
|
||||
const values: FormValues = {};
|
||||
const values: FormValues = { /* empty */ };
|
||||
this.nodesApi.getNode(file.id).then((acsNode) => {
|
||||
const metadata = acsNode?.entry?.properties;
|
||||
if (metadata) {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ export class FilePropertiesTableCloudComponent {
|
||||
@Output()
|
||||
removeAttachFile: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(private localizedDatePipe: LocalizedDatePipe, private thumbnailService: ThumbnailService) {}
|
||||
constructor(private localizedDatePipe: LocalizedDatePipe, private thumbnailService: ThumbnailService) { /* empty */ }
|
||||
|
||||
onRowClicked(file?: Node) {
|
||||
this.rowClick.emit(file);
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ export class WidgetDataTableAdapter implements DataTableAdapter {
|
||||
}
|
||||
|
||||
private buildDataRowFromItem(item: any): ObjectDataRow {
|
||||
const rowData = {};
|
||||
const rowData = { /* empty */ };
|
||||
this.columnKeys.forEach((path, i) => {
|
||||
const rowValue = this.extractPropertyValue(this.helper.splitPathIntoProperties(path), item);
|
||||
|
||||
|
||||
+2
-2
@@ -37,13 +37,13 @@ describe('DataTablePathParserHelper', () => {
|
||||
const testCases: DataTablePathParserTestCase[] = [
|
||||
{
|
||||
description: 'not existent',
|
||||
data: {},
|
||||
data: { /* empty */ },
|
||||
path: 'nonexistent.path',
|
||||
expected: []
|
||||
},
|
||||
{
|
||||
description: 'not defined',
|
||||
data: {},
|
||||
data: { /* empty */ },
|
||||
path: undefined,
|
||||
expected: []
|
||||
},
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ export class PropertiesViewerWrapperComponent implements OnInit, OnChanges {
|
||||
@Output()
|
||||
nodeContentLoaded = new EventEmitter<Node>();
|
||||
|
||||
constructor(private nodesApiService: NodesApiService) {}
|
||||
constructor(private nodesApiService: NodesApiService) { /* empty */ }
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes?.['nodeId'] && changes['nodeId'].currentValue && !changes['nodeId'].isFirstChange()) {
|
||||
|
||||
+9
-9
@@ -101,7 +101,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
|
||||
describe('when widget is readonly', () => {
|
||||
beforeEach(() => {
|
||||
widget.field = new FormFieldModel(new FormModel({}), {
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }), {
|
||||
id: 'radio-id',
|
||||
name: 'radio-name',
|
||||
type: FormFieldTypes.RADIO_BUTTONS,
|
||||
@@ -136,13 +136,13 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
|
||||
describe('when widget is readonly', () => {
|
||||
it('should call rest api when form is NOT readonly', () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}, undefined, false), getRadioButtonsWidgetConfig(true));
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }, undefined, false), getRadioButtonsWidgetConfig(true));
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(formCloudService.getRestWidgetData).toHaveBeenCalled();
|
||||
});
|
||||
it('should NOT call rest api when form is readonly', () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}, undefined, true), getRadioButtonsWidgetConfig(true));
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }, undefined, true), getRadioButtonsWidgetConfig(true));
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(formCloudService.getRestWidgetData).not.toHaveBeenCalled();
|
||||
@@ -151,13 +151,13 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
|
||||
describe('when widget is NOT readonly', () => {
|
||||
it('should call rest api when form is NOT readonly', () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}, undefined, false), getRadioButtonsWidgetConfig(false));
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }, undefined, false), getRadioButtonsWidgetConfig(false));
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(formCloudService.getRestWidgetData).toHaveBeenCalled();
|
||||
});
|
||||
it('should NOT call rest api when form is readonly', () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}, undefined, true), getRadioButtonsWidgetConfig(false));
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }, undefined, true), getRadioButtonsWidgetConfig(false));
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(formCloudService.getRestWidgetData).not.toHaveBeenCalled();
|
||||
@@ -166,7 +166,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
});
|
||||
|
||||
it('should be able to set a Radio Buttons widget as required', async () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}), {
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }), {
|
||||
id: 'radio-id',
|
||||
name: 'radio-name-label',
|
||||
type: FormFieldTypes.RADIO_BUTTONS,
|
||||
@@ -192,7 +192,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
});
|
||||
|
||||
it('should set Radio Buttons widget as valid when required and not empty', async () => {
|
||||
widget.field = new FormFieldModel(new FormModel({}), {
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }), {
|
||||
id: 'radio-id',
|
||||
name: 'radio-name-label',
|
||||
type: FormFieldTypes.RADIO_BUTTONS,
|
||||
@@ -211,7 +211,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
|
||||
it('should be able to set a Radio Buttons widget when rest option enabled', () => {
|
||||
spyOn(formCloudService, 'getRestWidgetData').and.returnValue(of(restOption));
|
||||
widget.field = new FormFieldModel(new FormModel({}), {
|
||||
widget.field = new FormFieldModel(new FormModel({ /* empty */ }), {
|
||||
id: 'radio-id',
|
||||
name: 'radio-name-label',
|
||||
type: FormFieldTypes.RADIO_BUTTONS,
|
||||
@@ -248,7 +248,7 @@ describe('RadioButtonsCloudWidgetComponent', () => {
|
||||
});
|
||||
|
||||
it('should change the value of the form when an option is clicked', async () => {
|
||||
const form = new FormModel({});
|
||||
const form = new FormModel({ /* empty */ });
|
||||
widget.field = new FormFieldModel(form, {
|
||||
id: 'radio-id',
|
||||
name: 'radio-name-label',
|
||||
|
||||
@@ -101,4 +101,4 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
||||
],
|
||||
providers: [FormCloudSpinnerService]
|
||||
})
|
||||
export class FormCloudModule {}
|
||||
export class FormCloudModule { /* empty */ }
|
||||
|
||||
@@ -646,7 +646,7 @@ export const cloudFormMock = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: [
|
||||
{
|
||||
id: 'FormVarStrId',
|
||||
@@ -735,7 +735,7 @@ export const fakeCloudForm = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -819,7 +819,7 @@ export const formDefinitionThreeColumnMock = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -829,7 +829,7 @@ export const emptyFormRepresentationJSON = {
|
||||
description: '',
|
||||
fields: [],
|
||||
id: 'form-3de070b6-63df-4058-8028-ac82283d64fa',
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
name: 'form',
|
||||
outcomes: [],
|
||||
length: 0,
|
||||
@@ -926,7 +926,7 @@ export const conditionalUploadWidgetsMock: any = {
|
||||
}
|
||||
}
|
||||
],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -1045,7 +1045,7 @@ export const multilingualForm: any = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -1314,7 +1314,7 @@ export const fakeMetadataForm = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
};
|
||||
@@ -1410,7 +1410,7 @@ export const fakeViewerForm = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,14 +44,14 @@ describe('FormCloud', () => {
|
||||
const formRepresentation = {
|
||||
id: '<id>',
|
||||
name: '<name>',
|
||||
formDefinition: {}
|
||||
formDefinition: { /* empty */ }
|
||||
};
|
||||
const form = new FormModel(formRepresentation);
|
||||
expect(form.taskName).toBe(formRepresentation.name);
|
||||
});
|
||||
|
||||
it('should set readonly state from params', () => {
|
||||
const form = new FormModel({}, null, true);
|
||||
const form = new FormModel({ /* empty */ }, null, true);
|
||||
expect(form.readOnly).toBeTruthy();
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -59,8 +59,8 @@ describe('ContentCloudNodeSelectorService', () => {
|
||||
|
||||
showWarningSpy = spyOn(notificationService, 'showWarning');
|
||||
openDialogSpy = spyOn(dialog, 'open').and.returnValue({
|
||||
afterOpened: () => of({}),
|
||||
afterClosed: () => of({}),
|
||||
afterOpened: () => of({ /* empty */ }),
|
||||
afterClosed: () => of({ /* empty */ }),
|
||||
componentInstance: {
|
||||
error: new Subject<any>()
|
||||
}
|
||||
|
||||
+3
-3
@@ -36,7 +36,7 @@ export class ContentCloudNodeSelectorService {
|
||||
|
||||
sourceNodeNotFound = false;
|
||||
|
||||
constructor(private apiService: AlfrescoApiService, private notificationService: NotificationService, private dialog: MatDialog) {}
|
||||
constructor(private apiService: AlfrescoApiService, private notificationService: NotificationService, private dialog: MatDialog) { /* empty */ }
|
||||
|
||||
openUploadFileDialog(
|
||||
currentFolderId?: string,
|
||||
@@ -66,7 +66,7 @@ export class ContentCloudNodeSelectorService {
|
||||
if (destinationFolderPath.alias && destinationFolderPath.path) {
|
||||
try {
|
||||
return await this.getNodeId(destinationFolderPath.alias, destinationFolderPath.path).toPromise();
|
||||
} catch {}
|
||||
} catch { /* empty */ }
|
||||
}
|
||||
|
||||
return this.getNodeId(destinationFolderPath.alias).toPromise();
|
||||
@@ -82,7 +82,7 @@ export class ContentCloudNodeSelectorService {
|
||||
if (nodeId) {
|
||||
try {
|
||||
isExistingNode = await this.getNodeId(nodeId).pipe(mapTo(true)).toPromise();
|
||||
} catch {}
|
||||
} catch { /* empty */ }
|
||||
}
|
||||
return isExistingNode;
|
||||
}
|
||||
|
||||
@@ -35,10 +35,10 @@ export class DisplayModeService {
|
||||
{
|
||||
displayMode: FormCloudDisplayMode.fullScreen,
|
||||
options: {
|
||||
onDisplayModeOn: () => { },
|
||||
onDisplayModeOn: () => {/** empty */ },
|
||||
onDisplayModeOff: (id: string) => DisplayModeService.changeDisplayMode({ displayMode: FormCloudDisplayMode.inline, id }),
|
||||
onCompleteTask: (id: string) => DisplayModeService.changeDisplayMode({ displayMode: FormCloudDisplayMode.inline, id }),
|
||||
onSaveTask: () => { },
|
||||
onSaveTask: () => { /** empty */ },
|
||||
displayToolbar: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ describe('Form Cloud service', () => {
|
||||
|
||||
it('should parse valid form json ', () => {
|
||||
const formId = 'form-id';
|
||||
const json = { formRepresentation: { id: formId, name: 'task-form', taskId: 'task-id', formDefinition: {} } };
|
||||
const json = { formRepresentation: { id: formId, name: 'task-form', taskId: 'task-id', formDefinition: { /* empty */ } } };
|
||||
|
||||
const result = service.parseForm(json);
|
||||
expect(result).toBeDefined();
|
||||
@@ -186,7 +186,7 @@ describe('Form Cloud service', () => {
|
||||
of({
|
||||
formRepresentation: {
|
||||
name: 'task-form',
|
||||
formDefinition: {}
|
||||
formDefinition: { /* empty */ }
|
||||
}
|
||||
} as any)
|
||||
);
|
||||
@@ -204,7 +204,7 @@ describe('Form Cloud service', () => {
|
||||
requestSpy.and.returnValue(Promise.resolve(mockTaskResponseBody));
|
||||
const formId = 'form-id';
|
||||
|
||||
service.saveTaskForm(appName, taskId, processInstanceId, formId, {}).subscribe((result: any) => {
|
||||
service.saveTaskForm(appName, taskId, processInstanceId, formId, { /* empty */ }).subscribe((result: any) => {
|
||||
expect(result).toBeDefined();
|
||||
expect(result.id).toBe('id');
|
||||
expect(result.name).toBe('name');
|
||||
@@ -218,7 +218,7 @@ describe('Form Cloud service', () => {
|
||||
requestSpy.and.returnValue(Promise.resolve(mockTaskResponseBody));
|
||||
const formId = 'form-id';
|
||||
|
||||
service.completeTaskForm(appName, taskId, processInstanceId, formId, {}, '', 1).subscribe((result: any) => {
|
||||
service.completeTaskForm(appName, taskId, processInstanceId, formId, { /* empty */ }, '', 1).subscribe((result: any) => {
|
||||
expect(result).toBeDefined();
|
||||
expect(result.id).toBe('id');
|
||||
expect(result.name).toBe('name');
|
||||
|
||||
@@ -198,7 +198,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
|
||||
return this.get(url);
|
||||
}
|
||||
|
||||
getRestWidgetData(formName: string, widgetId: string, body: any = {}): Observable<FormFieldOption[]> {
|
||||
getRestWidgetData(formName: string, widgetId: string, body: any = { /* empty */ }): Observable<FormFieldOption[]> {
|
||||
const appName = this.appConfigService.get('alfresco-deployed-apps')[0]?.name;
|
||||
const apiUrl = `${this.getBasePath(appName)}/form/v1/forms/${formName}/values/${widgetId}`;
|
||||
return this.post(apiUrl, body);
|
||||
@@ -220,7 +220,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
|
||||
};
|
||||
delete flattenForm.formDefinition;
|
||||
|
||||
const formValues: FormValues = {};
|
||||
const formValues: FormValues = { /* empty */ };
|
||||
(data || []).forEach(variable => {
|
||||
formValues[variable.name] = variable.value;
|
||||
});
|
||||
|
||||
@@ -43,7 +43,7 @@ export class ProcessCloudContentService {
|
||||
private nodesApiService: NodesApiService,
|
||||
private contentService: ContentService,
|
||||
private downloadService: DownloadService
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
createTemporaryRawRelatedContent(file: File, nodeId: string): Observable<Node> {
|
||||
return from(this.uploadApi.uploadFile(file, '', nodeId, null, { overwrite: true })).pipe(
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
selector: 'adf-cloud-overlay-test',
|
||||
template: `<div>adf-cloud-overlay-test</div>`
|
||||
})
|
||||
class SpinnerTestComponent {}
|
||||
class SpinnerTestComponent { /* empty */ }
|
||||
|
||||
describe('FormCloudSpinnerService', () => {
|
||||
let fixture: ComponentFixture<SpinnerTestComponent>;
|
||||
|
||||
+4
-4
@@ -160,23 +160,23 @@ const template: StoryFn<GroupCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const DefaultGroupCloud = template.bind({});
|
||||
export const DefaultGroupCloud = template.bind({ /* empty */ });
|
||||
|
||||
export const ValidPreselectedGroups = template.bind({});
|
||||
export const ValidPreselectedGroups = template.bind({ /* empty */ });
|
||||
ValidPreselectedGroups.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
preSelectGroups: mockFoodGroups
|
||||
};
|
||||
|
||||
export const MandatoryPreselectedGroups = template.bind({});
|
||||
export const MandatoryPreselectedGroups = template.bind({ /* empty */ });
|
||||
MandatoryPreselectedGroups.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
preSelectGroups: [mockVegetableAubergine, { ...mockMeatChicken, readonly: true }]
|
||||
};
|
||||
|
||||
export const InvalidPreselectedGroups = template.bind({});
|
||||
export const InvalidPreselectedGroups = template.bind({ /* empty */ });
|
||||
InvalidPreselectedGroups.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
|
||||
@@ -140,7 +140,7 @@ export class GroupCloudComponent implements OnInit, OnChanges, OnDestroy {
|
||||
constructor(
|
||||
@Inject(IDENTITY_GROUP_SERVICE_TOKEN)
|
||||
private identityGroupService: IdentityGroupServiceInterface
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSearch();
|
||||
|
||||
@@ -32,7 +32,7 @@ export class IdentityGroupService implements IdentityGroupServiceInterface {
|
||||
constructor(
|
||||
private oAuth2Service: OAuth2Service,
|
||||
private appConfigService: AppConfigService
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
public search(name: string, filters?: IdentityGroupFilterInterface): Observable<IdentityGroupModel[]> {
|
||||
if (name.trim() === '') {
|
||||
|
||||
@@ -89,4 +89,4 @@ import { MatTabsModule } from '@angular/material/tabs';
|
||||
MatExpansionModule
|
||||
]
|
||||
})
|
||||
export class MaterialModule {}
|
||||
export class MaterialModule { /* empty */ }
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ProcessInstanceVariable } from '../models/process-instance-variable.model';
|
||||
|
||||
export const getProcessInstanceVariableMock = (variable: Partial<ProcessInstanceVariable> = {}): ProcessInstanceVariable => ({
|
||||
export const getProcessInstanceVariableMock = (variable: Partial<ProcessInstanceVariable> = { /* empty */ }): ProcessInstanceVariable => ({
|
||||
id: 1,
|
||||
variableDefinitionId: 'variableDefinitionId',
|
||||
processDefinitionKey: 'processDefinitionKey',
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
import { TaskCloudModel } from '../models/task-cloud.model';
|
||||
|
||||
export const getTaskCloudModelMock = (cloudModel: Partial<TaskCloudModel> = {}): TaskCloudModel => ({
|
||||
export const getTaskCloudModelMock = (cloudModel: Partial<TaskCloudModel> = { /* empty */ }): TaskCloudModel => ({
|
||||
id: '1',
|
||||
appName: 'app',
|
||||
appVersion: 'version',
|
||||
|
||||
+7
-7
@@ -177,40 +177,40 @@ const template: StoryFn<PeopleCloudComponent> = args => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const DefaultPeopleCloud = template.bind({});
|
||||
export const DefaultPeopleCloud = template.bind({ /* empty */ });
|
||||
|
||||
export const ValidPreselectedUsers = template.bind({});
|
||||
export const ValidPreselectedUsers = template.bind({ /* empty */ });
|
||||
ValidPreselectedUsers.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
preSelectUsers: mockFoodUsers
|
||||
};
|
||||
|
||||
export const MandatoryPreselectedUsers = template.bind({});
|
||||
export const MandatoryPreselectedUsers = template.bind({ /* empty */ });
|
||||
MandatoryPreselectedUsers.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
preSelectUsers: [{ ...mockKielbasaSausage, readonly: true }, mockShepherdsPie]
|
||||
};
|
||||
|
||||
export const InvalidPreselectedUsers = template.bind({});
|
||||
export const InvalidPreselectedUsers = template.bind({ /* empty */ });
|
||||
InvalidPreselectedUsers.args = {
|
||||
validate: true,
|
||||
mode: 'multiple',
|
||||
preSelectUsers: [{ id: 'invalid-user', username: 'Invalid User', firstName: 'Invalid', lastName: 'User', email: 'invalid@xyz.com' }]
|
||||
};
|
||||
|
||||
export const ExcludedUsers = template.bind({});
|
||||
export const ExcludedUsers = template.bind({ /* empty */ });
|
||||
ExcludedUsers.args = {
|
||||
excludedUsers: [mockKielbasaSausage, mockYorkshirePudding]
|
||||
};
|
||||
|
||||
export const NoUsers = template.bind({});
|
||||
export const NoUsers = template.bind({ /* empty */ });
|
||||
NoUsers.args = {
|
||||
excludedUsers: mockFoodUsers
|
||||
};
|
||||
|
||||
export const InvalidOrEmptyAppName = template.bind({});
|
||||
export const InvalidOrEmptyAppName = template.bind({ /* empty */ });
|
||||
InvalidOrEmptyAppName.args = {
|
||||
appName: null
|
||||
};
|
||||
|
||||
@@ -190,7 +190,7 @@ export class PeopleCloudComponent implements OnInit, OnChanges, OnDestroy, After
|
||||
constructor(
|
||||
@Inject(IDENTITY_USER_SERVICE_TOKEN)
|
||||
private identityUserService: IdentityUserServiceInterface
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.initSearch();
|
||||
|
||||
@@ -31,4 +31,4 @@ import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
exports: [PeopleCloudComponent],
|
||||
providers: [{ provide: IDENTITY_USER_SERVICE_TOKEN, useExisting: IdentityUserService }]
|
||||
})
|
||||
export class PeopleCloudModule {}
|
||||
export class PeopleCloudModule { /* empty */ }
|
||||
|
||||
@@ -30,7 +30,7 @@ const IDENTITY_MICRO_SERVICE_INGRESS = 'identity-adapter-service';
|
||||
export class IdentityUserService implements IdentityUserServiceInterface {
|
||||
queryParams: { search: string; application?: string; roles?: string[]; groups?: string[] };
|
||||
|
||||
constructor(private jwtHelperService: JwtHelperService, private oAuth2Service: OAuth2Service, private appConfigService: AppConfigService) {}
|
||||
constructor(private jwtHelperService: JwtHelperService, private oAuth2Service: OAuth2Service, private appConfigService: AppConfigService) { /* empty */ }
|
||||
|
||||
/**
|
||||
* Gets the name and other basic details of the current user.
|
||||
|
||||
@@ -45,7 +45,7 @@ export class CancelProcessDirective implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private elementRef: ElementRef,
|
||||
private processCloudService: ProcessCloudService,
|
||||
private identityUserService: IdentityUserService) {}
|
||||
private identityUserService: IdentityUserService) { /* empty */ }
|
||||
|
||||
ngOnInit() {
|
||||
this.processCloudService.dataChangesDetected
|
||||
|
||||
+1
-1
@@ -783,7 +783,7 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
|
||||
it('should emit delete event and delete the filter on click of delete button', async () => {
|
||||
component.toggleFilterActions = true;
|
||||
const deleteFilterSpy = spyOn(service, 'deleteFilter').and.returnValue(of({} as any));
|
||||
const deleteFilterSpy = spyOn(service, 'deleteFilter').and.returnValue(of({ /* empty */ } as any));
|
||||
const deleteSpy = spyOn(component.action, 'emit');
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
+11
-11
@@ -197,7 +197,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
private processFilterCloudService: ProcessFilterCloudService,
|
||||
private appsProcessCloudService: AppsProcessCloudService,
|
||||
private processCloudService: ProcessCloudService
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
ngOnInit() {
|
||||
this.userPreferencesService
|
||||
@@ -235,7 +235,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
return { [property.key]: property.value };
|
||||
}
|
||||
});
|
||||
return properties.reduce((result, current) => Object.assign(result, current), {});
|
||||
return properties.reduce((result, current) => Object.assign(result, current), { /* empty */ });
|
||||
}
|
||||
|
||||
get lastModifiedFrom(): AbstractControl<Date> {
|
||||
@@ -254,7 +254,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
return Object.values(property.attributes).reduce((result, key) => {
|
||||
result[key] = property.value[key];
|
||||
return result;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -267,7 +267,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
.pipe(finalize(() => (this.isLoading = false)))
|
||||
.subscribe((response) => {
|
||||
this.filterHasBeenChanged = false;
|
||||
this.processFilter = new ProcessFilterCloudModel(Object.assign({}, response || {}, this.processFilter || {}));
|
||||
this.processFilter = new ProcessFilterCloudModel(Object.assign({ /* empty */ }, response || { /* empty */ }, this.processFilter || { /* empty */ }));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
this.setLastModifiedFromFilter(formValues);
|
||||
this.setLastModifiedToFilter(formValues);
|
||||
|
||||
const newValue = new ProcessFilterCloudModel(Object.assign({}, this.processFilter, formValues));
|
||||
const newValue = new ProcessFilterCloudModel(Object.assign({ /* empty */ }, this.processFilter, formValues));
|
||||
const changed = !this.compareFilters(newValue, this.processFilter);
|
||||
this.filterHasBeenChanged = changed;
|
||||
|
||||
@@ -318,7 +318,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
|
||||
if (this.filterProperties.includes('initiator')) {
|
||||
this.initiatorOptions = this.processFilter.initiator
|
||||
? this.processFilter.initiator.split(',').map((username) => Object.assign({}, { username }))
|
||||
? this.processFilter.initiator.split(',').map((username) => Object.assign({ /* empty */ }, { username }))
|
||||
: [];
|
||||
}
|
||||
|
||||
@@ -499,7 +499,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
}),
|
||||
switchMap(() => this.restoreDefaultProcessFilters())
|
||||
)
|
||||
.subscribe(() => {});
|
||||
.subscribe(() => { /* empty */ });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -525,7 +525,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
id: filterId,
|
||||
key: 'custom-' + filterKey
|
||||
};
|
||||
const resultFilter: ProcessFilterCloudModel = Object.assign({}, this.processFilter, newFilter);
|
||||
const resultFilter: ProcessFilterCloudModel = Object.assign({ /* empty */ }, this.processFilter, newFilter);
|
||||
this.processFilterCloudService.addFilter(resultFilter).subscribe(() => {
|
||||
saveAsAction.filter = resultFilter;
|
||||
this.filterHasBeenChanged = false;
|
||||
@@ -545,7 +545,7 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
}),
|
||||
switchMap(() => this.restoreDefaultProcessFilters())
|
||||
)
|
||||
.subscribe(() => {});
|
||||
.subscribe(() => { /* empty */ });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -729,8 +729,8 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
|
||||
}
|
||||
|
||||
private isFilterChanged(oldValue: ProcessFilterCloudModel, newValue: ProcessFilterCloudModel): boolean {
|
||||
const oldJson = JSON.stringify(this.processFilterCloudService.writeQueryParams(oldValue || {}, this.filterProperties));
|
||||
const newJson = JSON.stringify(this.processFilterCloudService.writeQueryParams(newValue || {}, this.filterProperties));
|
||||
const oldJson = JSON.stringify(this.processFilterCloudService.writeQueryParams(oldValue || { /* empty */ }, this.filterProperties));
|
||||
const newJson = JSON.stringify(this.processFilterCloudService.writeQueryParams(newValue || { /* empty */ }, this.filterProperties));
|
||||
|
||||
return oldJson !== newJson;
|
||||
}
|
||||
|
||||
+2
-2
@@ -38,7 +38,7 @@ export class ProcessFilterCloudService {
|
||||
}
|
||||
|
||||
readQueryParams(obj: any): ProcessFilterCloudModel {
|
||||
const model = Object.assign({}, obj) as ProcessFilterCloudModel;
|
||||
const model = Object.assign({ /* empty */ }, obj) as ProcessFilterCloudModel;
|
||||
|
||||
if (Object.prototype.hasOwnProperty.call(obj, 'appVersion') && obj['appVersion']) {
|
||||
if (typeof obj['appVersion'] === 'string') {
|
||||
@@ -58,7 +58,7 @@ export class ProcessFilterCloudService {
|
||||
}
|
||||
|
||||
writeQueryParams(value: any, filterProperties: string[], appName?: string, id?: string): any {
|
||||
value = value || {};
|
||||
value = value || { /* empty */ };
|
||||
const result = {
|
||||
appName: appName || value['appName'],
|
||||
id: id || value['id'],
|
||||
|
||||
+4
-4
@@ -58,25 +58,25 @@ const template: StoryFn<ProcessHeaderCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const DefaultProcessHeaderCloud = template.bind({});
|
||||
export const DefaultProcessHeaderCloud = template.bind({ /* empty */ });
|
||||
DefaultProcessHeaderCloud.args = {
|
||||
appName: 'app',
|
||||
processInstanceId: 'mock-process-id'
|
||||
};
|
||||
|
||||
export const NoParentAndBusinessAndName = template.bind({});
|
||||
export const NoParentAndBusinessAndName = template.bind({ /* empty */ });
|
||||
NoParentAndBusinessAndName.args = {
|
||||
appName: 'app-placeholders',
|
||||
processInstanceId: 'mock-process-id'
|
||||
};
|
||||
|
||||
export const InvalidOrMissingAppName = template.bind({});
|
||||
export const InvalidOrMissingAppName = template.bind({ /* empty */ });
|
||||
InvalidOrMissingAppName.args = {
|
||||
appName: undefined,
|
||||
processInstanceId: 'mock-process-id'
|
||||
};
|
||||
|
||||
export const InvalidOrMissingProcessInstanceID = template.bind({});
|
||||
export const InvalidOrMissingProcessInstanceID = template.bind({ /* empty */ });
|
||||
InvalidOrMissingProcessInstanceID.args = {
|
||||
appName: 'app',
|
||||
processInstanceId: undefined
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ export class ProcessHeaderCloudComponent implements OnChanges, OnInit, OnDestroy
|
||||
private processCloudService: ProcessCloudService,
|
||||
private translationService: TranslationService,
|
||||
private appConfig: AppConfigService
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
ngOnInit() {
|
||||
this.dateFormat = this.appConfig.get('adf-cloud-process-header.defaultDateFormat');
|
||||
|
||||
+6
-6
@@ -281,7 +281,7 @@ describe('ProcessListCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const mainMenuButton = fixture.debugElement.query(By.css('[data-automation-id="adf-datatable-main-menu-button"]'));
|
||||
mainMenuButton.triggerEventHandler('click', {});
|
||||
mainMenuButton.triggerEventHandler('click', { /* empty */ });
|
||||
fixture.detectChanges();
|
||||
|
||||
const columnSelectorMenu = fixture.debugElement.query(By.css('adf-datatable-column-selector'));
|
||||
@@ -381,7 +381,7 @@ describe('ProcessListCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should update columns widths when a column width gets changed', () => {
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({}));
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({ /* empty */ }));
|
||||
component.appName = 'fake-app-name';
|
||||
component.reload();
|
||||
fixture.detectChanges();
|
||||
@@ -397,7 +397,7 @@ describe('ProcessListCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should update columns widths while preserving previously saved widths when a column width gets changed', () => {
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({}));
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({ /* empty */ }));
|
||||
component.appName = 'fake-app-name';
|
||||
component.reload();
|
||||
fixture.detectChanges();
|
||||
@@ -448,7 +448,7 @@ describe('ProcessListCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should call endpoint when a column visibility gets changed', () => {
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({}));
|
||||
spyOn(preferencesService, 'updatePreference').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(processListCloudService, 'getProcessByRequest');
|
||||
component.ngAfterContentInit();
|
||||
spyOn(component, 'createDatatableSchema');
|
||||
@@ -629,8 +629,8 @@ describe('ProcessListCloudComponent: Creating an empty custom template - EmptyTe
|
||||
|
||||
let fixtureEmpty: ComponentFixture<EmptyTemplateComponent>;
|
||||
const preferencesService = jasmine.createSpyObj('preferencesService', {
|
||||
getPreferences: of({}),
|
||||
updatePreference: of({})
|
||||
getPreferences: of({ /* empty */ }),
|
||||
updatePreference: of({ /* empty */ })
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
+2
-2
@@ -419,7 +419,7 @@ export class ProcessListCloudComponent
|
||||
}
|
||||
|
||||
return visibleColumnsMap;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
|
||||
this.createColumns();
|
||||
this.createDatatableSchema();
|
||||
@@ -435,7 +435,7 @@ export class ProcessListCloudComponent
|
||||
widthsColumnsMap[column.id] = Math.ceil(column.width);
|
||||
}
|
||||
return widthsColumnsMap;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
|
||||
this.columnsWidths = { ...this.columnsWidths, ...newColumnsWidths };
|
||||
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ describe('ProcessListDatatableAdapter', () => {
|
||||
};
|
||||
|
||||
const row: DataRow = {
|
||||
getValue: () => {},
|
||||
getValue: () => { /* empty */ },
|
||||
hasValue: () => true,
|
||||
isSelected: false,
|
||||
obj: viewModel
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ describe('ProcessListCloudService', () => {
|
||||
const processRequest = { appName: null } as ProcessQueryCloudRequestModel;
|
||||
requestSpy.and.callFake(returnCallUrl);
|
||||
service.getProcessByRequest(processRequest).subscribe(
|
||||
() => { },
|
||||
() => { /** empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('Appname not configured');
|
||||
done();
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ export class ProcessListCloudService extends BaseCloudService {
|
||||
}
|
||||
|
||||
protected buildQueryParams(requestNode: ProcessQueryCloudRequestModel): any {
|
||||
const queryParam = {};
|
||||
const queryParam = { /* empty */ };
|
||||
|
||||
for (const property in requestNode) {
|
||||
if (
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ export class ProcessTaskListCloudService extends BaseCloudService implements Tas
|
||||
}
|
||||
|
||||
protected buildQueryParams(requestNode: TaskQueryCloudRequestModel): any {
|
||||
const queryParam: any = {};
|
||||
const queryParam: any = { /* empty */ };
|
||||
for (const property in requestNode) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(requestNode, property) &&
|
||||
|
||||
+3
-3
@@ -187,7 +187,7 @@ export const fakeStartForm = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -251,7 +251,7 @@ export const fakeStartFormNotValid = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
}
|
||||
}
|
||||
@@ -310,6 +310,6 @@ export const fakeFormModelJson = {
|
||||
}
|
||||
],
|
||||
outcomes: [],
|
||||
metadata: {},
|
||||
metadata: { /* empty */ },
|
||||
variables: []
|
||||
};
|
||||
|
||||
+1
-1
@@ -26,6 +26,6 @@ export class ProcessPayloadCloud {
|
||||
this.processDefinitionKey = obj?.processDefinitionKey;
|
||||
this.name = obj?.name;
|
||||
this.businessKey = obj?.businessKey;
|
||||
this.variables = obj?.variables || {};
|
||||
this.variables = obj?.variables || { /* empty */ };
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ const template: StoryFn<RichTextEditorComponent> = (args) => ({
|
||||
`
|
||||
});
|
||||
|
||||
export const DefaultRichTextEditor = template.bind({});
|
||||
export const DefaultRichTextEditor = template.bind({ /* empty */ });
|
||||
DefaultRichTextEditor.args = {
|
||||
data: {
|
||||
time: 1550476186479,
|
||||
|
||||
@@ -33,7 +33,7 @@ export class BaseCloudService {
|
||||
accepts: ['application/json']
|
||||
};
|
||||
|
||||
constructor(protected adfHttpClient: AdfHttpClient) {}
|
||||
constructor(protected adfHttpClient: AdfHttpClient) { /* empty */ }
|
||||
|
||||
getBasePath(appName: string): string {
|
||||
return appName ? `${this.contextRoot}/${appName}` : this.contextRoot;
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('NotificationCloudService', () => {
|
||||
let apolloSubscribeSpy: jasmine.Spy;
|
||||
|
||||
const useMock: any = {
|
||||
subscribe: () => {}
|
||||
subscribe: () => { /* empty */ }
|
||||
};
|
||||
|
||||
const queryMock = `
|
||||
|
||||
@@ -48,7 +48,7 @@ export class VariableMapperService {
|
||||
|
||||
return variableAccumulator;
|
||||
},
|
||||
{}
|
||||
{ /* empty */ }
|
||||
);
|
||||
|
||||
return {
|
||||
@@ -70,7 +70,7 @@ export class VariableMapperService {
|
||||
columnsByVariable[key] = column.id;
|
||||
});
|
||||
return columnsByVariable;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
|
||||
return columnsByVariables;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export class TaskCloudServiceMock implements TaskCloudServiceInterface {
|
||||
currentUserMock = 'AssignedTaskUser';
|
||||
dataChangesDetected$ = new Subject();
|
||||
|
||||
constructor(private appConfigService: AppConfigService) {}
|
||||
constructor(private appConfigService: AppConfigService) { /* empty */ }
|
||||
|
||||
getTaskById(_appName: string, taskId: string): Observable<TaskDetailsCloudModel> {
|
||||
return of(taskDetailsContainer[taskId]);
|
||||
|
||||
@@ -79,7 +79,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = '68d54a8f';
|
||||
|
||||
service.completeTask(appName, taskId).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(err) => {
|
||||
expect(err).toBeDefined();
|
||||
done();
|
||||
@@ -147,7 +147,7 @@ describe('Task Cloud Service', () => {
|
||||
const assignee = 'user12';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.claimTask(appName, taskId, assignee).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -161,7 +161,7 @@ describe('Task Cloud Service', () => {
|
||||
const assignee = 'user12';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.claimTask(appName, taskId, assignee).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -187,7 +187,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = '68d54a8f';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.unclaimTask(appName, taskId).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -200,7 +200,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = null;
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.unclaimTask(appName, taskId).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -226,7 +226,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = '68d54a8f';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.getTaskById(appName, taskId).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -239,7 +239,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = null;
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.getTaskById(appName, taskId).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -253,7 +253,7 @@ describe('Task Cloud Service', () => {
|
||||
const updatePayload = { description: 'New description' };
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.updateTask(appName, taskId, updatePayload).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -267,7 +267,7 @@ describe('Task Cloud Service', () => {
|
||||
const updatePayload = { description: 'New description' };
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.updateTask(appName, taskId, updatePayload).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -295,7 +295,7 @@ describe('Task Cloud Service', () => {
|
||||
const updatePayload = { description: 'New description' };
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.updateTask(appName, taskId, updatePayload).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -309,7 +309,7 @@ describe('Task Cloud Service', () => {
|
||||
const updatePayload = { description: 'New description' };
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.updateTask(appName, taskId, updatePayload).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -400,7 +400,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = '68d54a8f';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.assign(appName, taskId, 'mock-assignee').subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
@@ -413,7 +413,7 @@ describe('Task Cloud Service', () => {
|
||||
const taskId = '';
|
||||
requestSpy.and.callFake(returnFakeTaskDetailsResults);
|
||||
service.assign(appName, taskId, 'mock-assignee').subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('AppName/TaskId not configured');
|
||||
done();
|
||||
|
||||
+1
-1
@@ -199,7 +199,7 @@ describe('StartTaskCloudComponent', () => {
|
||||
it('should emit error when there is an error while creating task', () => {
|
||||
component.taskForm.controls['name'].setValue('fakeName');
|
||||
const errorSpy = spyOn(component.error, 'emit');
|
||||
createNewTaskSpy.and.returnValue(throwError({}));
|
||||
createNewTaskSpy.and.returnValue(throwError({ /* empty */ }));
|
||||
component.appName = 'fakeAppName';
|
||||
fixture.detectChanges();
|
||||
const assigneeInput = element.querySelector<HTMLElement>('input.adf-cloud-input');
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy {
|
||||
private userPreferencesService: UserPreferencesService,
|
||||
private formBuilder: UntypedFormBuilder,
|
||||
private identityUserService: IdentityUserService
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
ngOnInit() {
|
||||
this.userPreferencesService
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ export abstract class BaseTaskFiltersCloudComponent implements OnDestroy {
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
counters$: {[key: string]: Observable<number>} = {};
|
||||
counters$: {[key: string]: Observable<number>} = { /* empty */ };
|
||||
updatedCounters: string[] = [];
|
||||
|
||||
protected onDestroy$ = new Subject<boolean>();
|
||||
|
||||
+4
-4
@@ -447,14 +447,14 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
||||
return { [property.key]: property.value };
|
||||
}
|
||||
});
|
||||
return properties.reduce((result, current) => Object.assign(result, current), {});
|
||||
return properties.reduce((result, current) => Object.assign(result, current), { /* empty */ });
|
||||
}
|
||||
|
||||
private getAttributesControlConfig(property: TaskFilterProperties) {
|
||||
return Object.values(property.attributes).reduce((result, key) => {
|
||||
result[key] = property.value[key];
|
||||
return result;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
}
|
||||
|
||||
buildForm(taskFilterProperties: TaskFilterProperties[]) {
|
||||
@@ -494,7 +494,7 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
||||
switchMap(() => this.restoreDefaultTaskFilters()),
|
||||
takeUntil(this.onDestroy$)
|
||||
)
|
||||
.subscribe(() => {});
|
||||
.subscribe(() => { /* empty */ });
|
||||
}
|
||||
|
||||
save(saveAction: TaskFilterAction): void {
|
||||
@@ -525,7 +525,7 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
||||
id: filterId,
|
||||
key: 'custom-' + filterKey
|
||||
};
|
||||
const resultFilter: T = Object.assign({}, this.changedTaskFilter, newFilter);
|
||||
const resultFilter: T = Object.assign({ /* empty */ }, this.changedTaskFilter, newFilter);
|
||||
this.addFilter(resultFilter).subscribe(() => {
|
||||
saveAsAction.filter = resultFilter;
|
||||
this.action.emit(saveAsAction);
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ export class EditTaskFilterCloudComponent extends BaseEditTaskFilterCloudCompone
|
||||
|
||||
assignNewFilter(model: TaskFilterCloudModel) {
|
||||
this.setLastModifiedToFilter(model);
|
||||
this.changedTaskFilter = new TaskFilterCloudModel(Object.assign({}, this.taskFilter, model));
|
||||
this.changedTaskFilter = new TaskFilterCloudModel(Object.assign({ /* empty */ }, this.taskFilter, model));
|
||||
this.formHasBeenChanged = !this.deepCompare(this.changedTaskFilter, this.taskFilter);
|
||||
this.filterChange.emit(this.changedTaskFilter);
|
||||
}
|
||||
|
||||
+2
-2
@@ -70,7 +70,7 @@ describe('TaskAssignmentFilterComponent', () => {
|
||||
component.taskFilterProperty = {
|
||||
key: 'assignment',
|
||||
label: 'mock-filter',
|
||||
value: {},
|
||||
value: { /* empty */ },
|
||||
type: 'assignment',
|
||||
attributes: { assignedUsers: 'assignedUsers', candidateGroups: 'candidateGroups' }
|
||||
};
|
||||
@@ -196,7 +196,7 @@ describe('TaskAssignmentFilterComponent', () => {
|
||||
component.taskFilterProperty = {
|
||||
key: 'assignment',
|
||||
label: 'mock-filter',
|
||||
value: {},
|
||||
value: { /* empty */ },
|
||||
type: 'assignment',
|
||||
attributes: { assignedUsers: 'assignedUsers', candidateGroups: 'candidateGroups' }
|
||||
};
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ export class TaskAssignmentFilterCloudComponent implements OnInit, OnChanges {
|
||||
groupForm = new FormControl('');
|
||||
assignmentTypeOptions: DropdownOption[];
|
||||
|
||||
constructor(private identityUserService: IdentityUserService) {}
|
||||
constructor(private identityUserService: IdentityUserService) { /* empty */ }
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
if (changes?.status?.currentValue !== changes?.status?.previousValue) {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ export class ServiceTaskFilterCloudService {
|
||||
private identityUserService: IdentityUserService,
|
||||
@Inject(TASK_FILTERS_SERVICE_TOKEN)
|
||||
public preferenceService: PreferenceCloudServiceInterface
|
||||
) {}
|
||||
) { /* empty */ }
|
||||
|
||||
/**
|
||||
* Creates and returns the default task filters for an app.
|
||||
|
||||
@@ -57,4 +57,4 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
],
|
||||
exports: [TaskFiltersCloudComponent, ServiceTaskFiltersCloudComponent, EditTaskFilterCloudComponent, EditServiceTaskFilterCloudComponent]
|
||||
})
|
||||
export class TaskFiltersCloudModule {}
|
||||
export class TaskFiltersCloudModule { /* empty */ }
|
||||
|
||||
+11
-11
@@ -106,7 +106,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should not show complete button when status is ASSIGNED but assigned to a different person', () => {
|
||||
getCurrentUserSpy.and.returnValue({});
|
||||
getCurrentUserSpy.and.returnValue({ /* empty */ });
|
||||
fixture.detectChanges();
|
||||
|
||||
const completeBtn = debugElement.query(By.css('[adf-cloud-complete-task]'));
|
||||
@@ -162,7 +162,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should not show unclaim button when status is ASSIGNED but assigned to different person', () => {
|
||||
getCurrentUserSpy.and.returnValue({});
|
||||
getCurrentUserSpy.and.returnValue({ /* empty */ });
|
||||
fixture.detectChanges();
|
||||
|
||||
const unclaimBtn = debugElement.query(By.css('[adf-cloud-unclaim-task]'));
|
||||
@@ -312,7 +312,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const cancelBtn = debugElement.query(By.css('#adf-cloud-cancel-task'));
|
||||
cancelBtn.triggerEventHandler('click', {});
|
||||
cancelBtn.triggerEventHandler('click', { /* empty */ });
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
@@ -320,14 +320,14 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should emit taskCompleted when task is completed', async () => {
|
||||
spyOn(taskCloudService, 'completeTask').and.returnValue(of({}));
|
||||
spyOn(taskCloudService, 'completeTask').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(component.taskCompleted, 'emit').and.stub();
|
||||
|
||||
component.ngOnChanges({ appName: new SimpleChange(null, 'app1', false) });
|
||||
fixture.detectChanges();
|
||||
|
||||
const completeBtn = debugElement.query(By.css('[adf-cloud-complete-task]'));
|
||||
completeBtn.triggerEventHandler('click', {});
|
||||
completeBtn.triggerEventHandler('click', { /* empty */ });
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
@@ -335,7 +335,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should emit taskClaimed when task is claimed', async () => {
|
||||
spyOn(taskCloudService, 'claimTask').and.returnValue(of({}));
|
||||
spyOn(taskCloudService, 'claimTask').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(component, 'hasCandidateUsers').and.returnValue(true);
|
||||
spyOn(component.taskClaimed, 'emit').and.stub();
|
||||
taskDetails.status = TASK_CREATED_STATE;
|
||||
@@ -345,7 +345,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
component.ngOnChanges({ appName: new SimpleChange(null, 'app1', false) });
|
||||
fixture.detectChanges();
|
||||
const claimBtn = debugElement.query(By.css('[adf-cloud-claim-task]'));
|
||||
claimBtn.triggerEventHandler('click', {});
|
||||
claimBtn.triggerEventHandler('click', { /* empty */ });
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
@@ -355,7 +355,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
it('should emit error when error occurs', async () => {
|
||||
spyOn(component.error, 'emit').and.stub();
|
||||
|
||||
component.onError({});
|
||||
component.onError({ /* empty */ });
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
|
||||
@@ -363,7 +363,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should reload when task is completed', async () => {
|
||||
spyOn(taskCloudService, 'completeTask').and.returnValue(of({}));
|
||||
spyOn(taskCloudService, 'completeTask').and.returnValue(of({ /* empty */ }));
|
||||
const reloadSpy = spyOn(component, 'ngOnChanges').and.callThrough();
|
||||
|
||||
component.ngOnChanges({ appName: new SimpleChange(null, 'app1', false) });
|
||||
@@ -376,7 +376,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should reload when task is claimed', async () => {
|
||||
spyOn(taskCloudService, 'claimTask').and.returnValue(of({}));
|
||||
spyOn(taskCloudService, 'claimTask').and.returnValue(of({ /* empty */ }));
|
||||
spyOn(component, 'hasCandidateUsers').and.returnValue(true);
|
||||
const reloadSpy = spyOn(component, 'ngOnChanges').and.callThrough();
|
||||
taskDetails.permissions = [TASK_CLAIM_PERMISSION];
|
||||
@@ -393,7 +393,7 @@ describe('TaskFormCloudComponent', () => {
|
||||
});
|
||||
|
||||
it('should emit taskUnclaimed when task is unclaimed', async () => {
|
||||
spyOn(taskCloudService, 'unclaimTask').and.returnValue(of({}));
|
||||
spyOn(taskCloudService, 'unclaimTask').and.returnValue(of({ /* empty */ }));
|
||||
const reloadSpy = spyOn(component, 'ngOnChanges').and.callThrough();
|
||||
spyOn(component, 'hasCandidateUsers').and.returnValue(true);
|
||||
|
||||
|
||||
+3
-3
@@ -160,19 +160,19 @@ const template: StoryFn<TaskFormCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const DefaultTaskFormCloud = template.bind({});
|
||||
export const DefaultTaskFormCloud = template.bind({ /* empty */ });
|
||||
DefaultTaskFormCloud.args = {
|
||||
appName: 'app',
|
||||
taskId: 'mock-task-with-form'
|
||||
};
|
||||
|
||||
export const InvalidOrMissingApp = template.bind({});
|
||||
export const InvalidOrMissingApp = template.bind({ /* empty */ });
|
||||
InvalidOrMissingApp.args = {
|
||||
...DefaultTaskFormCloud.args,
|
||||
appName: undefined
|
||||
};
|
||||
|
||||
export const InvalidOrMissingTaskId = template.bind({});
|
||||
export const InvalidOrMissingTaskId = template.bind({ /* empty */ });
|
||||
InvalidOrMissingTaskId.args = {
|
||||
...DefaultTaskFormCloud.args,
|
||||
taskId: undefined
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ describe('TaskHeaderCloudComponent', () => {
|
||||
|
||||
const mock: any = {
|
||||
oauth2Auth: {
|
||||
callCustomApi: () => Promise.resolve({})
|
||||
callCustomApi: () => Promise.resolve({ /* empty */ })
|
||||
},
|
||||
isEcmLoggedIn: () => false,
|
||||
reply: jasmine.createSpy('reply')
|
||||
|
||||
+9
-9
@@ -83,55 +83,55 @@ const template: StoryFn<TaskHeaderCloudComponent> = (args) => ({
|
||||
props: args
|
||||
});
|
||||
|
||||
export const AssignedAndEditable = template.bind({});
|
||||
export const AssignedAndEditable = template.bind({ /* empty */ });
|
||||
AssignedAndEditable.args = {
|
||||
appName: 'app',
|
||||
taskId: 'mock-assigned-task'
|
||||
};
|
||||
|
||||
export const CompletedAndReadonly = template.bind({});
|
||||
export const CompletedAndReadonly = template.bind({ /* empty */ });
|
||||
CompletedAndReadonly.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-completed-task'
|
||||
};
|
||||
|
||||
export const Suspended = template.bind({});
|
||||
export const Suspended = template.bind({ /* empty */ });
|
||||
Suspended.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-suspended-task'
|
||||
};
|
||||
|
||||
export const WithParentId = template.bind({});
|
||||
export const WithParentId = template.bind({ /* empty */ });
|
||||
WithParentId.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-parent-task-id'
|
||||
};
|
||||
|
||||
export const WithoutAssignee = template.bind({});
|
||||
export const WithoutAssignee = template.bind({ /* empty */ });
|
||||
WithoutAssignee.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-created-task'
|
||||
};
|
||||
|
||||
export const NotClaimableByUser = template.bind({});
|
||||
export const NotClaimableByUser = template.bind({ /* empty */ });
|
||||
NotClaimableByUser.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-no-candidate-users'
|
||||
};
|
||||
|
||||
export const TaskNotClaimableByGroupUser = template.bind({});
|
||||
export const TaskNotClaimableByGroupUser = template.bind({ /* empty */ });
|
||||
TaskNotClaimableByGroupUser.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: 'mock-no-candidate-groups'
|
||||
};
|
||||
|
||||
export const InvalidForMissingApp = template.bind({});
|
||||
export const InvalidForMissingApp = template.bind({ /* empty */ });
|
||||
InvalidForMissingApp.args = {
|
||||
...AssignedAndEditable.args,
|
||||
appName: undefined
|
||||
};
|
||||
|
||||
export const InvalidForMissingTaskId = template.bind({});
|
||||
export const InvalidForMissingTaskId = template.bind({ /* empty */ });
|
||||
InvalidForMissingTaskId.args = {
|
||||
...AssignedAndEditable.args,
|
||||
taskId: undefined
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
@Output()
|
||||
error: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
taskDetails: TaskDetailsCloudModel = {};
|
||||
taskDetails: TaskDetailsCloudModel = { /* empty */ };
|
||||
candidateUsers: CardViewArrayItem[] = [];
|
||||
candidateGroups: CardViewArrayItem[] = [];
|
||||
properties: CardViewItem[];
|
||||
@@ -105,7 +105,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
this.taskDetails = {};
|
||||
this.taskDetails = { /* empty */ };
|
||||
if ((this.appName || this.appName === '') && this.taskId) {
|
||||
this.loadTaskDetailsById(this.appName, this.taskId);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -320,7 +320,7 @@ export abstract class BaseTaskListCloudComponent<T = unknown>
|
||||
}
|
||||
|
||||
return visibleColumnsMap;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
|
||||
this.createColumns();
|
||||
this.createDatatableSchema();
|
||||
@@ -336,7 +336,7 @@ export abstract class BaseTaskListCloudComponent<T = unknown>
|
||||
widthsColumnsMap[column.id] = Math.ceil(column.width);
|
||||
}
|
||||
return widthsColumnsMap;
|
||||
}, {});
|
||||
}, { /* empty */ });
|
||||
|
||||
this.columnsWidths = { ...this.columnsWidths, ...newColumnsWidths };
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ class CustomTaskListComponent {
|
||||
</adf-cloud-service-task-list>
|
||||
`
|
||||
})
|
||||
class EmptyTemplateComponent {}
|
||||
class EmptyTemplateComponent { /* empty */ }
|
||||
@Component({
|
||||
template: ` <adf-cloud-service-task-list>
|
||||
<data-columns>
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ const PRESET_KEY = 'adf-cloud-service-task-list.presets';
|
||||
})
|
||||
export class ServiceTaskListCloudComponent extends BaseTaskListCloudComponent implements OnDestroy {
|
||||
@Input()
|
||||
queryParams: { [key: string]: any } = {};
|
||||
queryParams: { [key: string]: any } = { /* empty */ };
|
||||
|
||||
private onDestroyServiceTaskList$ = new Subject<boolean>();
|
||||
|
||||
|
||||
+5
-5
@@ -75,7 +75,7 @@ class CustomTaskListComponent {
|
||||
</adf-cloud-task-list>
|
||||
`
|
||||
})
|
||||
class EmptyTemplateComponent {}
|
||||
class EmptyTemplateComponent { /* empty */ }
|
||||
@Component({
|
||||
template: ` <adf-cloud-task-list>
|
||||
<data-columns>
|
||||
@@ -96,8 +96,8 @@ describe('TaskListCloudComponent', () => {
|
||||
let appConfig: AppConfigService;
|
||||
let taskListCloudService: TaskListCloudServiceInterface;
|
||||
const preferencesService: PreferenceCloudServiceInterface = jasmine.createSpyObj('preferencesService', {
|
||||
getPreferences: of({}),
|
||||
updatePreference: of({})
|
||||
getPreferences: of({ /* empty */ }),
|
||||
updatePreference: of({ /* empty */ })
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -208,7 +208,7 @@ describe('TaskListCloudComponent', () => {
|
||||
fixture.detectChanges();
|
||||
|
||||
const mainMenuButton = fixture.debugElement.query(By.css('[data-automation-id="adf-datatable-main-menu-button"]'));
|
||||
mainMenuButton.triggerEventHandler('click', {});
|
||||
mainMenuButton.triggerEventHandler('click', { /* empty */ });
|
||||
fixture.detectChanges();
|
||||
|
||||
const columnSelectorMenu = fixture.debugElement.query(By.css('adf-datatable-column-selector'));
|
||||
@@ -667,7 +667,7 @@ describe('TaskListCloudComponent: Copy cell content directive from app.config sp
|
||||
expect(
|
||||
component.replacePriorityValues(
|
||||
{
|
||||
obj: {},
|
||||
obj: { /* empty */ },
|
||||
isSelected: false,
|
||||
hasValue: () => false,
|
||||
getValue: () => undefined
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ describe('TasksListDatatableAdapter', () => {
|
||||
};
|
||||
|
||||
const row: DataRow = {
|
||||
getValue: () => {},
|
||||
getValue: () => { /* empty */ },
|
||||
hasValue: () => true,
|
||||
isSelected: false,
|
||||
obj: viewModel
|
||||
|
||||
+2
-2
@@ -88,7 +88,7 @@ describe('Activiti ServiceTaskList Cloud Service', () => {
|
||||
const taskRequest = { appName: null } as ServiceTaskQueryCloudRequestModel;
|
||||
requestSpy.and.callFake(returnCallUrl);
|
||||
service.getServiceTaskByRequest(taskRequest).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('Appname not configured');
|
||||
done();
|
||||
@@ -110,7 +110,7 @@ describe('Activiti ServiceTaskList Cloud Service', () => {
|
||||
}
|
||||
};
|
||||
|
||||
const spyOnPost = spyOn<any>(service, 'post').and.returnValue(of({}));
|
||||
const spyOnPost = spyOn<any>(service, 'post').and.returnValue(of({ /* empty */ }));
|
||||
const params = ['fakeName', 'executionId_1', 'flowNodeId_1'] as const;
|
||||
await service.replayServiceTaskRequest(...params).toPromise();
|
||||
expect(spyOnPost).toHaveBeenCalledWith(expected.expectedQueryUrl, expected.expectedPayload);
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ export class ServiceTaskListCloudService extends BaseCloudService {
|
||||
}
|
||||
|
||||
protected buildQueryParams(requestNode: ServiceTaskQueryCloudRequestModel): any {
|
||||
const queryParam: any = {};
|
||||
const queryParam: any = { /* empty */ };
|
||||
for (const property in requestNode) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(requestNode, property) &&
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ describe('TaskListCloudService', () => {
|
||||
const taskRequest = { appName: null } as TaskQueryCloudRequestModel;
|
||||
requestSpy.and.callFake(returnCallUrl);
|
||||
service.getTaskByRequest(taskRequest).subscribe(
|
||||
() => {},
|
||||
() => { /* empty */ },
|
||||
(error) => {
|
||||
expect(error).toBe('Appname not configured');
|
||||
done();
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ export class TaskListCloudService extends BaseCloudService implements TaskListCl
|
||||
}
|
||||
|
||||
protected buildQueryParams(requestNode: TaskQueryCloudRequestModel): any {
|
||||
const queryParam: any = {};
|
||||
const queryParam: any = { /* empty */ };
|
||||
for (const propertyKey in requestNode) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(requestNode, propertyKey) &&
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ import {
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
]
|
||||
})
|
||||
export class TaskListTestingModule {}
|
||||
export class TaskListTestingModule { /* empty */ }
|
||||
|
||||
@@ -53,4 +53,4 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
ProcessServicesCloudModule
|
||||
]
|
||||
})
|
||||
export class ProcessServiceCloudTestingModule {}
|
||||
export class ProcessServiceCloudTestingModule { /* empty */ }
|
||||
|
||||
Reference in New Issue
Block a user