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
@@ -83,7 +83,7 @@ export class ContentUserInfoComponent implements OnDestroy {
|
|||||||
|
|
||||||
private destroy$ = new Subject();
|
private destroy$ = new Subject();
|
||||||
|
|
||||||
constructor(private peopleContentService: PeopleContentService) {}
|
constructor(private peopleContentService: PeopleContentService) { /* empty */ }
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.destroy$.next(true);
|
this.destroy$.next(true);
|
||||||
|
|||||||
+1
-1
@@ -86,7 +86,7 @@ export class ProcessUserInfoComponent implements OnDestroy {
|
|||||||
|
|
||||||
private destroy$ = new Subject();
|
private destroy$ = new Subject();
|
||||||
|
|
||||||
constructor(private peopleProcessService: PeopleProcessService, private peopleContentService: PeopleContentService) {}
|
constructor(private peopleProcessService: PeopleProcessService, private peopleContentService: PeopleContentService) { /* empty */ }
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.destroy$.next(true);
|
this.destroy$.next(true);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export class UserInfoComponent implements OnInit {
|
|||||||
private identityUserService: IdentityUserService,
|
private identityUserService: IdentityUserService,
|
||||||
private basicAlfrescoAuthService: BasicAlfrescoAuthService,
|
private basicAlfrescoAuthService: BasicAlfrescoAuthService,
|
||||||
private authService: AuthenticationService
|
private authService: AuthenticationService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export class CloudFiltersDemoComponent implements OnInit {
|
|||||||
private router: Router,
|
private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private cloudProcessFiltersService: CloudProcessFiltersService
|
private cloudProcessFiltersService: CloudProcessFiltersService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.currentTaskFilter$ = this.cloudLayoutService.taskFilter$;
|
this.currentTaskFilter$ = this.cloudLayoutService.taskFilter$;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export class CloudLayoutComponent implements OnInit {
|
|||||||
appName: string;
|
appName: string;
|
||||||
filterName: 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() {
|
ngOnInit() {
|
||||||
let root: string = '';
|
let root: string = '';
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export class TaskDetailsCloudDemoComponent {
|
|||||||
try {
|
try {
|
||||||
errorMessage = JSON.parse(error).message || JSON.parse(error).entry?.message;
|
errorMessage = JSON.parse(error).message || JSON.parse(error).entry?.message;
|
||||||
errorMessage = JSON.parse(errorMessage).message;
|
errorMessage = JSON.parse(errorMessage).message;
|
||||||
} catch {}
|
} catch { /* empty */ }
|
||||||
this.notificationService.showError(errorMessage || error);
|
this.notificationService.showError(errorMessage || error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFilterChange(filter: any) {
|
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 })];
|
this.sortArray = [new TaskListCloudSortingModel({ orderBy: this.editedFilter.sort, direction: this.editedFilter.order })];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export class FileViewComponent implements OnInit {
|
|||||||
private contentServices: ContentService,
|
private contentServices: ContentService,
|
||||||
private preview: PreviewService,
|
private preview: PreviewService,
|
||||||
private notificationService: NotificationService
|
private notificationService: NotificationService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.route.params.subscribe((params) => {
|
this.route.params.subscribe((params) => {
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
private contentMetadataService: ContentMetadataService,
|
private contentMetadataService: ContentMetadataService,
|
||||||
private dialogAspectListService: DialogAspectListService,
|
private dialogAspectListService: DialogAspectListService,
|
||||||
private nodeService: NodesApiService
|
private nodeService: NodesApiService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
showFile(event) {
|
showFile(event) {
|
||||||
const entry = event.value.entry;
|
const entry = event.value.entry;
|
||||||
@@ -545,7 +545,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
navigateToFilter(activeFilters: FilterSearch[]) {
|
navigateToFilter(activeFilters: FilterSearch[]) {
|
||||||
const objectFromMap = {};
|
const objectFromMap = { /* empty */ };
|
||||||
activeFilters.forEach((filter: FilterSearch) => {
|
activeFilters.forEach((filter: FilterSearch) => {
|
||||||
let paramValue = null;
|
let paramValue = null;
|
||||||
if (filter.value?.from && filter.value.to) {
|
if (filter.value?.from && filter.value.to) {
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ import { Component, ViewEncapsulation } from '@angular/core';
|
|||||||
styleUrls: ['./home.component.scss'],
|
styleUrls: ['./home.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
export class HomeComponent {}
|
export class HomeComponent { /* empty */ }
|
||||||
|
|||||||
@@ -25,4 +25,4 @@ import { MatButtonModule } from '@angular/material/button';
|
|||||||
templateUrl: './logout.component.html',
|
templateUrl: './logout.component.html',
|
||||||
styleUrls: ['./logout.component.scss']
|
styleUrls: ['./logout.component.scss']
|
||||||
})
|
})
|
||||||
export class LogoutComponent {}
|
export class LogoutComponent { /* empty */ }
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export class ProcessListDemoComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private onDestroy$ = new Subject<boolean>();
|
private onDestroy$ = new Subject<boolean>();
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) {}
|
constructor(private route: ActivatedRoute, private formBuilder: UntypedFormBuilder) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.resetQueryParameters();
|
this.resetQueryParameters();
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { AppsListComponent } from '@alfresco/adf-process-services';
|
|||||||
templateUrl: './apps-view.component.html'
|
templateUrl: './apps-view.component.html'
|
||||||
})
|
})
|
||||||
export class AppsViewComponent {
|
export class AppsViewComponent {
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) { /* empty */ }
|
||||||
|
|
||||||
onAppClicked(app: AppDefinitionRepresentation) {
|
onAppClicked(app: AppDefinitionRepresentation) {
|
||||||
this.router.navigate(['/activiti/apps', app.id || 0, 'tasks']);
|
this.router.navigate(['/activiti/apps', app.id || 0, 'tasks']);
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
|||||||
}
|
}
|
||||||
|
|
||||||
applyTaskFilter(filter: UserTaskFilterRepresentation) {
|
applyTaskFilter(filter: UserTaskFilterRepresentation) {
|
||||||
this.taskFilter = Object.assign({}, filter);
|
this.taskFilter = Object.assign({ /* empty */ }, filter);
|
||||||
|
|
||||||
if (filter && this.taskList) {
|
if (filter && this.taskList) {
|
||||||
this.taskList.hasCustomDataSource = false;
|
this.taskList.hasCustomDataSource = false;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import { SearchControlComponent } from '@alfresco/adf-content-services';
|
|||||||
styleUrls: ['./search-bar.component.scss']
|
styleUrls: ['./search-bar.component.scss']
|
||||||
})
|
})
|
||||||
export class SearchBarComponent {
|
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
|
* Called when the user submits the search, e.g. hits enter or clicks submit
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export class AppSearchFilterChipsComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private updateSetting(field) {
|
private updateSetting(field) {
|
||||||
field.settings = field.settings ?? {};
|
field.settings = field.settings ?? { /* empty */ };
|
||||||
field.settings.allowUpdateOnChange = false;
|
field.settings.allowUpdateOnChange = false;
|
||||||
field.settings.hideDefaultAction = true;
|
field.settings.hideDefaultAction = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export class HostSettingsComponent implements OnInit {
|
|||||||
private alfrescoApiService: AlfrescoApiService,
|
private alfrescoApiService: AlfrescoApiService,
|
||||||
private appConfig: AppConfigService,
|
private appConfig: AppConfigService,
|
||||||
private authenticationService: AuthenticationService
|
private authenticationService: AuthenticationService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
if (this.providers.length === 1) {
|
if (this.providers.length === 1) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { HostSettingsComponent } from './host-settings.component';
|
|||||||
templateUrl: './settings.component.html'
|
templateUrl: './settings.component.html'
|
||||||
})
|
})
|
||||||
export class SettingsComponent {
|
export class SettingsComponent {
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) { /* empty */ }
|
||||||
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login']);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ describe('FolderCreateDirective', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should emit success event with node if the folder creation was successful', async () => {
|
it('should emit success event with node if the folder creation was successful', async () => {
|
||||||
const testNode = {};
|
const testNode = { /* empty */ };
|
||||||
|
|
||||||
element.triggerEventHandler('click', event);
|
element.triggerEventHandler('click', event);
|
||||||
dialogRefMock.componentInstance.success.next(testNode);
|
dialogRefMock.componentInstance.success.next(testNode);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export class FolderCreateDirective {
|
|||||||
this.openDialog();
|
this.openDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(public dialogRef: MatDialog, public content: ContentService) {}
|
constructor(public dialogRef: MatDialog, public content: ContentService) { /* empty */ }
|
||||||
|
|
||||||
private get dialogConfig() {
|
private get dialogConfig() {
|
||||||
const { parentNodeId, title: createTitle, nodeType } = this;
|
const { parentNodeId, title: createTitle, nodeType } = this;
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export class InMemoryFormService extends FormService {
|
|||||||
};
|
};
|
||||||
delete flattenForm.formDefinition;
|
delete flattenForm.formDefinition;
|
||||||
|
|
||||||
const formValues: FormValues = {};
|
const formValues: FormValues = { /* empty */ };
|
||||||
(data || []).forEach((variable) => {
|
(data || []).forEach((variable) => {
|
||||||
formValues[variable.name] = variable.value;
|
formValues[variable.name] = variable.value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export class PreviewService {
|
|||||||
public content: Blob = null;
|
public content: Blob = null;
|
||||||
public name: string = null;
|
public name: string = null;
|
||||||
|
|
||||||
constructor(private router: Router) {}
|
constructor(private router: Router) { /* empty */ }
|
||||||
|
|
||||||
showResource(resourceId, versionId?): void {
|
showResource(resourceId, versionId?): void {
|
||||||
if (versionId) {
|
if (versionId) {
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ export class CoreAutomationService {
|
|||||||
private userPreferencesService: UserPreferencesService,
|
private userPreferencesService: UserPreferencesService,
|
||||||
private storageService: StorageService,
|
private storageService: StorageService,
|
||||||
private auth: AuthenticationService
|
private auth: AuthenticationService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
const adfProxy = window['adf'] || {};
|
const adfProxy = window['adf'] || { /* empty */ };
|
||||||
|
|
||||||
adfProxy.getConfigField = (field: string): any => this.appConfigService.get(field);
|
adfProxy.getConfigField = (field: string): any => this.appConfigService.get(field);
|
||||||
|
|
||||||
|
|||||||
@@ -339,8 +339,8 @@ export class DemoForm {
|
|||||||
javascriptEvents: [],
|
javascriptEvents: [],
|
||||||
className: '',
|
className: '',
|
||||||
style: '',
|
style: '',
|
||||||
customFieldTemplates: {},
|
customFieldTemplates: { /* empty */ },
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
||||||
@@ -360,7 +360,7 @@ export class DemoForm {
|
|||||||
type: 'integer'
|
type: 'integer'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
customFieldsValueInfo: {},
|
customFieldsValueInfo: { /* empty */ },
|
||||||
gridsterForm: false,
|
gridsterForm: false,
|
||||||
globalDateFormat: 'D-M-YYYY'
|
globalDateFormat: 'D-M-YYYY'
|
||||||
}
|
}
|
||||||
@@ -1459,8 +1459,8 @@ export class DemoForm {
|
|||||||
javascriptEvents: [],
|
javascriptEvents: [],
|
||||||
className: '',
|
className: '',
|
||||||
style: '',
|
style: '',
|
||||||
customFieldTemplates: {},
|
customFieldTemplates: { /* empty */ },
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
||||||
@@ -1743,8 +1743,8 @@ export class DemoForm {
|
|||||||
javascriptEvents: [],
|
javascriptEvents: [],
|
||||||
className: '',
|
className: '',
|
||||||
style: '',
|
style: '',
|
||||||
customFieldTemplates: {},
|
customFieldTemplates: { /* empty */ },
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
id: 'bfca9766-7bc1-45cc-8ecf-cdad551e36e2',
|
||||||
@@ -1764,7 +1764,7 @@ export class DemoForm {
|
|||||||
type: 'integer'
|
type: 'integer'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
customFieldsValueInfo: {},
|
customFieldsValueInfo: { /* empty */ },
|
||||||
gridsterForm: false
|
gridsterForm: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1825,7 +1825,7 @@ export class DemoForm {
|
|||||||
link: false,
|
link: false,
|
||||||
displayableCMProperties: []
|
displayableCMProperties: []
|
||||||
},
|
},
|
||||||
visibilityCondition: {}
|
visibilityCondition: { /* empty */ }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
|||||||
await apiService.loginWithProfile('admin');
|
await apiService.loginWithProfile('admin');
|
||||||
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
await uploadActions.deleteFileOrFolder(folder.entry.id);
|
||||||
await identityService.deleteIdentityUser(acsUser.email);
|
await identityService.deleteIdentityUser(acsUser.email);
|
||||||
} catch (error) {}
|
} catch (error) { /* empty */ }
|
||||||
await apiService.getInstance().logout();
|
await apiService.getInstance().logout();
|
||||||
await browser.executeScript('window.sessionStorage.clear();');
|
await browser.executeScript('window.sessionStorage.clear();');
|
||||||
await browser.executeScript('window.localStorage.clear();');
|
await browser.executeScript('window.localStorage.clear();');
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ describe('Upload component', async () => {
|
|||||||
for (const node of nodeList) {
|
for (const node of nodeList) {
|
||||||
try {
|
try {
|
||||||
await uploadActions.deleteFileOrFolder(node);
|
await uploadActions.deleteFileOrFolder(node);
|
||||||
} catch (error) {}
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ describe('Upload component', () => {
|
|||||||
for (const node of nodeList) {
|
for (const node of nodeList) {
|
||||||
try {
|
try {
|
||||||
await uploadActions.deleteFileOrFolder(node);
|
await uploadActions.deleteFileOrFolder(node);
|
||||||
} catch (error) {}
|
} catch (error) { /* empty */ }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ export class FileModel {
|
|||||||
password = '';
|
password = '';
|
||||||
createdByUser = new CreatedByModel();
|
createdByUser = new CreatedByModel();
|
||||||
modifiedByUser = new CreatedByModel();
|
modifiedByUser = new CreatedByModel();
|
||||||
content: ContentModel = {};
|
content: ContentModel = { /* empty */ };
|
||||||
properties: ContentPropertiesModel = {};
|
properties: ContentPropertiesModel = { /* empty */ };
|
||||||
|
|
||||||
constructor(details?: any) {
|
constructor(details?: any) {
|
||||||
Object.assign(this, details);
|
Object.assign(this, details);
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ describe('Form Field Component - Dropdown Widget', () => {
|
|||||||
const dropdown = widget.dropdown();
|
const dropdown = widget.dropdown();
|
||||||
|
|
||||||
let testUser: { idIdentityService: string; username: string; password: string };
|
let testUser: { idIdentityService: string; username: string; password: string };
|
||||||
const runningTasks = {};
|
const runningTasks = { /* empty */ };
|
||||||
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ describe('Form Field Component - JSON Widget', () => {
|
|||||||
await jsonWidget.clickJsonButton(formWithJson.widgets.displayJsonWidgetId);
|
await jsonWidget.clickJsonButton(formWithJson.widgets.displayJsonWidgetId);
|
||||||
|
|
||||||
await editJsonDialog.checkDialogIsDisplayed();
|
await editJsonDialog.checkDialogIsDisplayed();
|
||||||
expect(await editJsonDialog.getDialogContent()).toBe('{}');
|
expect(await editJsonDialog.getDialogContent()).toBe('{ /* empty */ }');
|
||||||
await editJsonDialog.clickCloseButton();
|
await editJsonDialog.clickCloseButton();
|
||||||
await editJsonDialog.checkDialogIsNotDisplayed();
|
await editJsonDialog.checkDialogIsNotDisplayed();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ describe('Task form cloud component', () => {
|
|||||||
try {
|
try {
|
||||||
await apiService.loginWithProfile('identityAdmin');
|
await apiService.loginWithProfile('identityAdmin');
|
||||||
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
await identityService.deleteIdentityUser(testUser.idIdentityService);
|
||||||
} catch (error) {}
|
} catch (error) { /* empty */ }
|
||||||
await browser.executeScript('window.sessionStorage.clear();');
|
await browser.executeScript('window.sessionStorage.clear();');
|
||||||
await browser.executeScript('window.localStorage.clear();');
|
await browser.executeScript('window.localStorage.clear();');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ describe('Sorting for process filters', () => {
|
|||||||
await modelsActions.deleteModel(appId);
|
await modelsActions.deleteModel(appId);
|
||||||
await apiService.loginWithProfile('admin');
|
await apiService.loginWithProfile('admin');
|
||||||
await usersActions.deleteTenant(tenantId);
|
await usersActions.deleteTenant(tenantId);
|
||||||
} catch (e) {}
|
} catch (e) { /* empty */ }
|
||||||
|
|
||||||
await navigationBarPage.clickLogoutButton();
|
await navigationBarPage.clickLogoutButton();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe('Task Assignee', () => {
|
|||||||
tenantId: user.tenantId,
|
tenantId: user.tenantId,
|
||||||
type: 1
|
type: 1
|
||||||
});
|
});
|
||||||
} catch {}
|
} catch { /* empty */ }
|
||||||
|
|
||||||
await apiService.login(user.username, user.password);
|
await apiService.login(user.username, user.password);
|
||||||
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||||
@@ -147,7 +147,7 @@ describe('Task Assignee', () => {
|
|||||||
lastName: app.candidate.lastName
|
lastName: app.candidate.lastName
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
} catch (e) {}
|
} catch (e) { /* empty */ }
|
||||||
|
|
||||||
await apiService.login(user.username, user.password);
|
await apiService.login(user.username, user.password);
|
||||||
const appModel = await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
const appModel = await applicationsService.importPublishDeployApp(app.file_path, { renewIdmEntries: true });
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ export const checkboxVisibilityFormJson = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
id: '33c60b43-2d44-4f25-bdc4-62b34ae11b43',
|
||||||
@@ -278,7 +278,7 @@ export const multipleCheckboxVisibilityFormJson = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: []
|
variables: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ export const displayValueTextJson = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes : [],
|
outcomes : [],
|
||||||
metadata : {},
|
metadata : { /* empty */ },
|
||||||
variables : [
|
variables : [
|
||||||
{
|
{
|
||||||
id : '928c5dce-0ee4-4de3-8775-975eda5a4543' ,
|
id : '928c5dce-0ee4-4de3-8775-975eda5a4543' ,
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export const dropdownVisibilityFormFieldJson = {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: []
|
variables: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ export const dropdownVisibilityFormVariableJson = {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [{
|
variables: [{
|
||||||
id: '74cdd5d3-120b-4926-995e-89e929a16c8f',
|
id: '74cdd5d3-120b-4926-995e-89e929a16c8f',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ export const multipleVisibilityFormJson = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: '948aa549-5011-423e-b8a2-020e69daae5f',
|
id: '948aa549-5011-423e-b8a2-020e69daae5f',
|
||||||
@@ -585,7 +585,7 @@ export const multipleTextVisibilityFormJson = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: []
|
variables: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const peopleSingleModeFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: []
|
variables: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,7 +97,7 @@ export const peopleMultipleModeFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -148,7 +148,7 @@ export const peopleRequiredFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -199,7 +199,7 @@ export const groupSingleModeFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -250,7 +250,7 @@ export const groupMultipleModeFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -301,7 +301,7 @@ export const groupRequiredFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -352,7 +352,7 @@ export const peopleReadOnlyFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
@@ -403,7 +403,7 @@ export const groupReadOnlyFormMock = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables: [
|
variables: [
|
||||||
{
|
{
|
||||||
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
id: 'd6060d6b-1cb0-45dc-a18b-4d7898a9a5ad',
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ const createTabVisibilityJson = (
|
|||||||
tabs,
|
tabs,
|
||||||
fields,
|
fields,
|
||||||
outcomes: [],
|
outcomes: [],
|
||||||
metadata: {},
|
metadata: { /* empty */ },
|
||||||
variables
|
variables
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ describe('Search Slider Filter', () => {
|
|||||||
try {
|
try {
|
||||||
await apiService.login(acsUser.username, acsUser.password);
|
await apiService.login(acsUser.username, acsUser.password);
|
||||||
await uploadActions.deleteFileOrFolder(file2Bytes.entry.id);
|
await uploadActions.deleteFileOrFolder(file2Bytes.entry.id);
|
||||||
} catch (error) {}
|
} catch (error) { /* empty */ }
|
||||||
|
|
||||||
await navigationBarPage.clickLogoutButton();
|
await navigationBarPage.clickLogoutButton();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ describe('Search component - Text widget', () => {
|
|||||||
{
|
{
|
||||||
'cm:description': newFolderModel.description
|
'cm:description': newFolderModel.description
|
||||||
}
|
}
|
||||||
}, {});
|
}, { /* empty */ });
|
||||||
|
|
||||||
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
await browser.sleep(browser.params.testConfig.timeouts.index_search);
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export default function main(_args: string[], workingDir: string) {
|
|||||||
projVersion: packageJson.version,
|
projVersion: packageJson.version,
|
||||||
projName: packageJson.name
|
projName: packageJson.name
|
||||||
},
|
},
|
||||||
{},
|
{ /* empty */ },
|
||||||
(err: any, mdText: string) => {
|
(err: any, mdText: string) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ export default function main(_args: string[], workingDir: string) {
|
|||||||
projVersion: packageJson.version,
|
projVersion: packageJson.version,
|
||||||
projName: packageJson.name
|
projName: packageJson.name
|
||||||
},
|
},
|
||||||
{},
|
{ /* empty */ },
|
||||||
(err: any, text: string) => {
|
(err: any, text: string) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|||||||
@@ -137,5 +137,5 @@ async function checkDiskSpaceFullEnv() {
|
|||||||
*/
|
*/
|
||||||
function sleep(delay: number) {
|
function sleep(delay: number) {
|
||||||
const start = new Date().getTime();
|
const start = new Date().getTime();
|
||||||
while (new Date().getTime() < start + delay) {}
|
while (new Date().getTime() < start + delay) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ function buildImage(args: PublishArgs, tag: string) {
|
|||||||
if (args.verbose) {
|
if (args.verbose) {
|
||||||
logger.info(`Dry-run Perform docker build -t=${args.dockerRepo}:${tag} ${buildArgs} -f=${args.fileName} ${args.pathProject}`);
|
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);
|
logger.info(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ function buildImage(args: PublishArgs, tag: string) {
|
|||||||
*/
|
*/
|
||||||
function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
|
function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
|
||||||
logger.info(`Perform docker tag... ${args.dockerRepo}:${imageTag} on ${args.dockerRepo}:${newTag}`);
|
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);
|
logger.info(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ function tagImage(args: PublishArgs, imageTag: string, newTag: string) {
|
|||||||
*/
|
*/
|
||||||
function pullImage(dockerRepo: string, sourceTag: string) {
|
function pullImage(dockerRepo: string, sourceTag: string) {
|
||||||
logger.info(`Perform docker pull... ${dockerRepo}:${sourceTag}`);
|
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);
|
logger.info(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ function pushImage(args: PublishArgs, tag: string) {
|
|||||||
logger.info(`Dry-run Perform docker push... ${args.dockerRepo}:${tag}`);
|
logger.info(`Dry-run Perform docker push... ${args.dockerRepo}:${tag}`);
|
||||||
} else {
|
} else {
|
||||||
logger.info(`Perform docker push... ${args.dockerRepo}:${tag}`);
|
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);
|
logger.info(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,7 +133,7 @@ function pushImage(args: PublishArgs, tag: string) {
|
|||||||
*/
|
*/
|
||||||
function cleanImage(args: PublishArgs, tag: string) {
|
function cleanImage(args: PublishArgs, tag: string) {
|
||||||
logger.info(`Perform docker clean on tag:${tag}...`);
|
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);
|
logger.info(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ export const AAE_MICROSERVICES = ['deployment-service', 'modeling-service', 'dmn
|
|||||||
async function healthCheck(nameService: string) {
|
async function healthCheck(nameService: string) {
|
||||||
const url = `${args.host}/${nameService}/actuator/health`;
|
const url = `${args.host}/${nameService}/actuator/health`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -98,11 +98,11 @@ async function healthCheck(nameService: string) {
|
|||||||
async function getApplications(): Promise<{ list: { entries: any[] } }> {
|
async function getApplications(): Promise<{ list: { entries: any[] } }> {
|
||||||
const url = `${args.host}/deployment-service/v1/applications`;
|
const url = `${args.host}/deployment-service/v1/applications`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -139,11 +139,11 @@ async function getApplications(): Promise<{ list: { entries: any[] } }> {
|
|||||||
function getDescriptors() {
|
function getDescriptors() {
|
||||||
const url = `${args.host}/deployment-service/v1/descriptors`;
|
const url = `${args.host}/deployment-service/v1/descriptors`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -174,11 +174,11 @@ function getDescriptors() {
|
|||||||
function getProjects() {
|
function getProjects() {
|
||||||
const url = `${args.host}/modeling-service/v1/projects`;
|
const url = `${args.host}/modeling-service/v1/projects`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = { maxItems: 1000 };
|
const queryParams = { maxItems: 1000 };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -210,11 +210,11 @@ function getProjects() {
|
|||||||
function getProjectRelease(projectId: string) {
|
function getProjectRelease(projectId: string) {
|
||||||
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
|
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -245,11 +245,11 @@ function getProjectRelease(projectId: string) {
|
|||||||
async function releaseProject(projectId: string) {
|
async function releaseProject(projectId: string) {
|
||||||
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
|
const url = `${args.host}/modeling-service/v1/projects/${projectId}/releases`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -281,11 +281,11 @@ async function releaseProject(projectId: string) {
|
|||||||
function deleteProject(projectId: string) {
|
function deleteProject(projectId: string) {
|
||||||
const url = `${args.host}/modeling-service/v1/projects/${projectId}`;
|
const url = `${args.host}/modeling-service/v1/projects/${projectId}`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -320,11 +320,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
|
|||||||
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
|
const project = await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
|
||||||
`${args.host}/modeling-service/v1/projects/import`,
|
`${args.host}/modeling-service/v1/projects/import`,
|
||||||
'POST',
|
'POST',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{ file: fileContent },
|
{ file: fileContent },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['multipart/form-data'],
|
['multipart/form-data'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -334,11 +334,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
|
|||||||
return await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
|
return await alfrescoJsApiModeler.oauth2Auth.callCustomApi(
|
||||||
`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`,
|
`${args.host}/modeling-service/v1/projects/${project.entry.id}/releases`,
|
||||||
'POST',
|
'POST',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -358,11 +358,11 @@ async function importAndReleaseProject(absoluteFilePath: string) {
|
|||||||
function deleteDescriptor(name: string) {
|
function deleteDescriptor(name: string) {
|
||||||
const url = `${args.host}/deployment-service/v1/descriptors/${name}`;
|
const url = `${args.host}/deployment-service/v1/descriptors/${name}`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -394,10 +394,10 @@ function deleteDescriptor(name: string) {
|
|||||||
function deploy(model: any) {
|
function deploy(model: any) {
|
||||||
const url = `${args.host}/deployment-service/v1/applications`;
|
const url = `${args.host}/deployment-service/v1/applications`;
|
||||||
|
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = model;
|
const bodyParam = model;
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|||||||
@@ -246,5 +246,5 @@ async function checkEnv(opts: InitAcsEnvArgs) {
|
|||||||
*/
|
*/
|
||||||
function sleep(delay: number) {
|
function sleep(delay: number) {
|
||||||
const start = new Date().getTime();
|
const start = new Date().getTime();
|
||||||
while (new Date().getTime() < start + delay) {}
|
while (new Date().getTime() < start + delay) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,11 +277,11 @@ async function updateLicense(opts: InitApsEnvArgs) {
|
|||||||
await alfrescoJsApi.oauth2Auth.callCustomApi(
|
await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/api/enterprise/license`,
|
`${opts.host}/activiti-app/api/enterprise/license`,
|
||||||
'POST',
|
'POST',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{ file: fileContent },
|
{ file: fileContent },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['multipart/form-data'],
|
['multipart/form-data'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -364,11 +364,11 @@ async function hasLicense(opts: InitApsEnvArgs): Promise<boolean> {
|
|||||||
const license = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const license = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/api/enterprise/license`,
|
`${opts.host}/activiti-app/api/enterprise/license`,
|
||||||
'GET',
|
'GET',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -394,11 +394,11 @@ async function getDefaultApsUsersFromRealm(opts: InitApsEnvArgs) {
|
|||||||
const users: any[] = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const users: any[] = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/auth/admin/realms/alfresco/users`,
|
`${opts.host}/auth/admin/realms/alfresco/users`,
|
||||||
'GET',
|
'GET',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{ max: 1000 },
|
{ max: 1000 },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -424,11 +424,11 @@ async function isContentRepoPresent(opts: InitApsEnvArgs, tenantId: number, cont
|
|||||||
const contentRepos = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const contentRepos = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/app/rest/integration/alfresco?tenantId=${tenantId}`,
|
`${opts.host}/activiti-app/app/rest/integration/alfresco?tenantId=${tenantId}`,
|
||||||
'GET',
|
'GET',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -464,10 +464,10 @@ async function addContentRepoWithBasic(opts: InitApsEnvArgs, tenantId: number, n
|
|||||||
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/api/enterprise/integration/alfresco`,
|
`${opts.host}/activiti-app/api/enterprise/integration/alfresco`,
|
||||||
'POST',
|
'POST',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
body,
|
body,
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
@@ -491,11 +491,11 @@ async function authorizeUserToContentRepo(opts: InitApsEnvArgs, user: any) {
|
|||||||
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/app/rest/integration/alfresco`,
|
`${opts.host}/activiti-app/app/rest/integration/alfresco`,
|
||||||
'GET',
|
'GET',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
);
|
);
|
||||||
@@ -527,10 +527,10 @@ async function authorizeUserToContentWithBasic(opts: InitApsEnvArgs, username: s
|
|||||||
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
const content = await alfrescoJsApi.oauth2Auth.callCustomApi(
|
||||||
`${opts.host}/activiti-app/api/enterprise/integration/alfresco/${contentId}/account`,
|
`${opts.host}/activiti-app/api/enterprise/integration/alfresco/${contentId}/account`,
|
||||||
'POST',
|
'POST',
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
{},
|
{ /* empty */ },
|
||||||
body,
|
body,
|
||||||
['application/json'],
|
['application/json'],
|
||||||
['application/json']
|
['application/json']
|
||||||
@@ -569,5 +569,5 @@ async function downloadLicenseFile(apsLicensePath: string) {
|
|||||||
*/
|
*/
|
||||||
function sleep(delay: number) {
|
function sleep(delay: number) {
|
||||||
const start = new Date().getTime();
|
const start = new Date().getTime();
|
||||||
while (new Date().getTime() < start + delay) {}
|
while (new Date().getTime() < start + delay) { /* empty */ }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default function main(_args: string[], workingDir: string) {
|
|||||||
projVersion: packageJson.version,
|
projVersion: packageJson.version,
|
||||||
projName: packageJson.name
|
projName: packageJson.name
|
||||||
},
|
},
|
||||||
{},
|
{ /* empty */ },
|
||||||
(ejsError: any, mdText: string) => {
|
(ejsError: any, mdText: string) => {
|
||||||
if (ejsError) {
|
if (ejsError) {
|
||||||
console.error(ejsError);
|
console.error(ejsError);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export class CheckEnv {
|
|||||||
_alfrescoJsApi: AlfrescoApi;
|
_alfrescoJsApi: AlfrescoApi;
|
||||||
counter = 0;
|
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() {
|
async checkEnv() {
|
||||||
try {
|
try {
|
||||||
@@ -71,6 +71,6 @@ export class CheckEnv {
|
|||||||
|
|
||||||
sleep(delay: number) {
|
sleep(delay: number) {
|
||||||
const start = new Date().getTime();
|
const start = new Date().getTime();
|
||||||
while (new Date().getTime() < start + delay) {}
|
while (new Date().getTime() < start + delay) { /* empty */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { PluginInterface } from './plugin-model';
|
|||||||
import { AlfrescoApi, GsSitesApi } from '@alfresco/js-api';
|
import { AlfrescoApi, GsSitesApi } from '@alfresco/js-api';
|
||||||
|
|
||||||
export class GovernanceHealth {
|
export class GovernanceHealth {
|
||||||
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
|
constructor(private pluginInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
|
||||||
|
|
||||||
async isRecordManagementAvailable(): Promise<boolean> {
|
async isRecordManagementAvailable(): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -20,18 +20,18 @@ import { logger } from '../logger';
|
|||||||
import { AlfrescoApi } from '@alfresco/js-api';
|
import { AlfrescoApi } from '@alfresco/js-api';
|
||||||
|
|
||||||
export class PluginConfiguration {
|
export class PluginConfiguration {
|
||||||
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) {}
|
constructor(private plugInInfo: PluginInterface, private alfrescoJsApi: AlfrescoApi) { /* empty */ }
|
||||||
|
|
||||||
async getAppConfig(url: string) {
|
async getAppConfig(url: string) {
|
||||||
return this.callCustomApi(url);
|
return this.callCustomApi(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
async callCustomApi(url: string) {
|
async callCustomApi(url: string) {
|
||||||
const pathParams = {};
|
const pathParams = { /* empty */ };
|
||||||
const headerParams = {};
|
const headerParams = { /* empty */ };
|
||||||
const formParams = {};
|
const formParams = { /* empty */ };
|
||||||
const bodyParam = {};
|
const bodyParam = { /* empty */ };
|
||||||
const queryParams = {};
|
const queryParams = { /* empty */ };
|
||||||
const contentTypes = ['application/json'];
|
const contentTypes = ['application/json'];
|
||||||
const accepts = ['application/json'];
|
const accepts = ['application/json'];
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ export class PluginConfiguration {
|
|||||||
return response;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`${this.plugInInfo.host} is not reachable error: `, error);
|
logger.error(`${this.plugInInfo.host} is not reachable error: `, error);
|
||||||
return {};
|
return { /* empty */ };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ export const ACTIVITI_CLOUD_APPS: any = {
|
|||||||
{ role: 'ACTIVITI_ADMIN', groups: [], users: ['superadminuser', 'processadminuser'] },
|
{ role: 'ACTIVITI_ADMIN', groups: [], users: ['superadminuser', 'processadminuser'] },
|
||||||
{ role: 'ACTIVITI_USER', groups: ['hr', 'sales', 'testgroup'], users: ['hruser'] }
|
{ role: 'ACTIVITI_USER', groups: ['hr', 'sales', 'testgroup'], users: ['hruser'] }
|
||||||
],
|
],
|
||||||
infrastructure: { connectors: { restconnector: {} }, bridges: {} },
|
infrastructure: { connectors: { restconnector: { /* empty */ } }, bridges: { /* empty */ } },
|
||||||
enableLocalDevelopment: true,
|
enableLocalDevelopment: true,
|
||||||
variables: {
|
variables: {
|
||||||
'process-runtime-service': {
|
'process-runtime-service': {
|
||||||
|
|||||||
@@ -232,8 +232,8 @@ describe('AspectListDialogComponent', () => {
|
|||||||
|
|
||||||
it('should complete the select stream Cancel button is clicked', (done) => {
|
it('should complete the select stream Cancel button is clicked', (done) => {
|
||||||
data.select.subscribe(
|
data.select.subscribe(
|
||||||
() => {},
|
() => { /* empty */ },
|
||||||
() => {},
|
() => { /* empty */ },
|
||||||
() => done()
|
() => done()
|
||||||
);
|
);
|
||||||
const cancelButton: HTMLButtonElement = fixture.nativeElement.querySelector('#aspect-list-dialog-actions-cancel');
|
const cancelButton: HTMLButtonElement = fixture.nativeElement.querySelector('#aspect-list-dialog-actions-cancel');
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export class AspectListComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
private onDestroy$ = new Subject<boolean>();
|
private onDestroy$ = new Subject<boolean>();
|
||||||
|
|
||||||
constructor(private aspectListService: AspectListService, private nodeApiService: NodesApiService) {}
|
constructor(private aspectListService: AspectListService, private nodeApiService: NodesApiService) { /* empty */ }
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.onDestroy$.next(true);
|
this.onDestroy$.next(true);
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ export const ASPECT_LIST_DIRECTIVES = [AspectListComponent, AspectListDialogComp
|
|||||||
imports: [...ASPECT_LIST_DIRECTIVES],
|
imports: [...ASPECT_LIST_DIRECTIVES],
|
||||||
exports: [...ASPECT_LIST_DIRECTIVES]
|
exports: [...ASPECT_LIST_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class AspectListModule {}
|
export class AspectListModule { /* empty */ }
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export class AspectListService {
|
|||||||
return this._aspectsApi;
|
return this._aspectsApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService) {}
|
constructor(private alfrescoApiService: AlfrescoApiService, private appConfigService: AppConfigService) { /* empty */ }
|
||||||
|
|
||||||
getAspects(): Observable<AspectEntry[]> {
|
getAspects(): Observable<AspectEntry[]> {
|
||||||
const visibleAspectList = this.getVisibleAspects();
|
const visibleAspectList = this.getVisibleAspects();
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class DialogAspectListService {
|
|||||||
private overlayContainer: OverlayContainer,
|
private overlayContainer: OverlayContainer,
|
||||||
private tagService: TagService,
|
private tagService: TagService,
|
||||||
private categoryService: CategoryService
|
private categoryService: CategoryService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
openAspectListDialog(nodeId?: string, selectorAutoFocusedOnClose?: string): Observable<string[]> {
|
openAspectListDialog(nodeId?: string, selectorAutoFocusedOnClose?: string): Observable<string[]> {
|
||||||
const select = new Subject<string[]>();
|
const select = new Subject<string[]>();
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
import { ContentAuthLoaderService } from './content-auth-loader.service';
|
import { ContentAuthLoaderService } from './content-auth-loader.service';
|
||||||
|
|
||||||
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
|
|
||||||
/**
|
/**
|
||||||
* Create a content auth factory
|
* Create a content auth factory
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ describe('Breadcrumb', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should not parse the route when node has no path', () => {
|
it('should not parse the route when node has no path', () => {
|
||||||
const node: any = {};
|
const node: any = { /* empty */ };
|
||||||
expect(component.parseRoute(node)).toEqual([]);
|
expect(component.parseRoute(node)).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ export const BREADCRUMB_DIRECTIVES = [BreadcrumbComponent, DropdownBreadcrumbCom
|
|||||||
imports: [...BREADCRUMB_DIRECTIVES],
|
imports: [...BREADCRUMB_DIRECTIVES],
|
||||||
exports: [...BREADCRUMB_DIRECTIVES]
|
exports: [...BREADCRUMB_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class BreadcrumbModule {}
|
export class BreadcrumbModule { /* empty */ }
|
||||||
|
|||||||
+3
-3
@@ -42,8 +42,8 @@ describe('CategoriesManagementComponent', () => {
|
|||||||
const category4 = new Category({ id: 'test4', name: 'testCat4' });
|
const category4 = new Category({ id: 'test4', name: 'testCat4' });
|
||||||
const resultCat1 = new ResultNode({ id: 'test', name: 'testCat', path: { name: 'general/categories' } });
|
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 resultCat2 = new ResultNode({ id: 'test2', name: 'testCat2', path: { name: 'general/categories' } });
|
||||||
const categoryPagingResponse: CategoryPaging = { list: { pagination: {}, entries: [{ entry: category1 }, { entry: category2 }] } };
|
const categoryPagingResponse: CategoryPaging = { list: { pagination: { /* empty */ }, entries: [{ entry: category1 }, { entry: category2 }] } };
|
||||||
const categorySearchResponse: ResultSetPaging = { list: { pagination: {}, entries: [{ entry: resultCat1 }, { entry: resultCat2 }] } };
|
const categorySearchResponse: ResultSetPaging = { list: { pagination: { /* empty */ }, entries: [{ entry: resultCat1 }, { entry: resultCat2 }] } };
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
@@ -253,7 +253,7 @@ describe('CategoriesManagementComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should display correct message when there are no existing categories', fakeAsync(() => {
|
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');
|
typeCategory('test');
|
||||||
|
|
||||||
const noExistingCategoriesMsg = fixture.debugElement
|
const noExistingCategoriesMsg = fixture.debugElement
|
||||||
|
|||||||
+1
-1
@@ -147,7 +147,7 @@ export class CategoriesManagementComponent implements OnInit, OnDestroy {
|
|||||||
@ViewChild('categoryNameInput')
|
@ViewChild('categoryNameInput')
|
||||||
private categoryNameInputElement: ElementRef;
|
private categoryNameInputElement: ElementRef;
|
||||||
|
|
||||||
constructor(private categoryService: CategoryService) {}
|
constructor(private categoryService: CategoryService) { /* empty */ }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.categoryNameControl.valueChanges
|
this.categoryNameControl.valueChanges
|
||||||
|
|||||||
@@ -23,4 +23,4 @@ import { CategoriesManagementComponent } from './categories-management/categorie
|
|||||||
imports: [CategoriesManagementComponent],
|
imports: [CategoriesManagementComponent],
|
||||||
exports: [CategoriesManagementComponent]
|
exports: [CategoriesManagementComponent]
|
||||||
})
|
})
|
||||||
export class CategoriesModule {}
|
export class CategoriesModule { /* empty */ }
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ describe('CategoryService', () => {
|
|||||||
const fakeParentCategoryId = 'testParentId';
|
const fakeParentCategoryId = 'testParentId';
|
||||||
const fakeCategoryId = 'fakeId';
|
const fakeCategoryId = 'fakeId';
|
||||||
const fakeNodeId = 'fakeNodeId';
|
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 fakeCategoryEntry: CategoryEntry = { entry: { id: 'testId', name: 'testName' } };
|
||||||
const fakeCategoryBody: CategoryBody = { name: 'updatedName' };
|
const fakeCategoryBody: CategoryBody = { name: 'updatedName' };
|
||||||
const fakeCategoriesLinkBodies: CategoryLinkBody[] = [{ categoryId: fakeCategoryId }];
|
const fakeCategoriesLinkBodies: CategoryLinkBody[] = [{ categoryId: fakeCategoryId }];
|
||||||
@@ -79,14 +79,14 @@ describe('CategoryService', () => {
|
|||||||
it('should create subcategory', fakeAsync(() => {
|
it('should create subcategory', fakeAsync(() => {
|
||||||
const createSpy = spyOn(categoryService.categoriesApi, 'createSubcategories').and.returnValue(Promise.resolve(fakeCategoryEntry));
|
const createSpy = spyOn(categoryService.categoriesApi, 'createSubcategories').and.returnValue(Promise.resolve(fakeCategoryEntry));
|
||||||
categoryService.createSubcategories(fakeParentCategoryId, [fakeCategoryEntry.entry]).subscribe(() => {
|
categoryService.createSubcategories(fakeParentCategoryId, [fakeCategoryEntry.entry]).subscribe(() => {
|
||||||
expect(createSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, [fakeCategoryEntry.entry], {});
|
expect(createSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, [fakeCategoryEntry.entry], { /* empty */ });
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should update category', fakeAsync(() => {
|
it('should update category', fakeAsync(() => {
|
||||||
const updateSpy = spyOn(categoryService.categoriesApi, 'updateCategory').and.returnValue(Promise.resolve(fakeCategoryEntry));
|
const updateSpy = spyOn(categoryService.categoriesApi, 'updateCategory').and.returnValue(Promise.resolve(fakeCategoryEntry));
|
||||||
categoryService.updateCategory(fakeParentCategoryId, fakeCategoryBody).subscribe(() => {
|
categoryService.updateCategory(fakeParentCategoryId, fakeCategoryBody).subscribe(() => {
|
||||||
expect(updateSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, fakeCategoryBody, {});
|
expect(updateSpy).toHaveBeenCalledOnceWith(fakeParentCategoryId, fakeCategoryBody, { /* empty */ });
|
||||||
});
|
});
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class CategoryService {
|
|||||||
private apiService: AlfrescoApiService,
|
private apiService: AlfrescoApiService,
|
||||||
private userPreferencesService: UserPreferencesService,
|
private userPreferencesService: UserPreferencesService,
|
||||||
private appConfigService: AppConfigService
|
private appConfigService: AppConfigService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get subcategories of a given parent category
|
* Get subcategories of a given parent category
|
||||||
@@ -85,7 +85,7 @@ export class CategoryService {
|
|||||||
* @returns Observable<CategoryPaging | CategoryEntry>
|
* @returns Observable<CategoryPaging | CategoryEntry>
|
||||||
*/
|
*/
|
||||||
createSubcategories(parentCategoryId: string, payload: CategoryBody[]): 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>
|
* @returns Observable<CategoryEntry>
|
||||||
*/
|
*/
|
||||||
updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry> {
|
updateCategory(categoryId: string, payload: CategoryBody): Observable<CategoryEntry> {
|
||||||
return from(this.categoriesApi.updateCategory(categoryId, payload, {}));
|
return from(this.categoriesApi.updateCategory(categoryId, payload, { /* empty */ }));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ export class FileModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.options = Object.assign(
|
this.options = Object.assign(
|
||||||
{},
|
{ /* empty */ },
|
||||||
{
|
{
|
||||||
newVersion: false
|
newVersion: false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ describe('ContentService', () => {
|
|||||||
|
|
||||||
describe('AllowableOperations', () => {
|
describe('AllowableOperations', () => {
|
||||||
it('should hasAllowableOperations be false if allowableOperation is not present in the node', () => {
|
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();
|
expect(contentService.hasAllowableOperations(permissionNode, 'create')).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ describe('ContentService', () => {
|
|||||||
|
|
||||||
describe('Permissions', () => {
|
describe('Permissions', () => {
|
||||||
it('should havePermission be false if allowableOperation is not present in the node', () => {
|
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();
|
expect(contentService.hasPermissions(permissionNode, 'manager')).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export class ContentService {
|
|||||||
return this._contentApi;
|
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.
|
* Gets a content URL for the given node.
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ export class FavoritesApiService {
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
remapFavoritesData(data: FavoritePaging = {}): NodePaging {
|
remapFavoritesData(data: FavoritePaging = { /* empty */ }): NodePaging {
|
||||||
const pagination = (data?.list?.pagination || {});
|
const pagination = (data?.list?.pagination || { /* empty */ });
|
||||||
const entries: any[] = this
|
const entries: any[] = this
|
||||||
.remapFavoriteEntries(data?.list?.entries || []);
|
.remapFavoriteEntries(data?.list?.entries || []);
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export class NodesApiService {
|
|||||||
return this._nodesApi;
|
return this._nodesApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) {}
|
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) { /* empty */ }
|
||||||
|
|
||||||
private getEntryFromEntity(entity: NodeEntry): Node {
|
private getEntryFromEntity(entity: NodeEntry): Node {
|
||||||
return entity.entry;
|
return entity.entry;
|
||||||
@@ -56,7 +56,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns Node information
|
* @returns Node information
|
||||||
*/
|
*/
|
||||||
getNode(nodeId: string, options: any = {}): Observable<Node> {
|
getNode(nodeId: string, options: any = { /* empty */ }): Observable<Node> {
|
||||||
const defaults = {
|
const defaults = {
|
||||||
include: ['path', 'properties', 'allowableOperations', 'permissions']
|
include: ['path', 'properties', 'allowableOperations', 'permissions']
|
||||||
};
|
};
|
||||||
@@ -75,7 +75,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns List of child items from the folder
|
* @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 = {
|
const defaults = {
|
||||||
maxItems: this.preferences.paginationSize,
|
maxItems: this.preferences.paginationSize,
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
@@ -94,7 +94,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns Details of the new node
|
* @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(
|
return from(this.nodesApi.createNode(parentNodeId, nodeBody, options)).pipe(
|
||||||
map(this.getEntryFromEntity),
|
map(this.getEntryFromEntity),
|
||||||
catchError((err) => throwError(err))
|
catchError((err) => throwError(err))
|
||||||
@@ -109,7 +109,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns Details of the new folder
|
* @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);
|
const body = Object.assign({ nodeType: 'cm:folder' }, nodeBody);
|
||||||
return this.createNode(parentNodeId, body, options);
|
return this.createNode(parentNodeId, body, options);
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns Updated node information
|
* @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 = {
|
const defaults = {
|
||||||
include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition']
|
include: ['path', 'properties', 'allowableOperations', 'permissions', 'definition']
|
||||||
};
|
};
|
||||||
@@ -141,7 +141,7 @@ export class NodesApiService {
|
|||||||
* @param options Optional parameters supported by JS-API
|
* @param options Optional parameters supported by JS-API
|
||||||
* @returns Empty result that notifies when the deletion is complete
|
* @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)));
|
return from(this.nodesApi.deleteNode(nodeId, options)).pipe(catchError((err) => throwError(err)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ export class NodesApiService {
|
|||||||
properties,
|
properties,
|
||||||
relativePath: path
|
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 {
|
private cleanMetadataFromSemicolon(nodeEntry: NodeEntry): NodeMetadata {
|
||||||
const metadata = {};
|
const metadata = { /* empty */ };
|
||||||
|
|
||||||
if (nodeEntry?.entry.properties) {
|
if (nodeEntry?.entry.properties) {
|
||||||
for (const key in nodeEntry.entry.properties) {
|
for (const key in nodeEntry.entry.properties) {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ describe('PeopleContentService', () => {
|
|||||||
it('should be able to throw an error if createPerson api failed', (done) => {
|
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')));
|
spyOn(peopleContentService.peopleApi, 'createPerson').and.returnValue(Promise.reject(new Error('failed to create new person')));
|
||||||
peopleContentService.createPerson(createNewPersonMock).subscribe(
|
peopleContentService.createPerson(createNewPersonMock).subscribe(
|
||||||
() => {},
|
() => { /* empty */ },
|
||||||
(error: Error) => {
|
(error: Error) => {
|
||||||
expect(error.message).toEqual('failed to create new person');
|
expect(error.message).toEqual('failed to create new person');
|
||||||
done();
|
done();
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export class RenditionService {
|
|||||||
return this._versionsApi;
|
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 {
|
getRenditionUrl(nodeId: string, type: string, renditionExists: boolean): string {
|
||||||
return renditionExists && type !== RenditionService.ContentGroup.IMAGE
|
return renditionExists && type !== RenditionService.ContentGroup.IMAGE
|
||||||
@@ -114,7 +114,7 @@ export class RenditionService {
|
|||||||
try {
|
try {
|
||||||
await this.renditionsApi.createRendition(nodeId, { id: renditionId });
|
await this.renditionsApi.createRendition(nodeId, { id: renditionId });
|
||||||
rendition = await this.waitRendition(nodeId, renditionId, 0);
|
rendition = await this.waitRendition(nodeId, renditionId, 0);
|
||||||
} catch {}
|
} catch { /* empty */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new Promise<RenditionEntry>((resolve) => resolve(rendition));
|
return new Promise<RenditionEntry>((resolve) => resolve(rendition));
|
||||||
@@ -292,6 +292,6 @@ export class RenditionService {
|
|||||||
: type;
|
: type;
|
||||||
this.printFile(url, printType);
|
this.printFile(url, printType);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { /* empty */ });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ describe('RenditionService', () => {
|
|||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
providers: [
|
providers: [
|
||||||
RenditionService,
|
RenditionService,
|
||||||
{ provide: AlfrescoApiService, useValue: {} },
|
{ provide: AlfrescoApiService, useValue: { /* empty */ } },
|
||||||
{ provide: TranslationService, useValue: {} },
|
{ provide: TranslationService, useValue: { /* empty */ } },
|
||||||
{ provide: ViewUtilService, useValue: {} },
|
{ provide: ViewUtilService, useValue: { /* empty */ } },
|
||||||
{
|
{
|
||||||
provide: RenditionsApi,
|
provide: RenditionsApi,
|
||||||
useValue: {
|
useValue: {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export class SitesService {
|
|||||||
return this._sitesApi;
|
return this._sitesApi;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private apiService: AlfrescoApiService) {}
|
constructor(private apiService: AlfrescoApiService) { /* empty */ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a site
|
* Create a site
|
||||||
@@ -61,12 +61,12 @@ export class SitesService {
|
|||||||
* @param opts Options supported by JS-API
|
* @param opts Options supported by JS-API
|
||||||
* @returns List of sites
|
* @returns List of sites
|
||||||
*/
|
*/
|
||||||
getSites(opts: any = {}): Observable<SitePaging> {
|
getSites(opts: any = { /* empty */ }): Observable<SitePaging> {
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
include: ['properties']
|
include: ['properties']
|
||||||
};
|
};
|
||||||
const queryOptions = Object.assign({}, defaultOptions, opts);
|
const queryOptions = Object.assign({ /* empty */ }, defaultOptions, opts);
|
||||||
return from(this.sitesApi.listSites(queryOptions));
|
return from(this.sitesApi.listSites(queryOptions));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ export class SitesService {
|
|||||||
* @returns Null response notifying when the operation is complete
|
* @returns Null response notifying when the operation is complete
|
||||||
*/
|
*/
|
||||||
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
|
deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any> {
|
||||||
const options: any = {};
|
const options: any = { /* empty */ };
|
||||||
options.permanent = permanentFlag;
|
options.permanent = permanentFlag;
|
||||||
return from(this.sitesApi.deleteSite(siteId, options));
|
return from(this.sitesApi.deleteSite(siteId, options));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ describe('UploadService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should not use "versioningEnabled" if not explicitly provided', () => {
|
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.addToQueue(model);
|
||||||
service.uploadFilesInTheQueue();
|
service.uploadFilesInTheQueue();
|
||||||
@@ -483,7 +483,7 @@ describe('UploadService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should skip files if they are in an excluded folder when path is in options', () => {
|
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 file2: any = { name: 'readme.md', file: { webkitRelativePath: '/test/' } };
|
||||||
const result = service.addToQueue(file1, file2);
|
const result = service.addToQueue(file1, file2);
|
||||||
expect(result.length).toBe(1);
|
expect(result.length).toBe(1);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export class UploadService {
|
|||||||
fileUploadDeleted: Subject<FileUploadDeleteEvent> = new Subject<FileUploadDeleteEvent>();
|
fileUploadDeleted: Subject<FileUploadDeleteEvent> = new Subject<FileUploadDeleteEvent>();
|
||||||
fileDeleted: Subject<string> = new Subject<string>();
|
fileDeleted: Subject<string> = new Subject<string>();
|
||||||
|
|
||||||
private cache: { [key: string]: any } = {};
|
private cache: { [key: string]: any } = { /* empty */ };
|
||||||
private totalComplete: number = 0;
|
private totalComplete: number = 0;
|
||||||
private totalAborted: number = 0;
|
private totalAborted: number = 0;
|
||||||
private totalError: number = 0;
|
private totalError: number = 0;
|
||||||
@@ -84,7 +84,7 @@ export class UploadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clearCache() {
|
clearCache() {
|
||||||
this.cache = {};
|
this.cache = { /* empty */ };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -296,7 +296,7 @@ export class UploadService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => { /* empty */ });
|
||||||
|
|
||||||
return promise;
|
return promise;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -81,10 +81,10 @@ describe('ContentMetadataCardComponent', () => {
|
|||||||
node = {
|
node = {
|
||||||
aspectNames: [],
|
aspectNames: [],
|
||||||
nodeType: '',
|
nodeType: '',
|
||||||
content: {},
|
content: { /* empty */ },
|
||||||
properties: {},
|
properties: { /* empty */ },
|
||||||
createdByUser: {},
|
createdByUser: { /* empty */ },
|
||||||
modifiedByUser: {},
|
modifiedByUser: { /* empty */ },
|
||||||
id: 'some-id'
|
id: 'some-id'
|
||||||
} as Node;
|
} as Node;
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ describe('ContentMetadataCardComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const button = fixture.debugElement.query(By.css('[data-automation-id="meta-data-card-edit-aspect"]'));
|
const button = fixture.debugElement.query(By.css('[data-automation-id="meta-data-card-edit-aspect"]'));
|
||||||
button.triggerEventHandler('click', {});
|
button.triggerEventHandler('click', { /* empty */ });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(nodeAspectService.updateNodeAspects).toHaveBeenCalledWith('fake-node-id');
|
expect(nodeAspectService.updateNodeAspects).toHaveBeenCalledWith('fake-node-id');
|
||||||
|
|||||||
+19
-19
@@ -86,7 +86,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
|
|
||||||
const category1 = new Category({ id: 'test', name: 'testCat' });
|
const category1 = new Category({ id: 'test', name: 'testCat' });
|
||||||
const category2 = new Category({ id: 'test2', name: 'testCat2' });
|
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 findTagElements = async (): Promise<string[]> => {
|
||||||
const matChipHarnessList = await TestbedHarnessEnvironment.loader(fixture).getAllHarnesses(
|
const matChipHarnessList = await TestbedHarnessEnvironment.loader(fixture).getAllHarnesses(
|
||||||
@@ -227,18 +227,18 @@ describe('ContentMetadataComponent', () => {
|
|||||||
id: 'node-id',
|
id: 'node-id',
|
||||||
aspectNames: [],
|
aspectNames: [],
|
||||||
nodeType: 'cm:node',
|
nodeType: 'cm:node',
|
||||||
content: {},
|
content: { /* empty */ },
|
||||||
properties: {},
|
properties: { /* empty */ },
|
||||||
createdByUser: {},
|
createdByUser: { /* empty */ },
|
||||||
modifiedByUser: {}
|
modifiedByUser: { /* empty */ }
|
||||||
} as Node;
|
} as Node;
|
||||||
|
|
||||||
folderNode = {
|
folderNode = {
|
||||||
id: 'folder-id',
|
id: 'folder-id',
|
||||||
aspectNames: [],
|
aspectNames: [],
|
||||||
nodeType: '',
|
nodeType: '',
|
||||||
createdByUser: {},
|
createdByUser: { /* empty */ },
|
||||||
modifiedByUser: {}
|
modifiedByUser: { /* empty */ }
|
||||||
} as Node;
|
} as Node;
|
||||||
|
|
||||||
component.node = node;
|
component.node = node;
|
||||||
@@ -314,7 +314,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
])
|
])
|
||||||
);
|
);
|
||||||
updateService.itemUpdated$.next({
|
updateService.itemUpdated$.next({
|
||||||
changed: {}
|
changed: { /* empty */ }
|
||||||
} as UpdateNotification);
|
} as UpdateNotification);
|
||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
tick(500);
|
tick(500);
|
||||||
@@ -369,7 +369,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
component.readOnly = false;
|
component.readOnly = false;
|
||||||
spyOn(tagService, 'removeTag').and.returnValue(of(undefined));
|
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');
|
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(() => {
|
it('should retrigger the load of the properties when the content type has changed', fakeAsync(() => {
|
||||||
component.readOnly = false;
|
component.readOnly = false;
|
||||||
const property = { key: 'nodeType', value: 'ft:sbiruli' } as CardViewBaseItemModel;
|
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(contentMetadataService, 'openConfirmDialog').and.returnValue(of(true));
|
||||||
spyOn(updateService, 'updateNodeAspect');
|
spyOn(updateService, 'updateNodeAspect');
|
||||||
spyOn(nodesApiService, 'updateNode').and.returnValue(of(expectedNode));
|
spyOn(nodesApiService, 'updateNode').and.returnValue(of(expectedNode));
|
||||||
@@ -1198,7 +1198,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
describe('events', () => {
|
describe('events', () => {
|
||||||
it('should not propagate the event on left arrows press', () => {
|
it('should not propagate the event on left arrows press', () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const event = { keyCode: 37, stopPropagation: () => {} };
|
const event = { keyCode: 37, stopPropagation: () => { /* empty */ } };
|
||||||
spyOn(event, 'stopPropagation').and.stub();
|
spyOn(event, 'stopPropagation').and.stub();
|
||||||
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
||||||
element.triggerEventHandler('keydown', event);
|
element.triggerEventHandler('keydown', event);
|
||||||
@@ -1207,7 +1207,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
|
|
||||||
it('should not propagate the event on right arrows press', () => {
|
it('should not propagate the event on right arrows press', () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const event = { keyCode: 39, stopPropagation: () => {} };
|
const event = { keyCode: 39, stopPropagation: () => { /* empty */ } };
|
||||||
spyOn(event, 'stopPropagation').and.stub();
|
spyOn(event, 'stopPropagation').and.stub();
|
||||||
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
||||||
element.triggerEventHandler('keydown', event);
|
element.triggerEventHandler('keydown', event);
|
||||||
@@ -1216,7 +1216,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
|
|
||||||
it('should propagate the event on other keys press', () => {
|
it('should propagate the event on other keys press', () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const event = { keyCode: 40, stopPropagation: () => {} };
|
const event = { keyCode: 40, stopPropagation: () => { /* empty */ } };
|
||||||
spyOn(event, 'stopPropagation').and.stub();
|
spyOn(event, 'stopPropagation').and.stub();
|
||||||
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
const element = fixture.debugElement.query(By.css('adf-card-view'));
|
||||||
element.triggerEventHandler('keydown', event);
|
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 () => {
|
it('should not render tags after loading tags in ngOnChanges if node is not changed', async () => {
|
||||||
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
|
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
|
||||||
component.ngOnChanges({});
|
component.ngOnChanges({ /* empty */ });
|
||||||
|
|
||||||
expandTagsPanel();
|
expandTagsPanel();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -1321,7 +1321,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
toggleEditModeForTags();
|
toggleEditModeForTags();
|
||||||
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
|
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
|
||||||
changed: {}
|
changed: { /* empty */ }
|
||||||
} as UpdateNotification);
|
} as UpdateNotification);
|
||||||
tick(500);
|
tick(500);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -1393,7 +1393,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
const tagPaging = mockTagPaging();
|
const tagPaging = mockTagPaging();
|
||||||
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
|
spyOn(tagService, 'getTagsByNodeId').and.returnValue(of(tagPaging));
|
||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
spyOn(tagService, 'removeTag').and.returnValue(throwError({}));
|
spyOn(tagService, 'removeTag').and.returnValue(throwError({ /* empty */ }));
|
||||||
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
|
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
|
||||||
const tagName1 = tagPaging.list.entries[0].entry.tag;
|
const tagName1 = tagPaging.list.entries[0].entry.tag;
|
||||||
const tagName2 = 'New tag 3';
|
const tagName2 = 'New tag 3';
|
||||||
@@ -1503,7 +1503,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should not reload categories in ngOnChanges if node is not changed', () => {
|
it('should not reload categories in ngOnChanges if node is not changed', () => {
|
||||||
component.ngOnChanges({});
|
component.ngOnChanges({ /* empty */ });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expandCategoriesPanel();
|
expandCategoriesPanel();
|
||||||
@@ -1514,7 +1514,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
component.readOnly = false;
|
component.readOnly = false;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
|
TestBed.inject(CardViewContentUpdateService).itemUpdated$.next({
|
||||||
changed: {}
|
changed: { /* empty */ }
|
||||||
} as UpdateNotification);
|
} as UpdateNotification);
|
||||||
tick(500);
|
tick(500);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
@@ -1593,7 +1593,7 @@ describe('ContentMetadataComponent', () => {
|
|||||||
spyOn(tagService, 'removeTag').and.returnValue(EMPTY);
|
spyOn(tagService, 'removeTag').and.returnValue(EMPTY);
|
||||||
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
|
spyOn(tagService, 'assignTagsToNode').and.returnValue(EMPTY);
|
||||||
spyOn(categoryService, 'unlinkNodeFromCategory').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');
|
updateService.update(property, 'updated-value');
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -154,7 +154,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
basicProperties$: Observable<CardViewItem[]>;
|
basicProperties$: Observable<CardViewItem[]>;
|
||||||
groupedProperties$: Observable<CardViewGroup[]>;
|
groupedProperties$: Observable<CardViewGroup[]>;
|
||||||
|
|
||||||
changedProperties = {};
|
changedProperties = { /* empty */ };
|
||||||
hasMetadataChanged = false;
|
hasMetadataChanged = false;
|
||||||
assignedCategories: Category[] = [];
|
assignedCategories: Category[] = [];
|
||||||
categories: Category[] = [];
|
categories: Category[] = [];
|
||||||
@@ -238,7 +238,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
statusCode = JSON.parse(error.message).error.statusCode;
|
statusCode = JSON.parse(error.message).error.statusCode;
|
||||||
} catch {}
|
} catch { /* empty */ }
|
||||||
|
|
||||||
let message = `METADATA.ERRORS.${statusCode}`;
|
let message = `METADATA.ERRORS.${statusCode}`;
|
||||||
|
|
||||||
@@ -327,7 +327,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
revertChanges() {
|
revertChanges() {
|
||||||
this.changedProperties = {};
|
this.changedProperties = { /* empty */ };
|
||||||
this.hasMetadataChanged = false;
|
this.hasMetadataChanged = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -393,8 +393,8 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
private updateNode() {
|
private updateNode() {
|
||||||
forkJoin({
|
forkJoin({
|
||||||
updatedNode: this.nodesApiService.updateNode(this.node.id, this.changedProperties),
|
updatedNode: this.nodesApiService.updateNode(this.node.id, this.changedProperties),
|
||||||
...(this.displayTags ? this.saveTags() : {}),
|
...(this.displayTags ? this.saveTags() : { /* empty */ }),
|
||||||
...(this.displayCategories ? this.saveCategories() : {})
|
...(this.displayCategories ? this.saveCategories() : { /* empty */ })
|
||||||
})
|
})
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError((err) => {
|
catchError((err) => {
|
||||||
@@ -433,7 +433,7 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
|
|
||||||
private updateUndefinedNodeProperties(node: Node): void {
|
private updateUndefinedNodeProperties(node: Node): void {
|
||||||
if (!node.properties) {
|
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> } {
|
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) {
|
if (this.categories) {
|
||||||
this.assignedCategories.forEach((assignedCategory) => {
|
this.assignedCategories.forEach((assignedCategory) => {
|
||||||
if (this.categories.every((category) => category.name !== assignedCategory.name)) {
|
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> } {
|
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) {
|
if (this.tags) {
|
||||||
this.assignedTagsEntries.forEach((tagEntry) => {
|
this.assignedTagsEntries.forEach((tagEntry) => {
|
||||||
if (!this.tags.some((tag) => tagEntry.entry.tag === tag)) {
|
if (!this.tags.some((tag) => tagEntry.entry.tag === tag)) {
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ export const CONTENT_METADATA_DIRECTIVES = [ContentMetadataComponent, ContentMet
|
|||||||
imports: [...CONTENT_METADATA_DIRECTIVES],
|
imports: [...CONTENT_METADATA_DIRECTIVES],
|
||||||
exports: [...CONTENT_METADATA_DIRECTIVES]
|
exports: [...CONTENT_METADATA_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class ContentMetadataModule {}
|
export class ContentMetadataModule { /* empty */ }
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ describe('AspectOrientedConfigService', () => {
|
|||||||
const testCases: TestCase[] = [
|
const testCases: TestCase[] = [
|
||||||
{
|
{
|
||||||
name: 'Empty config',
|
name: 'Empty config',
|
||||||
config: {},
|
config: { /* empty */ },
|
||||||
expectations: []
|
expectations: []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ export class AspectOrientedConfigService implements ContentMetadataConfig {
|
|||||||
Object.keys(properties).map((propertyName) => this.setReadOnlyProperty(properties[propertyName]));
|
Object.keys(properties).map((propertyName) => this.setReadOnlyProperty(properties[propertyName]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.assign({}, propertyGroup, {
|
return Object.assign({ /* empty */ }, propertyGroup, {
|
||||||
properties: Object.keys(properties).map((propertyName) => {
|
properties: Object.keys(properties).map((propertyName) => {
|
||||||
if (this.isPropertyReadOnly(propertyName)) {
|
if (this.isPropertyReadOnly(propertyName)) {
|
||||||
this.setReadOnlyProperty(properties[propertyName]);
|
this.setReadOnlyProperty(properties[propertyName]);
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ describe('ContentMetadataConfigFactory', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: LogService, useValue: {
|
provide: LogService, useValue: {
|
||||||
error: () => {}
|
error: () => { /* empty */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ const DEFAULT_PRESET_NAME = 'default';
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ContentMetadataConfigFactory {
|
export class ContentMetadataConfigFactory {
|
||||||
constructor(private appConfigService: AppConfigService, private logService: LogService) {}
|
constructor(private appConfigService: AppConfigService, private logService: LogService) { /* empty */ }
|
||||||
|
|
||||||
public get(presetName: string = 'default'): ContentMetadataConfig {
|
public get(presetName: string = 'default'): ContentMetadataConfig {
|
||||||
let presetConfig: PresetConfig;
|
let presetConfig: PresetConfig;
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ export class IndifferentConfigService implements ContentMetadataConfig {
|
|||||||
const propertyGroup = propertyGroups[groupName];
|
const propertyGroup = propertyGroups[groupName];
|
||||||
const properties = propertyGroup.properties;
|
const properties = propertyGroup.properties;
|
||||||
|
|
||||||
return Object.assign({}, propertyGroup, {
|
return Object.assign({ /* empty */ }, propertyGroup, {
|
||||||
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
|
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@ export class LayoutOrientedConfigService implements ContentMetadataConfig {
|
|||||||
const propertyGroup = propertyGroups[groupName];
|
const propertyGroup = propertyGroups[groupName];
|
||||||
const properties = propertyGroup.properties;
|
const properties = propertyGroup.properties;
|
||||||
|
|
||||||
return Object.assign({}, propertyGroup, {
|
return Object.assign({ /* empty */ }, propertyGroup, {
|
||||||
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
|
properties: Object.keys(properties).map((propertyName) => properties[propertyName])
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
import { PropertyGroup, Property, PropertyGroupContainer } from '../../interfaces/content-metadata.interfaces';
|
import { PropertyGroup, Property, PropertyGroupContainer } from '../../interfaces/content-metadata.interfaces';
|
||||||
|
|
||||||
const emptyGroup = {
|
const emptyGroup = {
|
||||||
properties: {}
|
properties: { /* empty */ }
|
||||||
};
|
};
|
||||||
|
|
||||||
const convertObjectToArray = (object: any): Property[] => Object.keys(object).map((key) => object[key]);
|
const convertObjectToArray = (object: any): Property[] => Object.keys(object).map((key) => object[key]);
|
||||||
|
|||||||
+3
-3
@@ -142,7 +142,7 @@ describe('ContentTypePropertyService', () => {
|
|||||||
nodeType: 'fk:nodeType',
|
nodeType: 'fk:nodeType',
|
||||||
createdByUser: { displayName: 'test-user' },
|
createdByUser: { displayName: 'test-user' },
|
||||||
modifiedByUser: { displayName: 'test-user-modified' },
|
modifiedByUser: { displayName: 'test-user-modified' },
|
||||||
properties: {}
|
properties: { /* empty */ }
|
||||||
} as Node;
|
} as Node;
|
||||||
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(false);
|
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(false);
|
||||||
service.getContentTypeCardItem(fakeNode).subscribe((items: CardViewItem[]) => {
|
service.getContentTypeCardItem(fakeNode).subscribe((items: CardViewItem[]) => {
|
||||||
@@ -165,7 +165,7 @@ describe('ContentTypePropertyService', () => {
|
|||||||
nodeType: 'fn:fakenode',
|
nodeType: 'fn:fakenode',
|
||||||
createdByUser: { displayName: 'test-user' },
|
createdByUser: { displayName: 'test-user' },
|
||||||
modifiedByUser: { displayName: 'test-user-modified' },
|
modifiedByUser: { displayName: 'test-user-modified' },
|
||||||
properties: {}
|
properties: { /* empty */ }
|
||||||
} as Node;
|
} as Node;
|
||||||
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
|
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
|
||||||
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContent));
|
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContent));
|
||||||
@@ -190,7 +190,7 @@ describe('ContentTypePropertyService', () => {
|
|||||||
nodeType: 'fn:fakenode',
|
nodeType: 'fn:fakenode',
|
||||||
createdByUser: { displayName: 'test-user' },
|
createdByUser: { displayName: 'test-user' },
|
||||||
modifiedByUser: { displayName: 'test-user-modified' },
|
modifiedByUser: { displayName: 'test-user-modified' },
|
||||||
properties: {}
|
properties: { /* empty */ }
|
||||||
} as Node;
|
} as Node;
|
||||||
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
|
spyOn(versionCompatibilityService, 'isVersionSupported').and.returnValue(true);
|
||||||
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContentWithProperties));
|
spyOn(contentTypeService, 'getContentTypeByPrefix').and.returnValue(of(mockContentWithProperties));
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ describe('PropertyDescriptorLoaderService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should load the groups passed by paramter', (done) => {
|
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'])
|
service.load(['exif:exif', 'cm:content', 'custom:custom'])
|
||||||
.subscribe(() => {
|
.subscribe(() => {
|
||||||
|
|||||||
+2
-2
@@ -47,8 +47,8 @@ export class PropertyDescriptorsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private convertToObject(propertyGroupsArray: PropertyGroup[]): PropertyGroupContainer {
|
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
|
[propertyGroup.name]: propertyGroup
|
||||||
}), {});
|
}), { /* empty */ });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -104,7 +104,7 @@ describe('PropertyGroupTranslatorService', () => {
|
|||||||
|
|
||||||
it('should translate EVERY property in EVERY group properly', () => {
|
it('should translate EVERY property in EVERY group properly', () => {
|
||||||
propertyGroups.push(
|
propertyGroups.push(
|
||||||
Object.assign({}, propertyGroup, {
|
Object.assign({ /* empty */ }, propertyGroup, {
|
||||||
properties: [
|
properties: [
|
||||||
{
|
{
|
||||||
name: 'FAS:PLAGUE',
|
name: 'FAS:PLAGUE',
|
||||||
@@ -117,7 +117,7 @@ describe('PropertyGroupTranslatorService', () => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
Object.assign({}, propertyGroup, {
|
Object.assign({ /* empty */ }, propertyGroup, {
|
||||||
properties: [
|
properties: [
|
||||||
{
|
{
|
||||||
name: 'FAS:ALOY',
|
name: 'FAS:ALOY',
|
||||||
@@ -152,7 +152,7 @@ describe('PropertyGroupTranslatorService', () => {
|
|||||||
|
|
||||||
propertyValues = { 'FAS:PLAGUE': 'The Chariot Line' };
|
propertyValues = { 'FAS:PLAGUE': 'The Chariot Line' };
|
||||||
|
|
||||||
propertyGroups.push(Object.assign({}, propertyGroup));
|
propertyGroups.push(Object.assign({ /* empty */ }, propertyGroup));
|
||||||
|
|
||||||
service.translateToCardViewGroups(propertyGroups, propertyValues, null);
|
service.translateToCardViewGroups(propertyGroups, propertyValues, null);
|
||||||
expect(logServiceError).toHaveBeenCalledWith('Unknown type for mapping: daemonic:scorcher');
|
expect(logServiceError).toHaveBeenCalledWith('Unknown type for mapping: daemonic:scorcher');
|
||||||
|
|||||||
+1
-1
@@ -65,7 +65,7 @@ export class PropertyGroupTranslatorService {
|
|||||||
|
|
||||||
public translateToCardViewGroups(propertyGroups: OrganisedPropertyGroup[], propertyValues, definition: Definition): CardViewGroup[] {
|
public translateToCardViewGroups(propertyGroups: OrganisedPropertyGroup[], propertyValues, definition: Definition): CardViewGroup[] {
|
||||||
return propertyGroups.map((propertyGroup) => {
|
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.properties = this.translateArray(propertyGroup.properties, propertyValues, definition);
|
||||||
translatedPropertyGroup.editable = translatedPropertyGroup.properties.some((property) => property.editable);
|
translatedPropertyGroup.editable = translatedPropertyGroup.properties.some((property) => property.editable);
|
||||||
return translatedPropertyGroup;
|
return translatedPropertyGroup;
|
||||||
|
|||||||
+7
-7
@@ -76,7 +76,7 @@ describe('ContentNodeDialogService', () => {
|
|||||||
afterOpenObservable = new Subject<any>();
|
afterOpenObservable = new Subject<any>();
|
||||||
spyOnDialogOpen = spyOn(materialDialog, 'open').and.returnValue({
|
spyOnDialogOpen = spyOn(materialDialog, 'open').and.returnValue({
|
||||||
afterOpen: () => afterOpenObservable,
|
afterOpen: () => afterOpenObservable,
|
||||||
afterClosed: () => of({}),
|
afterClosed: () => of({ /* empty */ }),
|
||||||
componentInstance: {
|
componentInstance: {
|
||||||
error: new Subject<any>()
|
error: new Subject<any>()
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ describe('ContentNodeDialogService', () => {
|
|||||||
} as Node;
|
} as Node;
|
||||||
|
|
||||||
service.openLockNodeDialog(testNode).subscribe(
|
service.openLockNodeDialog(testNode).subscribe(
|
||||||
() => {},
|
() => { /* empty */ },
|
||||||
(error) => {
|
(error) => {
|
||||||
expect(error).toBe('OPERATION.FAIL.NODE.NO_PERMISSION');
|
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', () => {
|
it('should NOT be able to open the dialog when node has NOT permission', () => {
|
||||||
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, 'noperm').subscribe(
|
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, 'noperm').subscribe(
|
||||||
() => {},
|
() => { /* empty */ },
|
||||||
(error) => {
|
(error) => {
|
||||||
expect(spyOnDialogOpen).not.toHaveBeenCalled();
|
expect(spyOnDialogOpen).not.toHaveBeenCalled();
|
||||||
expect(JSON.parse(error.message).error.statusCode).toBe(403);
|
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(() => {
|
it('should be able to open the dialog using a folder id', fakeAsync(() => {
|
||||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
||||||
service.openFileBrowseDialogByFolderId('fake-folder-id').subscribe(() => {});
|
service.openFileBrowseDialogByFolderId('fake-folder-id').subscribe(() => { /* empty */ });
|
||||||
tick();
|
tick();
|
||||||
expect(spyOnDialogOpen).toHaveBeenCalled();
|
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(() => {
|
it('should be able to open the dialog for files using the first user site', fakeAsync(() => {
|
||||||
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
|
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
|
||||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
||||||
service.openFileBrowseDialogBySite().subscribe(() => {});
|
service.openFileBrowseDialogBySite().subscribe(() => { /* empty */ });
|
||||||
tick();
|
tick();
|
||||||
expect(spyOnDialogOpen).toHaveBeenCalled();
|
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(() => {
|
it('should be able to open the dialog for folder using the first user site', fakeAsync(() => {
|
||||||
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
|
spyOn(sitesService, 'getSites').and.returnValue(of(fakeSiteList));
|
||||||
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
spyOn(documentListService, 'getFolderNode').and.returnValue(of(fakeNodeEntry));
|
||||||
service.openFolderBrowseDialogBySite().subscribe(() => {});
|
service.openFolderBrowseDialogBySite().subscribe(() => { /* empty */ });
|
||||||
tick();
|
tick();
|
||||||
expect(spyOnDialogOpen).toHaveBeenCalled();
|
expect(spyOnDialogOpen).toHaveBeenCalled();
|
||||||
}));
|
}));
|
||||||
@@ -188,7 +188,7 @@ describe('ContentNodeDialogService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
spyOnDialogOpen.and.callFake((_: any, config: any) => {
|
spyOnDialogOpen.and.callFake((_: any, config: any) => {
|
||||||
testContentNodeSelectorComponentData = config.data;
|
testContentNodeSelectorComponentData = config.data;
|
||||||
return { componentInstance: {}, afterClosed: () => of(null) };
|
return { componentInstance: { /* empty */ }, afterClosed: () => of(null) };
|
||||||
});
|
});
|
||||||
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, '!update');
|
service.openCopyMoveDialog(NodeAction.CHOOSE, fakeNode, '!update');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export class ContentNodeDialogService {
|
|||||||
private siteService: SitesService,
|
private siteService: SitesService,
|
||||||
private translation: TranslationService,
|
private translation: TranslationService,
|
||||||
private thumbnailService: ThumbnailService
|
private thumbnailService: ThumbnailService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a file browser at a chosen folder location.
|
* Opens a file browser at a chosen folder location.
|
||||||
|
|||||||
+6
-6
@@ -132,7 +132,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
of(
|
of(
|
||||||
new NodePaging({
|
new NodePaging({
|
||||||
list: {
|
list: {
|
||||||
pagination: {},
|
pagination: { /* empty */ },
|
||||||
entries: [],
|
entries: [],
|
||||||
source: new Node()
|
source: new Node()
|
||||||
}
|
}
|
||||||
@@ -241,7 +241,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should update the breadcrumb when changing to a custom site', async () => {
|
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);
|
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(() => {
|
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.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();
|
fixture.detectChanges();
|
||||||
|
|
||||||
typeToSearchBox('search-term');
|
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(() => {
|
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');
|
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(() => {
|
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.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();
|
fixture.detectChanges();
|
||||||
|
|
||||||
@@ -666,7 +666,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
const clearButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-search-clear"]'));
|
||||||
expect(clearButton).not.toBeNull();
|
expect(clearButton).not.toBeNull();
|
||||||
clearButton.triggerEventHandler('click', {});
|
clearButton.triggerEventHandler('click', { /* empty */ });
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
const documentList = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-document-list"]'));
|
||||||
|
|||||||
+6
-6
@@ -367,15 +367,15 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
|
|
||||||
describe('Chosen node', () => {
|
describe('Chosen node', () => {
|
||||||
const entry: Node = { id: 'fakeid' } as Node;
|
const entry: Node = { id: 'fakeid' } as Node;
|
||||||
const nodePage: NodePaging = { list: { pagination: {} } };
|
const nodePage: NodePaging = { list: { pagination: { /* empty */ } } };
|
||||||
let hasAllowableOperations;
|
let hasAllowableOperations;
|
||||||
const fakeFolderNode = { id: 'fakeNodeId', isFolder: true } as Node;
|
const fakeFolderNode = { id: 'fakeNodeId', isFolder: true } as Node;
|
||||||
|
|
||||||
const returnHasPermission = (): boolean => hasAllowableOperations;
|
const returnHasPermission = (): boolean => hasAllowableOperations;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const schema = [{}] as DataColumn[];
|
const schema = [{ /* empty */ }] as DataColumn[];
|
||||||
const rows = [{}, {}] as DataRow[];
|
const rows = [{ /* empty */ }, { /* empty */ }] as DataRow[];
|
||||||
component.documentList.data = new ShareDataTableAdapter(thumbnailService, contentService, schema);
|
component.documentList.data = new ShareDataTableAdapter(thumbnailService, contentService, schema);
|
||||||
spyOn(component.documentList.data, 'getRows').and.returnValue(rows);
|
spyOn(component.documentList.data, 'getRows').and.returnValue(rows);
|
||||||
spyOn(sitesService, 'getSites').and.returnValue(of(new SitePaging({ list: new SitePagingList({ entries: [] }) })));
|
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 () => {
|
it('should be empty when the chosenNode is reset', async () => {
|
||||||
hasAllowableOperations = true;
|
hasAllowableOperations = true;
|
||||||
component.onCurrentSelection([{ entry: {} as Node }]);
|
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
|
||||||
|
|
||||||
component.select.subscribe((nodes) => {
|
component.select.subscribe((nodes) => {
|
||||||
expect(nodes).toBeDefined();
|
expect(nodes).toBeDefined();
|
||||||
@@ -536,7 +536,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
|
|
||||||
it('should be null when the chosenNode is reset', async () => {
|
it('should be null when the chosenNode is reset', async () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.onCurrentSelection([{ entry: {} as Node }]);
|
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
|
||||||
|
|
||||||
component.select.subscribe((nodes) => {
|
component.select.subscribe((nodes) => {
|
||||||
expect(nodes).toBeDefined();
|
expect(nodes).toBeDefined();
|
||||||
@@ -572,7 +572,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
|
|||||||
|
|
||||||
it('should be null when the chosenNode is reset', async () => {
|
it('should be null when the chosenNode is reset', async () => {
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
component.onCurrentSelection([{ entry: {} as Node }]);
|
component.onCurrentSelection([{ entry: { /* empty */ } as Node }]);
|
||||||
|
|
||||||
component.select.subscribe((nodes) => {
|
component.select.subscribe((nodes) => {
|
||||||
expect(nodes).toBeDefined();
|
expect(nodes).toBeDefined();
|
||||||
|
|||||||
+1
-1
@@ -313,7 +313,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
|
|||||||
private uploadService: UploadService,
|
private uploadService: UploadService,
|
||||||
private sitesService: SitesService,
|
private sitesService: SitesService,
|
||||||
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService
|
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService
|
||||||
) {}
|
) { /* empty */ }
|
||||||
|
|
||||||
set chosenNode(value: Node[]) {
|
set chosenNode(value: Node[]) {
|
||||||
this._chosenNode = value;
|
this._chosenNode = value;
|
||||||
|
|||||||
+1
-1
@@ -190,7 +190,7 @@ describe('ContentNodeSelectorComponent', () => {
|
|||||||
|
|
||||||
it('should close the dialog', () => {
|
it('should close the dialog', () => {
|
||||||
let cancelButton = fixture.debugElement.query(By.css('[data-automation-id="content-node-selector-actions-cancel"]'));
|
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();
|
expect(dialog.close).toHaveBeenCalled();
|
||||||
|
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|||||||
@@ -33,4 +33,4 @@ export const CONTENT_NODE_SELECTOR_DIRECTIVES = [
|
|||||||
imports: [...CONTENT_NODE_SELECTOR_DIRECTIVES],
|
imports: [...CONTENT_NODE_SELECTOR_DIRECTIVES],
|
||||||
exports: [...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
Reference in New Issue
Block a user