[MIGRATION] - Fixed lint errors for empty function

This commit is contained in:
VitoAlbano 2024-08-05 23:06:04 +01:00
parent cf175c67b8
commit 1c339a926b
867 changed files with 2147 additions and 2153 deletions

View File

@ -83,7 +83,7 @@ export class ContentUserInfoComponent implements OnDestroy {
private destroy$ = new Subject();
constructor(private peopleContentService: PeopleContentService) {}
constructor(private peopleContentService: PeopleContentService) { /* empty */ }
ngOnDestroy(): void {
this.destroy$.next(true);

View File

@ -86,7 +86,7 @@ export class ProcessUserInfoComponent implements OnDestroy {
private destroy$ = new Subject();
constructor(private peopleProcessService: PeopleProcessService, private peopleContentService: PeopleContentService) {}
constructor(private peopleProcessService: PeopleProcessService, private peopleContentService: PeopleContentService) { /* empty */ }
ngOnDestroy(): void {
this.destroy$.next(true);

View File

@ -60,7 +60,7 @@ export class UserInfoComponent implements OnInit {
private identityUserService: IdentityUserService,
private basicAlfrescoAuthService: BasicAlfrescoAuthService,
private authService: AuthenticationService
) {}
) { /* empty */ }
ngOnInit() {
this.getUserInfo();

View File

@ -49,7 +49,7 @@ export class CloudFiltersDemoComponent implements OnInit {
private router: Router,
private route: ActivatedRoute,
private cloudProcessFiltersService: CloudProcessFiltersService
) {}
) { /* empty */ }
ngOnInit() {
this.currentTaskFilter$ = this.cloudLayoutService.taskFilter$;

View File

@ -59,7 +59,7 @@ export class CloudLayoutComponent implements OnInit {
appName: string;
filterName: string;
constructor(private router: Router, private route: ActivatedRoute, private cloudLayoutService: CloudLayoutService) {}
constructor(private router: Router, private route: ActivatedRoute, private cloudLayoutService: CloudLayoutService) { /* empty */ }
ngOnInit() {
let root: string = '';

View File

@ -75,7 +75,7 @@ export class TaskDetailsCloudDemoComponent {
try {
errorMessage = JSON.parse(error).message || JSON.parse(error).entry?.message;
errorMessage = JSON.parse(errorMessage).message;
} catch {}
} catch { /* empty */ }
this.notificationService.showError(errorMessage || error);
}
}

View File

@ -137,7 +137,7 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
}
onFilterChange(filter: any) {
this.editedFilter = Object.assign({}, filter);
this.editedFilter = Object.assign({ /* empty */ }, filter);
this.sortArray = [new TaskListCloudSortingModel({ orderBy: this.editedFilter.sort, direction: this.editedFilter.order })];
}

View File

@ -82,7 +82,7 @@ export class FileViewComponent implements OnInit {
private contentServices: ContentService,
private preview: PreviewService,
private notificationService: NotificationService
) {}
) { /* empty */ }
ngOnInit() {
this.route.params.subscribe((params) => {

View File

@ -271,7 +271,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
private contentMetadataService: ContentMetadataService,
private dialogAspectListService: DialogAspectListService,
private nodeService: NodesApiService
) {}
) { /* empty */ }
showFile(event) {
const entry = event.value.entry;
@ -545,7 +545,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
}
navigateToFilter(activeFilters: FilterSearch[]) {
const objectFromMap = {};
const objectFromMap = { /* empty */ };
activeFilters.forEach((filter: FilterSearch) => {
let paramValue = null;
if (filter.value?.from && filter.value.to) {

View File

@ -24,4 +24,4 @@ import { Component, ViewEncapsulation } from '@angular/core';
styleUrls: ['./home.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HomeComponent {}
export class HomeComponent { /* empty */ }

View File

@ -25,4 +25,4 @@ import { MatButtonModule } from '@angular/material/button';
templateUrl: './logout.component.html',
styleUrls: ['./logout.component.scss']
})
export class LogoutComponent {}
export class LogoutComponent { /* empty */ }

View File

@ -74,7 +74,7 @@ export class ProcessListDemoComponent implements OnInit, OnDestroy {
private onDestroy$ = new Subject<boolean>();
constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) {}
constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) { /* empty */ }
ngOnInit() {
this.resetQueryParameters();

View File

@ -27,7 +27,7 @@ import { AppsListComponent } from '@alfresco/adf-process-services';
templateUrl: './apps-view.component.html'
})
export class AppsViewComponent {
constructor(private router: Router) {}
constructor(private router: Router) { /* empty */ }
onAppClicked(app: AppDefinitionRepresentation) {
this.router.navigate(['/activiti/apps', app.id || 0, 'tasks']);

View File

@ -250,7 +250,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
}
applyTaskFilter(filter: UserTaskFilterRepresentation) {
this.taskFilter = Object.assign({}, filter);
this.taskFilter = Object.assign({ /* empty */ }, filter);
if (filter && this.taskList) {
this.taskList.hasCustomDataSource = false;

View File

@ -30,7 +30,7 @@ import { SearchControlComponent } from '@alfresco/adf-content-services';
styleUrls: ['./search-bar.component.scss']
})
export class SearchBarComponent {
constructor(public router: Router, private preview: PreviewService) {}
constructor(public router: Router, private preview: PreviewService) { /* empty */ }
/**
* Called when the user submits the search, e.g. hits enter or clicks submit

View File

@ -184,7 +184,7 @@ export class AppSearchFilterChipsComponent implements OnInit, OnDestroy {
}
private updateSetting(field) {
field.settings = field.settings ?? {};
field.settings = field.settings ?? { /* empty */ };
field.settings.allowUpdateOnChange = false;
field.settings.hideDefaultAction = true;
}

View File

@ -83,7 +83,7 @@ export class HostSettingsComponent implements OnInit {
private alfrescoApiService: AlfrescoApiService,
private appConfig: AppConfigService,
private authenticationService: AuthenticationService
) {}
) { /* empty */ }
ngOnInit() {
if (this.providers.length === 1) {

View File

@ -27,7 +27,7 @@ import { HostSettingsComponent } from './host-settings.component';
templateUrl: './settings.component.html'
})
export class SettingsComponent {
constructor(private router: Router) {}
constructor(private router: Router) { /* empty */ }
onCancel() {
this.router.navigate(['/login']);

View File

@ -94,7 +94,7 @@ describe('FolderCreateDirective', () => {
});
it('should emit success event with node if the folder creation was successful', async () => {
const testNode = {};
const testNode = { /* empty */ };
element.triggerEventHandler('click', event);
dialogRefMock.componentInstance.success.next(testNode);

View File

@ -56,7 +56,7 @@ export class FolderCreateDirective {
this.openDialog();
}
constructor(public dialogRef: MatDialog, public content: ContentService) {}
constructor(public dialogRef: MatDialog, public content: ContentService) { /* empty */ }
private get dialogConfig() {
const { parentNodeId, title: createTitle, nodeType } = this;

View File

@ -66,7 +66,7 @@ export class InMemoryFormService extends FormService {
};
delete flattenForm.formDefinition;
const formValues: FormValues = {};
const formValues: FormValues = { /* empty */ };
(data || []).forEach((variable) => {
formValues[variable.name] = variable.value;
});

View File

@ -24,7 +24,7 @@ export class PreviewService {
public content: Blob = null;
public name: string = null;
constructor(private router: Router) {}
constructor(private router: Router) { /* empty */ }
showResource(resourceId, versionId?): void {
if (versionId) {

View File

@ -31,10 +31,10 @@ export class CoreAutomationService {
private userPreferencesService: UserPreferencesService,
private storageService: StorageService,
private auth: AuthenticationService
) {}
) { /* empty */ }
setup() {
const adfProxy = window['adf'] || {};
const adfProxy = window['adf'] || { /* empty */ };
adfProxy.getConfigField = (field: string): any => this.appConfigService.get(field);

View File

@ -339,8 +339,8 @@ export class DemoForm {
javascriptEvents: [],
className: '',
style: '',
customFieldTemplates: {},
metadata: {},
customFieldTemplates: { /* empty */ },
metadata: { /* empty */ },
variables: [
{
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
@ -360,7 +360,7 @@ export class DemoForm {
type: 'integer'
}
],
customFieldsValueInfo: {},
customFieldsValueInfo: { /* empty */ },
gridsterForm: false,
globalDateFormat: 'D-M-YYYY'
}
@ -1459,8 +1459,8 @@ export class DemoForm {
javascriptEvents: [],
className: '',
style: '',
customFieldTemplates: {},
metadata: {},
customFieldTemplates: { /* empty */ },
metadata: { /* empty */ },
variables: [
{
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
@ -1743,8 +1743,8 @@ export class DemoForm {
javascriptEvents: [],
className: '',
style: '',
customFieldTemplates: {},
metadata: {},
customFieldTemplates: { /* empty */ },
metadata: { /* empty */ },
variables: [
{
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
@ -1764,7 +1764,7 @@ export class DemoForm {
type: 'integer'
}
],
customFieldsValueInfo: {},
customFieldsValueInfo: { /* empty */ },
gridsterForm: false
}
}
@ -1825,7 +1825,7 @@ export class DemoForm {
link: false,
displayableCMProperties: []
},
visibilityCondition: {}
visibilityCondition: { /* empty */ }
}
]
}

View File

@ -96,7 +96,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
await apiService.loginWithProfile('admin');
await uploadActions.deleteFileOrFolder(folder.entry.id);
await identityService.deleteIdentityUser(acsUser.email);
} catch (error) {}
} catch (error) { /* empty */ }
await apiService.getInstance().logout();
await browser.executeScript('window.sessionStorage.clear();');
await browser.executeScript('window.localStorage.clear();');

View File

@ -63,7 +63,7 @@ describe('Upload component', async () => {
for (const node of nodeList) {
try {
await uploadActions.deleteFileOrFolder(node);
} catch (error) {}
} catch (error) { /* empty */ }
}
};

View File

@ -85,7 +85,7 @@ describe('Upload component', () => {
for (const node of nodeList) {
try {
await uploadActions.deleteFileOrFolder(node);
} catch (error) {}
} catch (error) { /* empty */ }
}
});

View File

@ -37,8 +37,8 @@ export class FileModel {
password = '';
createdByUser = new CreatedByModel();
modifiedByUser = new CreatedByModel();
content: ContentModel = {};
properties: ContentPropertiesModel = {};
content: ContentModel = { /* empty */ };
properties: ContentPropertiesModel = { /* empty */ };
constructor(details?: any) {
Object.assign(this, details);

View File

@ -59,7 +59,7 @@ describe('Form Field Component - Dropdown Widget', () => {
const dropdown = widget.dropdown();
let testUser: { idIdentityService: string; username: string; password: string };
const runningTasks = {};
const runningTasks = { /* empty */ };
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
beforeAll(async () => {

View File

@ -99,7 +99,7 @@ describe('Form Field Component - JSON Widget', () => {
await jsonWidget.clickJsonButton(formWithJson.widgets.displayJsonWidgetId);
await editJsonDialog.checkDialogIsDisplayed();
expect(await editJsonDialog.getDialogContent()).toBe('{}');
expect(await editJsonDialog.getDialogContent()).toBe('{ /* empty */ }');
await editJsonDialog.clickCloseButton();
await editJsonDialog.checkDialogIsNotDisplayed();
});

View File

@ -181,7 +181,7 @@ describe('Task form cloud component', () => {
try {
await apiService.loginWithProfile('identityAdmin');
await identityService.deleteIdentityUser(testUser.idIdentityService);
} catch (error) {}
} catch (error) { /* empty */ }
await browser.executeScript('window.sessionStorage.clear();');
await browser.executeScript('window.localStorage.clear();');
});

View File

@ -80,7 +80,7 @@ describe('Sorting for process filters', () => {
await modelsActions.deleteModel(appId);
await apiService.loginWithProfile('admin');
await usersActions.deleteTenant(tenantId);
} catch (e) {}
} catch (e) { /* empty */ }
await navigationBarPage.clickLogoutButton();
});

View File

@ -65,7 +65,7 @@ describe('Task Assignee', () => {
tenantId: user.tenantId,
type: 1
});
} catch {}
} catch { /* empty */ }
await apiService.login(user.username, user.password);
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
@ -147,7 +147,7 @@ describe('Task Assignee', () => {
lastName: app.candidate.lastName
})
);
} catch (e) {}
} catch (e) { /* empty */ }
await apiService.login(user.username, user.password);
const appModel = await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });

View File

@ -191,7 +191,7 @@ export const checkboxVisibilityFormJson = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
@ -278,7 +278,7 @@ export const multipleCheckboxVisibilityFormJson = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: []
}
}

View File

@ -150,7 +150,7 @@ export const displayValueTextJson = {
}
],
outcomes : [],
metadata : {},
metadata : { /* empty */ },
variables : [
{
id : '928c5dce-0ee4-4de3-8775-975eda5a4543' ,

View File

@ -142,7 +142,7 @@ export const dropdownVisibilityFormFieldJson = {
}
}],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: []
}
}
@ -226,7 +226,7 @@ export const dropdownVisibilityFormVariableJson = {
}
}],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [{
id: '74cdd5d3-120b-4926-995e-89e929a16c8f',
name: 'name',

View File

@ -453,7 +453,7 @@ export const multipleVisibilityFormJson = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: '948aa549-5011-423e-b8a2-020e69daae5f',
@ -585,7 +585,7 @@ export const multipleTextVisibilityFormJson = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: []
}
}

View File

@ -53,7 +53,7 @@ export const peopleSingleModeFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: []
}
}
@ -97,7 +97,7 @@ export const peopleMultipleModeFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -148,7 +148,7 @@ export const peopleRequiredFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -199,7 +199,7 @@ export const groupSingleModeFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -250,7 +250,7 @@ export const groupMultipleModeFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -301,7 +301,7 @@ export const groupRequiredFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -352,7 +352,7 @@ export const peopleReadOnlyFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
@ -403,7 +403,7 @@ export const groupReadOnlyFormMock = {
}
],
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables: [
{
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',

View File

@ -126,7 +126,7 @@ const createTabVisibilityJson = (
tabs,
fields,
outcomes: [],
metadata: {},
metadata: { /* empty */ },
variables
}
}

View File

@ -77,7 +77,7 @@ describe('Search Slider Filter', () => {
try {
await apiService.login(acsUser.username, acsUser.password);
await uploadActions.deleteFileOrFolder(file2Bytes.entry.id);
} catch (error) {}
} catch (error) { /* empty */ }
await navigationBarPage.clickLogoutButton();
});

View File

@ -64,7 +64,7 @@ describe('Search component - Text widget', () => {
{
'cm:description': newFolderModel.description
}
}, {});
}, { /* empty */ });
await browser.sleep(browser.params.testConfig.timeouts.index_search);

View File

@ -85,7 +85,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(err: any, mdText: string) => {
if (err) {
console.error(err);

View File

@ -213,7 +213,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(err: any, text: string) => {
if (err) {
console.error(err);

View File

@ -137,5 +137,5 @@ async function checkDiskSpaceFullEnv() {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@ -80,7 +80,7 @@ function buildImage(args: PublishArgs, tag: string) {
if (args.verbose) {
logger.info(`Dry-run Perform docker build -t=${args.dockerRepo}:${tag} ${buildArgs} -f=${args.fileName} ${args.pathProject}`);
}
const response = exec('docker', ['build', `-t=${args.dockerRepo}:${tag}`, ...buildArgs, `-f=${args.fileName}`, args.pathProject], {});
const response = exec('docker', ['build', `-t=${args.dockerRepo}:${tag}`, ...buildArgs, `-f=${args.fileName}`, args.pathProject], { /* empty */ });
logger.info(response);
}
@ -93,7 +93,7 @@ function buildImage(args: PublishArgs, tag: string) {
*/
function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
logger.info(`Perform docker tag... ${args.dockerRepo}:${imageTag} on ${args.dockerRepo}:${newTag}`);
const response = exec('docker', ['tag', `${args.dockerRepo}:${imageTag}`, `${args.dockerRepo}:${newTag}`], {});
const response = exec('docker', ['tag', `${args.dockerRepo}:${imageTag}`, `${args.dockerRepo}:${newTag}`], { /* empty */ });
logger.info(response);
}
@ -105,7 +105,7 @@ function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
*/
function pullImage(dockerRepo: string, sourceTag: string) {
logger.info(`Perform docker pull... ${dockerRepo}:${sourceTag}`);
const response = exec('docker', ['pull', `${dockerRepo}:${sourceTag}`], {});
const response = exec('docker', ['pull', `${dockerRepo}:${sourceTag}`], { /* empty */ });
logger.info(response);
}
@ -120,7 +120,7 @@ function pushImage(args: PublishArgs, tag: string) {
logger.info(`Dry-run Perform docker push... ${args.dockerRepo}:${tag}`);
} else {
logger.info(`Perform docker push... ${args.dockerRepo}:${tag}`);
const response = exec('docker', ['push', `${args.dockerRepo}:${tag}`], {});
const response = exec('docker', ['push', `${args.dockerRepo}:${tag}`], { /* empty */ });
logger.info(response);
}
}
@ -133,7 +133,7 @@ function pushImage(args: PublishArgs, tag: string) {
*/
function cleanImage(args: PublishArgs, tag: string) {
logger.info(`Perform docker clean on tag:${tag}...`);
const response = exec('docker', ['rmi', `-f`, `${args.dockerRepo}:${tag}`], {});
const response = exec('docker', ['rmi', `-f`, `${args.dockerRepo}:${tag}`], { /* empty */ });
logger.info(response);
}

View File

@ -57,11 +57,11 @@ export const AAE_MICROSERVICES = ['deployment-service', 'modeling-service', 'dmn
async function healthCheck(nameService: string) {
const url = `${args.host}/${nameService}/actuator/health`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -98,11 +98,11 @@ async function healthCheck(nameService: string) {
async function getApplications(): Promise<{ list: { entries: any[] } }> {
const url = `${args.host}/deployment-service/v1/applications`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -139,11 +139,11 @@ async function getApplications(): Promise<{ list: { entries: any[] } }> {
function getDescriptors() {
const url = `${args.host}/deployment-service/v1/descriptors`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -174,11 +174,11 @@ function getDescriptors() {
function getProjects() {
const url = `${args.host}/modeling-service/v1/projects`;
const pathParams = {};
const pathParams = { /* empty */ };
const queryParams = { maxItems: 1000 };
const headerParams = {};
const formParams = {};
const bodyParam = {};
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -210,11 +210,11 @@ function getProjects() {
function getProjectRelease(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -245,11 +245,11 @@ function getProjectRelease(projectId: string) {
async function releaseProject(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -281,11 +281,11 @@ async function releaseProject(projectId: string) {
function deleteProject(projectId: string) {
const url = `${args.host}/modeling-service/v1/projects/${projectId}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -320,11 +320,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
`${args.host}/modeling-service/v1/projects/import`,
'POST',
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ file: fileContent },
{},
{ /* empty */ },
['multipart/form-data'],
['application/json']
);
@ -334,11 +334,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
return await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`,
'POST',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@ -358,11 +358,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
function deleteDescriptor(name: string) {
const url = `${args.host}/deployment-service/v1/descriptors/${name}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -394,10 +394,10 @@ function deleteDescriptor(name: string) {
function deploy(model: any) {
const url = `${args.host}/deployment-service/v1/applications`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const pathParams = { /* empty */ };
const queryParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = model;
const contentTypes = ['application/json'];
const accepts = ['application/json'];

View File

@ -246,5 +246,5 @@ async function checkEnv(opts: InitAcsEnvArgs) {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@ -277,11 +277,11 @@ async function updateLicense(opts: InitApsEnvArgs) {
await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/license`,
'POST',
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ file: fileContent },
{},
{ /* empty */ },
['multipart/form-data'],
['application/json']
);
@ -364,11 +364,11 @@ async function hasLicense(opts: InitApsEnvArgs): Promise<boolean> {
const license = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/license`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@ -394,11 +394,11 @@ async function getDefaultApsUsersFromRealm(opts: InitApsEnvArgs) {
const users: any[] = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/auth/admin/realms/alfresco/users`,
'GET',
{},
{ /* empty */ },
{ max: 1000 },
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@ -424,11 +424,11 @@ async function isContentRepoPresent(opts: InitApsEnvArgs, tenantId: number, cont
const contentRepos = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/app/rest/integration/alfresco?tenantId=${tenantId}`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@ -464,10 +464,10 @@ async function addContentRepoWithBasic(opts: InitApsEnvArgs, tenantId: number, n
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/integration/alfresco`,
'POST',
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
body,
['application/json'],
['application/json']
@ -491,11 +491,11 @@ async function authorizeUserToContentRepo(opts: InitApsEnvArgs, user: any) {
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/app/rest/integration/alfresco`,
'GET',
{},
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
['application/json'],
['application/json']
);
@ -527,10 +527,10 @@ async function authorizeUserToContentWithBasic(opts: InitApsEnvArgs, username: s
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
`${opts.host}/activiti-app/api/enterprise/integration/alfresco/${contentId}/account`,
'POST',
{},
{},
{},
{},
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
{ /* empty */ },
body,
['application/json'],
['application/json']
@ -569,5 +569,5 @@ async function downloadLicenseFile(apsLicensePath: string) {
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}

View File

@ -183,7 +183,7 @@ export default function main(_args: string[], workingDir: string) {
projVersion: packageJson.version,
projName: packageJson.name
},
{},
{ /* empty */ },
(ejsError: any, mdText: string) => {
if (ejsError) {
console.error(ejsError);

View File

@ -25,7 +25,7 @@ export class CheckEnv {
_alfrescoJsApi: AlfrescoApi;
counter = 0;
constructor(private host: string, private username: string, private password: string, private clientId: string = 'alfresco') {}
constructor(private host: string, private username: string, private password: string, private clientId: string = 'alfresco') { /* empty */ }
async checkEnv() {
try {
@ -71,6 +71,6 @@ export class CheckEnv {
sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
while (new Date().getTime() < start + delay) { /* empty */ }
}
}

View File

@ -22,7 +22,7 @@ import { PluginInterface } from './plugin-model';
import { AlfrescoApi, GsSitesApi } from '@alfresco/js-api';
export class GovernanceHealth {
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
async isRecordManagementAvailable(): Promise<boolean> {
try {

View File

@ -20,18 +20,18 @@ import { logger } from '../logger';
import { AlfrescoApi } from '@alfresco/js-api';
export class PluginConfiguration {
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
async getAppConfig(url: string) {
return this.callCustomApi(url);
}
async callCustomApi(url: string) {
const pathParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const queryParams = {};
const pathParams = { /* empty */ };
const headerParams = { /* empty */ };
const formParams = { /* empty */ };
const bodyParam = { /* empty */ };
const queryParams = { /* empty */ };
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@ -51,7 +51,7 @@ export class PluginConfiguration {
return response;
} catch (error) {
logger.error(`${this.plugInInfo.host} is not reachable error: `, error);
return {};
return { /* empty */ };
}
}
}

View File

@ -216,7 +216,7 @@ export const ACTIVITI_CLOUD_APPS: any = {
{ role: 'ACTIVITI_ADMIN', groups: [], users: ['superadminuser', 'processadminuser'] },
{ role: 'ACTIVITI_USER', groups: ['hr', 'sales', 'testgroup'], users: ['hruser'] }
],
infrastructure: { connectors: { restconnector: {} }, bridges: {} },
infrastructure: { connectors: { restconnector: { /* empty */ } }, bridges: { /* empty */ } },
enableLocalDevelopment: true,
variables: {
'process-runtime-service': {

View File

@ -232,8 +232,8 @@ describe('AspectListDialogComponent', () => {
it('should complete the select stream Cancel button is clicked', (done) => {
data.select.subscribe(
() => {},
() => {},
() => { /* empty */ },
() => { /* empty */ },
() => done()
);
const cancelButton: HTMLButtonElement = fixture.nativeElement.querySelector('#aspect-list-dialog-actions-cancel');

View File

@ -62,7 +62,7 @@ export class AspectListComponent implements OnInit, OnDestroy {
private onDestroy$ = new Subject<boolean>();
constructor(private aspectListService: AspectListService, private nodeApiService: NodesApiService) {}
constructor(private aspectListService: AspectListService, private nodeApiService: NodesApiService) { /* empty */ }
ngOnDestroy(): void {
this.onDestroy$.next(true);

View File

@ -26,4 +26,4 @@ export const ASPECT_LIST_DIRECTIVES = [AspectListComponent, AspectListDialogComp
imports: [...ASPECT_LIST_DIRECTIVES],
exports: [...ASPECT_LIST_DIRECTIVES]
})
export class AspectListModule {}
export class AspectListModule { /* empty */ }

View File

@ -31,7 +31,7 @@ export class AspectListService {
return this._aspectsApi;
}
constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService) {}
constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService) { /* empty */ }
getAspects(): Observable<AspectEntry[]> {
const visibleAspectList = this.getVisibleAspects();

View File

@ -34,7 +34,7 @@ export class DialogAspectListService {
private overlayContainer: OverlayContainer,
private tagService: TagService,
private categoryService: CategoryService
) {}
) { /* empty */ }
openAspectListDialog(nodeId?: string, selectorAutoFocusedOnClose?: string): Observable<string[]> {
const select = new Subject<string[]>();

View File

@ -17,7 +17,6 @@
import { ContentAuthLoaderService } from './content-auth-loader.service';
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
/**
* Create a content auth factory
*

View File

@ -176,7 +176,7 @@ describe('Breadcrumb', () => {
});
it('should not parse the route when node has no path', () => {
const node: any = {};
const node: any = { /* empty */ };
expect(component.parseRoute(node)).toEqual([]);
});

View File

@ -26,4 +26,4 @@ export const BREADCRUMB_DIRECTIVES = [BreadcrumbComponent, DropdownBreadcrumbCom
imports: [...BREADCRUMB_DIRECTIVES],
exports: [...BREADCRUMB_DIRECTIVES]
})
export class BreadcrumbModule {}
export class BreadcrumbModule { /* empty */ }

View File

@ -42,8 +42,8 @@ describe('CategoriesManagementComponent', () => {
const category4 = new Category({ id: 'test4', name: 'testCat4' });
const resultCat1 = new ResultNode({ id: 'test', name: 'testCat', path: { name: 'general/categories' } });
const resultCat2 = new ResultNode({ id: 'test2', name: 'testCat2', path: { name: 'general/categories' } });
const categoryPagingResponse: CategoryPaging = { list: { pagination: {}, entries: [{ entry: category1 }, { entry: category2 }] } };
const categorySearchResponse: ResultSetPaging = { list: { pagination: {}, entries: [{ entry: resultCat1 }, { entry: resultCat2 }] } };
const categoryPagingResponse: CategoryPaging = { list: { pagination: { /* empty */ }, entries: [{ entry: category1 }, { entry: category2 }] } };
const categorySearchResponse: ResultSetPaging = { list: { pagination: { /* empty */ }, entries: [{ entry: resultCat1 }, { entry: resultCat2 }] } };
beforeEach(() => {
TestBed.configureTestingModule({
@ -253,7 +253,7 @@ describe('CategoriesManagementComponent', () => {
});
it('should display correct message when there are no existing categories', fakeAsync(() => {
spyOn(categoryService, 'getSubcategories').and.returnValue(of({ list: { pagination: {}, entries: [] } }));
spyOn(categoryService, 'getSubcategories').and.returnValue(of({ list: { pagination: { /* empty */ }, entries: [] } }));
typeCategory('test');
const noExistingCategoriesMsg = fixture.debugElement

View File

@ -147,7 +147,7 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
@ViewChild('categoryNameInput')
private categoryNameInputElement: ElementRef;
constructor(private categoryService: CategoryService) {}
constructor(private categoryService: CategoryService) { /* empty */ }
ngOnInit() {
this.categoryNameControl.valueChanges

View File

@ -23,4 +23,4 @@ import { CategoriesManagementComponent } from './categories-management/categorie
imports: [CategoriesManagementComponent],
exports: [CategoriesManagementComponent]
})
export class CategoriesModule {}
export class CategoriesModule { /* empty */ }

View File

@ -40,7 +40,7 @@ describe('CategoryService', () => {
const fakeParentCategoryId = 'testParentId';
const fakeCategoryId = 'fakeId';
const fakeNodeId = 'fakeNodeId';
const fakeCategoriesResponse: CategoryPaging = { list: { pagination: {}, entries: [] } };
const fakeCategoriesResponse: CategoryPaging = { list: { pagination: { /* empty */ }, entries: [] } };
const fakeCategoryEntry: CategoryEntry = { entry: { id: 'testId', name: 'testName' } };
const fakeCategoryBody: CategoryBody = { name: 'updatedName' };
const fakeCategoriesLinkBodies: CategoryLinkBody[] = [{ categoryId: fakeCategoryId }];
@ -79,14 +79,14 @@ describe('CategoryService', () => {
it('should create subcategory', fakeAsync(() => {
const createSpy = spyOn(categoryService.categoriesApi, 'createSubcategories').and.returnValue(Promise.resolve(fakeCategoryEntry));
categoryService.createSubcategories(fakeParentCategoryId, [fakeCategoryEntry.entry]).subscribe(() => {
expect(createSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, [fakeCategoryEntry.entry], {});
expect(createSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, [fakeCategoryEntry.entry], { /* empty */ });
});
}));
it('should update category', fakeAsync(() => {
const updateSpy = spyOn(categoryService.categoriesApi, 'updateCategory').and.returnValue(Promise.resolve(fakeCategoryEntry));
categoryService.updateCategory(fakeParentCategoryId, fakeCategoryBody).subscribe(() => {
expect(updateSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, fakeCategoryBody, {});
expect(updateSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, fakeCategoryBody, { /* empty */ });
});
}));

View File

@ -48,7 +48,7 @@ export class CategoryService {
private apiService: AlfrescoApiService,
private userPreferencesService: UserPreferencesService,
private appConfigService: AppConfigService
) {}
) { /* empty */ }
/**
* Get subcategories of a given parent category
@ -85,7 +85,7 @@ export class CategoryService {
* @returns Observable<CategoryPaging | CategoryEntry>
*/
createSubcategories(parentCategoryId: string, payload: CategoryBody[]): Observable<CategoryPaging | CategoryEntry> {
return from(this.categoriesApi.createSubcategories(parentCategoryId, payload, {}));
return from(this.categoriesApi.createSubcategories(parentCategoryId, payload, { /* empty */ }));
}
/**
@ -96,7 +96,7 @@ export class CategoryService {
* @returns Observable<CategoryEntry>
*/
updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry> {
return from(this.categoriesApi.updateCategory(categoryId, payload, {}));
return from(this.categoriesApi.updateCategory(categoryId, payload, { /* empty */ }));
}
/**

View File

@ -113,7 +113,7 @@ export class FileModel {
};
this.options = Object.assign(
{},
{ /* empty */ },
{
newVersion: false
},

View File

@ -46,7 +46,7 @@ describe('ContentService', () => {
describe('AllowableOperations', () => {
it('should hasAllowableOperations be false if allowableOperation is not present in the node', () => {
const permissionNode = new Node({});
const permissionNode = new Node({ /* empty */ });
expect(contentService.hasAllowableOperations(permissionNode, 'create')).toBeFalsy();
});
@ -79,7 +79,7 @@ describe('ContentService', () => {
describe('Permissions', () => {
it('should havePermission be false if allowableOperation is not present in the node', () => {
const permissionNode = new Node({});
const permissionNode = new Node({ /* empty */ });
expect(contentService.hasPermissions(permissionNode, 'manager')).toBeFalsy();
});

View File

@ -43,7 +43,7 @@ export class ContentService {
return this._contentApi;
}
constructor(public authService: AuthenticationService, public apiService: AlfrescoApiService, private thumbnailService?: ThumbnailService) {}
constructor(public authService: AuthenticationService, public apiService: AlfrescoApiService, private thumbnailService?: ThumbnailService) { /* empty */ }
/**
* Gets a content URL for the given node.

View File

@ -47,8 +47,8 @@ export class FavoritesApiService {
) {
}
remapFavoritesData(data: FavoritePaging = {}): NodePaging {
const pagination = (data?.list?.pagination || {});
remapFavoritesData(data: FavoritePaging = { /* empty */ }): NodePaging {
const pagination = (data?.list?.pagination || { /* empty */ });
const entries: any[] = this
.remapFavoriteEntries(data?.list?.entries || []);

View File

@ -43,7 +43,7 @@ export class NodesApiService {
return this._nodesApi;
}
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) {}
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) { /* empty */ }
private getEntryFromEntity(entity: NodeEntry): Node {
return entity.entry;
@ -56,7 +56,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns Node information
*/
getNode(nodeId: string, options: any = {}): Observable<Node> {
getNode(nodeId: string, options: any = { /* empty */ }): Observable<Node> {
const defaults = {
include: ['path', 'properties', 'allowableOperations', 'permissions']
};
@ -75,7 +75,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns List of child items from the folder
*/
getNodeChildren(nodeId: string, options: any = {}): Observable<NodePaging> {
getNodeChildren(nodeId: string, options: any = { /* empty */ }): Observable<NodePaging> {
const defaults = {
maxItems: this.preferences.paginationSize,
skipCount: 0,
@ -94,7 +94,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns Details of the new node
*/
createNode(parentNodeId: string, nodeBody: any, options: any = {}): Observable<Node> {
createNode(parentNodeId: string, nodeBody: any, options: any = { /* empty */ }): Observable<Node> {
return from(this.nodesApi.createNode(parentNodeId, nodeBody, options)).pipe(
map(this.getEntryFromEntity),
catchError((err) => throwError(err))
@ -109,7 +109,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns Details of the new folder
*/
createFolder(parentNodeId: string, nodeBody: any, options: any = {}): Observable<Node> {
createFolder(parentNodeId: string, nodeBody: any, options: any = { /* empty */ }): Observable<Node> {
const body = Object.assign({ nodeType: 'cm:folder' }, nodeBody);
return this.createNode(parentNodeId, body, options);
}
@ -122,7 +122,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns Updated node information
*/
updateNode(nodeId: string, nodeBody: any, options: any = {}): Observable<Node> {
updateNode(nodeId: string, nodeBody: any, options: any = { /* empty */ }): Observable<Node> {
const defaults = {
include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition']
};
@ -141,7 +141,7 @@ export class NodesApiService {
* @param options Optional parameters supported by JS-API
* @returns Empty result that notifies when the deletion is complete
*/
deleteNode(nodeId: string, options: any = {}): Observable<any> {
deleteNode(nodeId: string, options: any = { /* empty */ }): Observable<any> {
return from(this.nodesApi.deleteNode(nodeId, options)).pipe(catchError((err) => throwError(err)));
}
@ -221,7 +221,7 @@ export class NodesApiService {
properties,
relativePath: path
};
return from(this.nodesApi.createNode('-root-', body, {}));
return from(this.nodesApi.createNode('-root-', body, { /* empty */ }));
}
/**
@ -250,7 +250,7 @@ export class NodesApiService {
}
private cleanMetadataFromSemicolon(nodeEntry: NodeEntry): NodeMetadata {
const metadata = {};
const metadata = { /* empty */ };
if (nodeEntry?.entry.properties) {
for (const key in nodeEntry.entry.properties) {

View File

@ -135,7 +135,7 @@ describe('PeopleContentService', () => {
it('should be able to throw an error if createPerson api failed', (done) => {
spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.reject(new Error('failed to create new person')));
peopleContentService.createPerson(createNewPersonMock).subscribe(
() => {},
() => { /* empty */ },
(error: Error) => {
expect(error.message).toEqual('failed to create new person');
done();

View File

@ -72,7 +72,7 @@ export class RenditionService {
return this._versionsApi;
}
constructor(private apiService: AlfrescoApiService, private translateService: TranslationService, private viewUtilsService: ViewUtilService) {}
constructor(private apiService: AlfrescoApiService, private translateService: TranslationService, private viewUtilsService: ViewUtilService) { /* empty */ }
getRenditionUrl(nodeId: string, type: string, renditionExists: boolean): string {
return renditionExists && type !== RenditionService.ContentGroup.IMAGE
@ -114,7 +114,7 @@ export class RenditionService {
try {
await this.renditionsApi.createRendition(nodeId, { id: renditionId });
rendition = await this.waitRendition(nodeId, renditionId, 0);
} catch {}
} catch { /* empty */ }
}
}
return new Promise<RenditionEntry>((resolve) => resolve(rendition));
@ -292,6 +292,6 @@ export class RenditionService {
: type;
this.printFile(url, printType);
})
.catch(() => {});
.catch(() => { /* empty */ });
}
}

View File

@ -42,9 +42,9 @@ describe('RenditionService', () => {
TestBed.configureTestingModule({
providers: [
RenditionService,
{ provide: AlfrescoApiService, useValue: {} },
{ provide: TranslationService, useValue: {} },
{ provide: ViewUtilService, useValue: {} },
{ provide: AlfrescoApiService, useValue: { /* empty */ } },
{ provide: TranslationService, useValue: { /* empty */ } },
{ provide: ViewUtilService, useValue: { /* empty */ } },
{
provide: RenditionsApi,
useValue: {

View File

@ -43,7 +43,7 @@ export class SitesService {
return this._sitesApi;
}
constructor(private apiService: AlfrescoApiService) {}
constructor(private apiService: AlfrescoApiService) { /* empty */ }
/**
* Create a site
@ -61,12 +61,12 @@ export class SitesService {
* @param opts Options supported by JS-API
* @returns List of sites
*/
getSites(opts: any = {}): Observable<SitePaging> {
getSites(opts: any = { /* empty */ }): Observable<SitePaging> {
const defaultOptions = {
skipCount: 0,
include: ['properties']
};
const queryOptions = Object.assign({}, defaultOptions, opts);
const queryOptions = Object.assign({ /* empty */ }, defaultOptions, opts);
return from(this.sitesApi.listSites(queryOptions));
}
@ -89,7 +89,7 @@ export class SitesService {
* @returns Null response notifying when the operation is complete
*/
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
const options: any = {};
const options: any = { /* empty */ };
options.permanent = permanentFlag;
return from(this.sitesApi.deleteSite(siteId, options));
}

View File

@ -377,7 +377,7 @@ describe('UploadService', () => {
});
it('should not use "versioningEnabled" if not explicitly provided', () => {
const model = new FileModel({ name: 'file-name', size: 10 } as File, {});
const model = new FileModel({ name: 'file-name', size: 10 } as File, { /* empty */ });
service.addToQueue(model);
service.uploadFilesInTheQueue();
@ -483,7 +483,7 @@ describe('UploadService', () => {
});
it('should skip files if they are in an excluded folder when path is in options', () => {
const file1: any = { name: 'readmetoo.md', file: {}, options: { path: '/rollingPanda/' } };
const file1: any = { name: 'readmetoo.md', file: { /* empty */ }, options: { path: '/rollingPanda/' } };
const file2: any = { name: 'readme.md', file: { webkitRelativePath: '/test/' } };
const result = service.addToQueue(file1, file2);
expect(result.length).toBe(1);

View File

@ -44,7 +44,7 @@ export class UploadService {
fileUploadDeleted: Subject<FileUploadDeleteEvent> = new Subject<FileUploadDeleteEvent>();
fileDeleted: Subject<string> = new Subject<string>();
private cache: { [key: string]: any } = {};
private cache: { [key: string]: any } = { /* empty */ };
private totalComplete: number = 0;
private totalAborted: number = 0;
private totalError: number = 0;
@ -84,7 +84,7 @@ export class UploadService {
}
clearCache() {
this.cache = {};
this.cache = { /* empty */ };
}
/**
@ -296,7 +296,7 @@ export class UploadService {
}
}
})
.catch(() => {});
.catch(() => { /* empty */ });
return promise;
}

View File

@ -81,10 +81,10 @@ describe('ContentMetadataCardComponent', () => {
node = {
aspectNames: [],
nodeType: '',
content: {},
properties: {},
createdByUser: {},
modifiedByUser: {},
content: { /* empty */ },
properties: { /* empty */ },
createdByUser: { /* empty */ },
modifiedByUser: { /* empty */ },
id: 'some-id'
} as Node;
@ -207,7 +207,7 @@ describe('ContentMetadataCardComponent', () => {
fixture.detectChanges();
const button = fixture.debugElement.query(By.css('[data-automation-id="meta-data-card-edit-aspect"]'));
button.triggerEventHandler('click', {});
button.triggerEventHandler('click', { /* empty */ });
fixture.detectChanges();
expect(nodeAspectService.updateNodeAspects).toHaveBeenCalledWith('fake-node-id');

View File

@ -86,7 +86,7 @@ describe('ContentMetadataComponent', () => {
const category1 = new Category({ id: 'test', name: 'testCat' });
const category2 = new Category({ id: 'test2', name: 'testCat2' });
const categoryPagingResponse: CategoryPaging = { list: { pagination: {}, entries: [{ entry: category1 }, { entry: category2 }] } };
const categoryPagingResponse: CategoryPaging = { list: { pagination: { /* empty */ }, entries: [{ entry: category1 }, { entry: category2 }] } };
const findTagElements = async (): Promise<string[]> => {
const matChipHarnessList = await TestbedHarnessEnvironment.loader(fixture).getAllHarnesses(
@ -227,18 +227,18 @@ describe('ContentMetadataComponent', () => {
id: 'node-id',
aspectNames: [],
nodeType: 'cm:node',
content: {},
properties: {},
createdByUser: {},
modifiedByUser: {}
content: { /* empty */ },
properties: { /* empty */ },
createdByUser: { /* empty */ },
modifiedByUser: { /* empty */ }
} as Node;
folderNode = {
id: 'folder-id',
aspectNames: [],
nodeType: '',
createdByUser: {},
modifiedByUser: {}
createdByUser: { /* empty */ },
modifiedByUser: { /* empty */ }
} as Node;
component.node = node;
@ -314,7 +314,7 @@ describe('ContentMetadataComponent', () => {
])
);
updateService.itemUpdated$.next({
changed: {}
changed: { /* empty */ }
} as UpdateNotification);
component.ngOnInit();
tick(500);
@ -369,7 +369,7 @@ describe('ContentMetadataComponent', () => {
component.ngOnInit();
component.readOnly = false;
spyOn(tagService, 'removeTag').and.returnValue(of(undefined));
spyOn(tagService, 'assignTagsToNode').and.returnValue(of({}));
spyOn(tagService, 'assignTagsToNode').and.returnValue(of({ /* empty */ }));
updateService.update(property, 'updated-value');
@ -465,7 +465,7 @@ describe('ContentMetadataComponent', () => {
it('should retrigger the load of the properties when the content type has changed', fakeAsync(() => {
component.readOnly = false;
const property = { key: 'nodeType', value: 'ft:sbiruli' } as CardViewBaseItemModel;
const expectedNode = Object.assign({}, node, { nodeType: 'ft:sbiruli' });
const expectedNode = Object.assign({ /* empty */ }, node, { nodeType: 'ft:sbiruli' });
spyOn(contentMetadataService, 'openConfirmDialog').and.returnValue(of(true));
spyOn(updateService, 'updateNodeAspect');
spyOn(nodesApiService, 'updateNode').and.returnValue(of(expectedNode));
@ -1198,7 +1198,7 @@ describe('ContentMetadataComponent', () => {
describe('events', () => {
it('should not propagate the event on left arrows press', () => {
fixture.detectChanges();
const event = { keyCode: 37, stopPropagation: () => {} };
const event = { keyCode: 37, stopPropagation: () => { /* empty */ } };
spyOn(event, 'stopPropagation').and.stub();
const element = fixture.debugElement.query(By.css('adf-card-view'));
element.triggerEventHandler('keydown', event);
@ -1207,7 +1207,7 @@ describe('ContentMetadataComponent', () => {
it('should not propagate the event on right arrows press', () => {
fixture.detectChanges();
const event = { keyCode: 39, stopPropagation: () => {} };
const event = { keyCode: 39, stopPropagation: () => { /* empty */ } };
spyOn(event, 'stopPropagation').and.stub();
const element = fixture.debugElement.query(By.css('adf-card-view'));
element.triggerEventHandler('keydown', event);
@ -1216,7 +1216,7 @@ describe('ContentMetadataComponent', () => {
it('should propagate the event on other keys press', () => {
fixture.detectChanges();
const event = { keyCode: 40, stopPropagation: () => {} };
const event = { keyCode: 40, stopPropagation: () => { /* empty */ } };
spyOn(event, 'stopPropagation').and.stub();
const element = fixture.debugElement.query(By.css('adf-card-view'));
element.triggerEventHandler('keydown', event);
@ -1294,7 +1294,7 @@ describe('ContentMetadataComponent', () => {
it('should not render tags after loading tags in ngOnChanges if node is not changed', async () => {
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
component.ngOnChanges({});
component.ngOnChanges({ /* empty */ });
expandTagsPanel();
fixture.detectChanges();
@ -1321,7 +1321,7 @@ describe('ContentMetadataComponent', () => {
fixture.detectChanges();
toggleEditModeForTags();
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
changed: {}
changed: { /* empty */ }
} as UpdateNotification);
tick(500);
fixture.detectChanges();
@ -1393,7 +1393,7 @@ describe('ContentMetadataComponent', () => {
const tagPaging = mockTagPaging();
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
component.ngOnInit();
spyOn(tagService, 'removeTag').and.returnValue(throwError({}));
spyOn(tagService, 'removeTag').and.returnValue(throwError({ /* empty */ }));
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
const tagName1 = tagPaging.list.entries[0].entry.tag;
const tagName2 = 'New tag 3';
@ -1503,7 +1503,7 @@ describe('ContentMetadataComponent', () => {
});
it('should not reload categories in ngOnChanges if node is not changed', () => {
component.ngOnChanges({});
component.ngOnChanges({ /* empty */ });
fixture.detectChanges();
expandCategoriesPanel();
@ -1514,7 +1514,7 @@ describe('ContentMetadataComponent', () => {
component.readOnly = false;
fixture.detectChanges();
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
changed: {}
changed: { /* empty */ }
} as UpdateNotification);
tick(500);
fixture.detectChanges();
@ -1593,7 +1593,7 @@ describe('ContentMetadataComponent', () => {
spyOn(tagService, 'removeTag').and.returnValue(EMPTY);
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
spyOn(categoryService, 'unlinkNodeFromCategory').and.returnValue(EMPTY);
spyOn(categoryService, 'linkNodeToCategory').and.returnValue(throwError({}));
spyOn(categoryService, 'linkNodeToCategory').and.returnValue(throwError({ /* empty */ }));
updateService.update(property, 'updated-value');

View File

@ -154,7 +154,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
basicProperties$: Observable<CardViewItem[]>;
groupedProperties$: Observable<CardViewGroup[]>;
changedProperties = {};
changedProperties = { /* empty */ };
hasMetadataChanged = false;
assignedCategories: Category[] = [];
categories: Category[] = [];
@ -238,7 +238,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
try {
statusCode = JSON.parse(error.message).error.statusCode;
} catch {}
} catch { /* empty */ }
let message = `METADATA.ERRORS.${statusCode}`;
@ -327,7 +327,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
}
revertChanges() {
this.changedProperties = {};
this.changedProperties = { /* empty */ };
this.hasMetadataChanged = false;
}
@ -393,8 +393,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
private updateNode() {
forkJoin({
updatedNode: this.nodesApiService.updateNode(this.node.id, this.changedProperties),
...(this.displayTags ? this.saveTags() : {}),
...(this.displayCategories ? this.saveCategories() : {})
...(this.displayTags ? this.saveTags() : { /* empty */ }),
...(this.displayCategories ? this.saveCategories() : { /* empty */ })
})
.pipe(
catchError((err) => {
@ -433,7 +433,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
private updateUndefinedNodeProperties(node: Node): void {
if (!node.properties) {
node.properties = {};
node.properties = { /* empty */ };
}
}
@ -492,7 +492,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
}
private saveCategories(): { [key: string]: Observable<CategoryPaging | CategoryEntry | void> } {
const observables: { [key: string]: Observable<CategoryPaging | CategoryEntry | void> } = {};
const observables: { [key: string]: Observable<CategoryPaging | CategoryEntry | void> } = { /* empty */ };
if (this.categories) {
this.assignedCategories.forEach((assignedCategory) => {
if (this.categories.every((category) => category.name !== assignedCategory.name)) {
@ -520,7 +520,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
}
private saveTags(): { [key: string]: Observable<TagPaging | TagEntry | void> } {
const observables: { [key: string]: Observable<TagPaging | TagEntry | void> } = {};
const observables: { [key: string]: Observable<TagPaging | TagEntry | void> } = { /* empty */ };
if (this.tags) {
this.assignedTagsEntries.forEach((tagEntry) => {
if (!this.tags.some((tag) => tagEntry.entry.tag === tag)) {

View File

@ -27,4 +27,4 @@ export const CONTENT_METADATA_DIRECTIVES = [ContentMetadataComponent, ContentMet
imports: [...CONTENT_METADATA_DIRECTIVES],
exports: [...CONTENT_METADATA_DIRECTIVES]
})
export class ContentMetadataModule {}
export class ContentMetadataModule { /* empty */ }

View File

@ -45,7 +45,7 @@ describe('AspectOrientedConfigService', () => {
const testCases: TestCase[] = [
{
name: 'Empty config',
config: {},
config: { /* empty */ },
expectations: []
},
{

View File

@ -52,7 +52,7 @@ export class AspectOrientedConfigService implements ContentMetadataConfig {
Object.keys(properties).map((propertyName) => this.setReadOnlyProperty(properties[propertyName]));
}
return Object.assign({}, propertyGroup, {
return Object.assign({ /* empty */ }, propertyGroup, {
properties: Object.keys(properties).map((propertyName) => {
if (this.isPropertyReadOnly(propertyName)) {
this.setReadOnlyProperty(properties[propertyName]);

View File

@ -38,7 +38,7 @@ describe('ContentMetadataConfigFactory', () => {
providers: [
{
provide: LogService, useValue: {
error: () => {}
error: () => { /* empty */ }
}
}
]

View File

@ -29,7 +29,7 @@ const DEFAULT_PRESET_NAME = 'default';
providedIn: 'root'
})
export class ContentMetadataConfigFactory {
constructor(private appConfigService: AppConfigService, private logService: LogService) {}
constructor(private appConfigService: AppConfigService, private logService: LogService) { /* empty */ }
public get(presetName: string = 'default'): ContentMetadataConfig {
let presetConfig: PresetConfig;

View File

@ -31,7 +31,7 @@ export class IndifferentConfigService implements ContentMetadataConfig {
const propertyGroup = propertyGroups[groupName];
const properties = propertyGroup.properties;
return Object.assign({}, propertyGroup, {
return Object.assign({ /* empty */ }, propertyGroup, {
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
});
});

View File

@ -66,7 +66,7 @@ export class LayoutOrientedConfigService implements ContentMetadataConfig {
const propertyGroup = propertyGroups[groupName];
const properties = propertyGroup.properties;
return Object.assign({}, propertyGroup, {
return Object.assign({ /* empty */ }, propertyGroup, {
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
});
});

View File

@ -18,7 +18,7 @@
import { PropertyGroup, Property, PropertyGroupContainer } from '../../interfaces/content-metadata.interfaces';
const emptyGroup = {
properties: {}
properties: { /* empty */ }
};
const convertObjectToArray = (object: any): Property[] => Object.keys(object).map((key) => object[key]);

View File

@ -142,7 +142,7 @@ describe('ContentTypePropertyService', () => {
nodeType: 'fk:nodeType',
createdByUser: { displayName: 'test-user' },
modifiedByUser: { displayName: 'test-user-modified' },
properties: {}
properties: { /* empty */ }
} as Node;
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(false);
service.getContentTypeCardItem(fakeNode).subscribe((items: CardViewItem[]) => {
@ -165,7 +165,7 @@ describe('ContentTypePropertyService', () => {
nodeType: 'fn:fakenode',
createdByUser: { displayName: 'test-user' },
modifiedByUser: { displayName: 'test-user-modified' },
properties: {}
properties: { /* empty */ }
} as Node;
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContent));
@ -190,7 +190,7 @@ describe('ContentTypePropertyService', () => {
nodeType: 'fn:fakenode',
createdByUser: { displayName: 'test-user' },
modifiedByUser: { displayName: 'test-user-modified' },
properties: {}
properties: { /* empty */ }
} as Node;
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContentWithProperties));

View File

@ -34,7 +34,7 @@ describe('PropertyDescriptorLoaderService', () => {
});
it('should load the groups passed by paramter', (done) => {
spyOn(classesApi, 'getClass').and.returnValue(Promise.resolve({}));
spyOn(classesApi, 'getClass').and.returnValue(Promise.resolve({ /* empty */ }));
service.load(['exif:exif', 'cm:content', 'custom:custom'])
.subscribe(() => {

View File

@ -47,8 +47,8 @@ export class PropertyDescriptorsService {
}
private convertToObject(propertyGroupsArray: PropertyGroup[]): PropertyGroupContainer {
return propertyGroupsArray.reduce((propertyGroups, propertyGroup) => Object.assign({}, propertyGroups, {
return propertyGroupsArray.reduce((propertyGroups, propertyGroup) => Object.assign({ /* empty */ }, propertyGroups, {
[propertyGroup.name]: propertyGroup
}), {});
}), { /* empty */ });
}
}

View File

@ -104,7 +104,7 @@ describe('PropertyGroupTranslatorService', () => {
it('should translate EVERY property in EVERY group properly', () => {
propertyGroups.push(
Object.assign({}, propertyGroup, {
Object.assign({ /* empty */ }, propertyGroup, {
properties: [
{
name: 'FAS:PLAGUE',
@ -117,7 +117,7 @@ describe('PropertyGroupTranslatorService', () => {
}
]
}),
Object.assign({}, propertyGroup, {
Object.assign({ /* empty */ }, propertyGroup, {
properties: [
{
name: 'FAS:ALOY',
@ -152,7 +152,7 @@ describe('PropertyGroupTranslatorService', () => {
propertyValues = { 'FAS:PLAGUE': 'The Chariot Line' };
propertyGroups.push(Object.assign({}, propertyGroup));
propertyGroups.push(Object.assign({ /* empty */ }, propertyGroup));
service.translateToCardViewGroups(propertyGroups, propertyValues, null);
expect(logServiceError).toHaveBeenCalledWith('Unknown type for mapping: daemonic:scorcher');

View File

@ -65,7 +65,7 @@ export class PropertyGroupTranslatorService {
public translateToCardViewGroups(propertyGroups: OrganisedPropertyGroup[], propertyValues, definition: Definition): CardViewGroup[] {
return propertyGroups.map((propertyGroup) => {
const translatedPropertyGroup: any = Object.assign({}, propertyGroup);
const translatedPropertyGroup: any = Object.assign({ /* empty */ }, propertyGroup);
translatedPropertyGroup.properties = this.translateArray(propertyGroup.properties, propertyValues, definition);
translatedPropertyGroup.editable = translatedPropertyGroup.properties.some((property) => property.editable);
return translatedPropertyGroup;

View File

@ -76,7 +76,7 @@ describe('ContentNodeDialogService', () => {
afterOpenObservable = new Subject<any>();
spyOnDialogOpen = spyOn(materialDialog, 'open').and.returnValue({
afterOpen: () => afterOpenObservable,
afterClosed: () => of({}),
afterClosed: () => of({ /* empty */ }),
componentInstance: {
error: new Subject<any>()
}
@ -90,7 +90,7 @@ describe('ContentNodeDialogService', () => {
} as Node;
service.openLockNodeDialog(testNode).subscribe(
() => {},
() => { /* empty */ },
(error) => {
expect(error).toBe('OPERATION.FAIL.NODE.NO_PERMISSION');
}
@ -104,7 +104,7 @@ describe('ContentNodeDialogService', () => {
it('should NOT be able to open the dialog when node has NOT permission', () => {
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, 'noperm').subscribe(
() => {},
() => { /* empty */ },
(error) => {
expect(spyOnDialogOpen).not.toHaveBeenCalled();
expect(JSON.parse(error.message).error.statusCode).toBe(403);
@ -114,7 +114,7 @@ describe('ContentNodeDialogService', () => {
it('should be able to open the dialog using a folder id', fakeAsync(() => {
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
service.openFileBrowseDialogByFolderId('fake-folder-id').subscribe(() => {});
service.openFileBrowseDialogByFolderId('fake-folder-id').subscribe(() => { /* empty */ });
tick();
expect(spyOnDialogOpen).toHaveBeenCalled();
}));
@ -122,7 +122,7 @@ describe('ContentNodeDialogService', () => {
it('should be able to open the dialog for files using the first user site', fakeAsync(() => {
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
service.openFileBrowseDialogBySite().subscribe(() => {});
service.openFileBrowseDialogBySite().subscribe(() => { /* empty */ });
tick();
expect(spyOnDialogOpen).toHaveBeenCalled();
}));
@ -130,7 +130,7 @@ describe('ContentNodeDialogService', () => {
it('should be able to open the dialog for folder using the first user site', fakeAsync(() => {
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
service.openFolderBrowseDialogBySite().subscribe(() => {});
service.openFolderBrowseDialogBySite().subscribe(() => { /* empty */ });
tick();
expect(spyOnDialogOpen).toHaveBeenCalled();
}));
@ -188,7 +188,7 @@ describe('ContentNodeDialogService', () => {
beforeEach(() => {
spyOnDialogOpen.and.callFake((_: any, config: any) => {
testContentNodeSelectorComponentData = config.data;
return { componentInstance: {}, afterClosed: () => of(null) };
return { componentInstance: { /* empty */ }, afterClosed: () => of(null) };
});
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, '!update');
});

View File

@ -49,7 +49,7 @@ export class ContentNodeDialogService {
private siteService: SitesService,
private translation: TranslationService,
private thumbnailService: ThumbnailService
) {}
) { /* empty */ }
/**
* Opens a file browser at a chosen folder location.

View File

@ -132,7 +132,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
of(
new NodePaging({
list: {
pagination: {},
pagination: { /* empty */ },
entries: [],
source: new Node()
}
@ -241,7 +241,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
}));
it('should update the breadcrumb when changing to a custom site', async () => {
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: { /* empty */ } } as Node;
component.siteChanged({ entry: { guid: '-mysites-', title: 'My Sites' } } as SiteEntry);
@ -266,7 +266,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should create the query with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => {
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: { /* empty */ } } as Node;
fixture.detectChanges();
typeToSearchBox('search-term');
@ -291,7 +291,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
}));
it('should get the corresponding node ids on search when a known alias is selected from dropdown', fakeAsync(() => {
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: { /* empty */ } } as Node;
typeToSearchBox('vegeta');
@ -304,7 +304,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should get the corresponding node ids on search when a known alias is selected from CUSTOM dropdown', fakeAsync(() => {
component.dropdownSiteList = { list: { entries: [{ entry: { guid: '-sites-' } }, { entry: { guid: 'namek' } }] } } as SitePaging;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: {} } as Node;
component.documentList.folderNode = { id: 'fakeNodeId', isFolder: true, path: { /* empty */ } } as Node;
fixture.detectChanges();
@ -666,7 +666,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
fixture.whenStable().then(() => {
const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
expect(clearButton).not.toBeNull();
clearButton.triggerEventHandler('click', {});
clearButton.triggerEventHandler('click', { /* empty */ });
fixture.detectChanges();
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));

View File

@ -367,15 +367,15 @@ describe('ContentNodeSelectorPanelComponent', () => {
describe('Chosen node', () => {
const entry: Node = { id: 'fakeid' } as Node;
const nodePage: NodePaging = { list: { pagination: {} } };
const nodePage: NodePaging = { list: { pagination: { /* empty */ } } };
let hasAllowableOperations;
const fakeFolderNode = { id: 'fakeNodeId', isFolder: true } as Node;
const returnHasPermission = (): boolean => hasAllowableOperations;
beforeEach(() => {
const schema = [{}] as DataColumn[];
const rows = [{}, {}] as DataRow[];
const schema = [{ /* empty */ }] as DataColumn[];
const rows = [{ /* empty */ }, { /* empty */ }] as DataRow[];
component.documentList.data = new ShareDataTableAdapter(thumbnailService, contentService, schema);
spyOn(component.documentList.data, 'getRows').and.returnValue(rows);
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: new SitePagingList({ entries: [] }) })));
@ -488,7 +488,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should be empty when the chosenNode is reset', async () => {
hasAllowableOperations = true;
component.onCurrentSelection([{ entry: {} as Node }]);
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
component.select.subscribe((nodes) => {
expect(nodes).toBeDefined();
@ -536,7 +536,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should be null when the chosenNode is reset', async () => {
fixture.detectChanges();
component.onCurrentSelection([{ entry: {} as Node }]);
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
component.select.subscribe((nodes) => {
expect(nodes).toBeDefined();
@ -572,7 +572,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should be null when the chosenNode is reset', async () => {
fixture.detectChanges();
component.onCurrentSelection([{ entry: {} as Node }]);
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
component.select.subscribe((nodes) => {
expect(nodes).toBeDefined();

View File

@ -313,7 +313,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
private uploadService: UploadService,
private sitesService: SitesService,
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService
) {}
) { /* empty */ }
set chosenNode(value: Node[]) {
this._chosenNode = value;

View File

@ -190,7 +190,7 @@ describe('ContentNodeSelectorComponent', () => {
it('should close the dialog', () => {
let cancelButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-actions-cancel"]'));
cancelButton.triggerEventHandler('click', {});
cancelButton.triggerEventHandler('click', { /* empty */ });
expect(dialog.close).toHaveBeenCalled();
fixture.detectChanges();

View File

@ -33,4 +33,4 @@ export const CONTENT_NODE_SELECTOR_DIRECTIVES = [
imports: [...CONTENT_NODE_SELECTOR_DIRECTIVES],
exports: [...CONTENT_NODE_SELECTOR_DIRECTIVES]
})
export class ContentNodeSelectorModule {}
export class ContentNodeSelectorModule { /* empty */ }

Some files were not shown because too many files have changed in this diff Show More