[AAE-7100] migrate ADF projects to eslint (#7483)

* migrate content services to eslint

* migrate insights to eslint

* migrate extensions to eslint

* migrate testing lib to eslint

* migrate CLI to eslint

* migrate process-services to eslint

* migrate process-services-cloud to eslint

* remove cli analytics [ci:force]
This commit is contained in:
Denys Vuika
2022-02-03 11:01:54 +00:00
committed by GitHub
parent b8bb234410
commit 8dc736e8f0
233 changed files with 1496 additions and 725 deletions

101
lib/testing/.eslintrc.json Normal file
View File

@@ -0,0 +1,101 @@
{
"extends": "../../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"lib/testing/tsconfig.lib.json",
"lib/testing/tsconfig.spec.json"
],
"createDefaultProgram": true
},
"plugins": [
"eslint-plugin-unicorn",
"eslint-plugin-rxjs"
],
"rules": {
"jsdoc/newline-after-description": "warn",
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"no-underscore-dangle": "warn",
"no-shadow": "warn",
"quote-props": "warn",
"object-shorthand": "warn",
"prefer-const": "warn",
"arrow-body-style": "warn",
"@angular-eslint/no-output-native": "warn",
"space-before-function-paren": "warn",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "lib",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "lib",
"style": "camelCase"
}
],
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-input-prefix": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "error",
"brace-style": [
"error",
"1tbs"
],
"comma-dangle": "error",
"default-case": "error",
"import/order": "off",
"max-len": [
"error",
{
"code": 240
}
],
"no-bitwise": "off",
"no-duplicate-imports": "error",
"no-multiple-empty-lines": "error",
"no-redeclare": "error",
"no-return-await": "error",
"rxjs/no-create": "error",
"rxjs/no-subject-unsubscribe": "error",
"rxjs/no-subject-value": "error",
"rxjs/no-unsafe-takeuntil": "error",
"unicorn/filename-case": "error"
}
},
{
"files": [
"*.html"
],
"rules": {
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-positive-tabindex": "error"
}
}
]
}

View File

@@ -62,15 +62,14 @@ export class GroupIdentityService {
async getGroupInfoByGroupName(groupName: string): Promise<any> {
Logger.log(`Get GroupInfoByGroupName ${groupName}`);
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = `/groups`;
const method = 'GET';
const queryParams = { search: groupName }, postBody = {};
const queryParams = { search: groupName };
const postBody = {};
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
@@ -99,6 +98,7 @@ export class GroupIdentityService {
/**
* Add client roles.
*
* @param groupId ID of the target group
* @param clientId ID of the client
* @param roleId ID of the clientRole
@@ -122,6 +122,7 @@ export class GroupIdentityService {
/**
* Gets the client ID using the app name.
*
* @param applicationName Name of the app
* @returns client ID string
*/

View File

@@ -59,7 +59,8 @@ export class IdentityService {
const path = '/users';
const method = 'POST';
const queryParams = {}, postBody = {
const queryParams = {};
const postBody = {
username: user.username,
firstName: user.firstName,
lastName: user.lastName,
@@ -76,7 +77,8 @@ export class IdentityService {
async deleteUser(userId: string): Promise<any> {
const path = `/users/${userId}`;
const method = 'DELETE';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performIdentityOperation(path, method, queryParams, postBody);
}
@@ -93,8 +95,8 @@ export class IdentityService {
async resetPassword(id: string, password: string): Promise<any> {
const path = `/users/${id}/reset-password`;
const method = 'PUT';
const queryParams = {},
postBody = { type: 'password', value: password, temporary: false };
const queryParams = {};
const postBody = { type: 'password', value: password, temporary: false };
return this.api.performIdentityOperation(path, method, queryParams, postBody);
}
@@ -106,7 +108,7 @@ export class IdentityService {
const path = `/users/${userId}/groups/${groupId}`;
const method = 'PUT';
const queryParams = {};
const postBody = { realm: 'alfresco', userId: userId, groupId: groupId };
const postBody = { realm: 'alfresco', userId, groupId };
return this.api.performIdentityOperation(path, method, queryParams, postBody);
} catch (error) {
@@ -125,8 +127,9 @@ export class IdentityService {
async deleteClientRole(userId: string, clientId: string, roleId: string, roleName: string): Promise<any> {
const path = `/users/${userId}/role-mappings/clients/${clientId}`;
const method = 'DELETE', queryParams = {},
postBody = [{
const method = 'DELETE';
const queryParams = {};
const postBody = [{
id: roleId,
name: roleName,
composite: false,
@@ -135,5 +138,4 @@ export class IdentityService {
}];
return this.api.performIdentityOperation(path, method, queryParams, postBody);
}
}

View File

@@ -30,16 +30,15 @@ export class QueryService {
}
async getProcessInstanceTasks(processInstanceId, appName): Promise<any> {
const predicate = (result: any) => {
return result.list && result.list.entries.length > 0;
};
const predicate = (result: any) => result.list && result.list.entries.length > 0;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId + '/tasks';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
@@ -51,16 +50,15 @@ export class QueryService {
}
async getProcessInstance(processInstanceId, appName): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId;
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
@@ -72,16 +70,15 @@ export class QueryService {
}
async getProcessInstanceSubProcesses(processInstanceId, appName): Promise<any> {
const predicate = (result: any) => {
return result.list && result.list.entries.length > 0;
};
const predicate = (result: any) => result.list && result.list.entries.length > 0;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId + '/subprocesses';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
@@ -93,16 +90,15 @@ export class QueryService {
}
async getProcessInstanceTaskByStatus(processInstanceId, appName, taskName, status: TaskStatus): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId + '/tasks';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody);
return data.list && data.list.entries.length && data.list.entries.find(task => task.entry.name === taskName && task.entry.status === status);
@@ -115,16 +111,15 @@ export class QueryService {
}
async getTaskByStatus(taskName, appName, status: TaskStatus, standalone = false): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = `/${appName}/query/v1/tasks?standalone=${standalone}&status=${status}&maxItems=1000&skipCount=0&sort=createdDate`;
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody);
for (let i = 0; i < data.list.entries.length; i++) {
@@ -142,16 +137,15 @@ export class QueryService {
}
async getTaskByName(taskName, processInstanceId, appName): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId + '/tasks';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody);
for (let i = 0; i < data.list.entries.length; i++) {
@@ -169,11 +163,11 @@ export class QueryService {
}
async getTask(taskName: string, processInstanceId: string, appName: string, status: string, retryCount = 15): Promise<any> {
const path = '/' + appName + '/query/v1/process-instances/' + processInstanceId + '/tasks';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody);
for (let i = 0; i < data.list.entries.length; i++) {
@@ -192,9 +186,7 @@ export class QueryService {
}
async getTaskByNameAndStatus(taskName, processInstanceId, appName, status: TaskStatus): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
@@ -208,15 +200,14 @@ export class QueryService {
}
async getProcessInstanceId(processName: string, appName: string): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
const path = '/' + appName + '/query/v1/process-instances';
const method = 'GET';
const queryParams = { name: processName }, postBody = {};
const queryParams = { name: processName };
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody);
return data.list.entries && data.list.entries.length > 0 ? data.list.entries[0].entry.id : null;
} catch (error) {
@@ -228,9 +219,7 @@ export class QueryService {
}
async getProcessInstances(processName: string, appName: string, status?: TaskStatus): Promise<any> {
const predicate = (result: any) => {
return !!result;
};
const predicate = (result: any) => !!result;
const apiCall = async () => {
try {
@@ -238,7 +227,7 @@ export class QueryService {
const method = 'GET';
let queryParams;
if (status) {
queryParams = { name: processName, status: status };
queryParams = { name: processName, status };
} else {
queryParams = { name: processName };
}

View File

@@ -39,7 +39,8 @@ export class RolesService {
async deleteRole(roleId: string): Promise<any> {
const path = `/roles-by-id/${roleId}`;
const method = 'DELETE';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performIdentityOperation(path, method, queryParams, postBody);
}
@@ -47,7 +48,8 @@ export class RolesService {
async getRoleIdByRoleName(roleName: string): Promise<string> {
const path = `/roles`;
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
const data = await this.api.performIdentityOperation(path, method, queryParams, postBody);
for (const key in data) {

View File

@@ -22,7 +22,7 @@ export class ContainerWidgetPage {
formFields = new FormFields();
fileLocator: Locator = by.css("div [class*='upload-widget__content-text']");
fileLocator: Locator = by.css(`div [class*='upload-widget__content-text']`);
getFieldText(fieldId: string): Promise<string> {
return this.formFields.getFieldText(fieldId, this.fileLocator);

View File

@@ -23,7 +23,7 @@ import { EditJsonDialog } from '../../../dialog/public-api';
export class DisplayValueWidgetPage {
formFields: FormFields = new FormFields();
labelLocator: Locator = by.css("label[class*='adf-label']");
labelLocator: Locator = by.css(`label[class*='adf-label']`);
inputLocator: Locator = by.css('input');
editJsonDialog = new EditJsonDialog();
@@ -61,7 +61,7 @@ export class DisplayValueWidgetPage {
}
async getDisplayJsonValueDialogContent(): Promise<any> {
return JSON.parse(await (<any> this.editJsonDialog.getDialogContent()));
return JSON.parse(await this.editJsonDialog.getDialogContent());
}
async closeDisplayJsonValuedDialog() {

View File

@@ -21,7 +21,7 @@ import { by, Locator } from 'protractor';
export class DocumentWidgetPage {
formFields: FormFields = new FormFields();
fileLocator: Locator = by.css("div [class*='upload-widget__content-text']");
fileLocator: Locator = by.css(`div [class*='upload-widget__content-text']`);
getFieldText(fieldId): Promise<string> {
return this.formFields.getFieldText(fieldId, this.fileLocator);

View File

@@ -23,7 +23,7 @@ export class MultilineTextWidgetPage {
formFields: FormFields = new FormFields();
valueLocator: Locator = by.css('textarea');
labelLocator: Locator = by.css("label[class*='adf-label']");
labelLocator: Locator = by.css(`label[class*='adf-label']`);
getFieldValue(fieldId): Promise<string> {
return this.formFields.getFieldValue(fieldId, this.valueLocator);

View File

@@ -22,7 +22,7 @@ export class TextWidgetPage {
formFields: FormFields = new FormFields();
labelLocator: Locator = by.css("label[class*='adf-label']");
labelLocator: Locator = by.css(`label[class*='adf-label']`);
getFieldLabel(fieldId): Promise<string> {
return this.formFields.getFieldLabel(fieldId, this.labelLocator);

View File

@@ -21,15 +21,15 @@ import { BrowserVisibility } from '../../utils/browser-visibility';
export class TabsPage {
tabs = $$("div[id*='mat-tab-label']");
tabs = $$(`div[id*='mat-tab-label']`);
async clickTabByTitle(tabTitle): Promise<void> {
const tab = element(by.cssContainingText("div[id*='mat-tab-label']", tabTitle));
const tab = element(by.cssContainingText(`div[id*='mat-tab-label']`, tabTitle));
await BrowserActions.click(tab);
}
async checkTabIsSelectedByTitle(tabTitle): Promise<void> {
const tab = element(by.cssContainingText("div[id*='mat-tab-label']", tabTitle));
const tab = element(by.cssContainingText(`div[id*='mat-tab-label']`, tabTitle));
const result = await BrowserActions.getAttribute(tab, 'aria-selected');
await expect(result).toBe('true');
}

View File

@@ -19,7 +19,7 @@ import moment from 'moment-es6';
export class DateUtil {
static formatDate(dateFormat: string, date: Date = new Date, days: number | string = 0): string {
static formatDate(dateFormat: string, date: Date = new Date(), days: number | string = 0): string {
return moment(date).add(days, 'days').format(dateFormat);
}

View File

@@ -20,5 +20,5 @@ import { browser } from 'protractor';
// This was previously a static class, that is why we need this constant starting with uppercase
// Otherwise, feel free to update everywhere in the codebase, where we were using it :)
/* tslint:disable:variable-name */
/* eslint-disable @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match */
export const Logger = new GenericLogger(browser?.params?.testConfig?.appConfig?.log);

View File

@@ -31,10 +31,11 @@ export class FormCloudService {
const path = '/' + appName + '/form/v1/forms/' + formId + '/submit';
const method = 'POST';
const queryParams = {}, postBody = {
'values': values,
'taskId': taskId,
'processInstanceId': processInstanceId
const queryParams = {};
const postBody = {
values,
taskId,
processInstanceId
};
return this.api.performBpmOperation(path, method, queryParams, postBody);
@@ -50,7 +51,8 @@ export class FormCloudService {
const path = '/' + appName + '/form/v1/forms';
const method = 'GET';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
@@ -62,12 +64,8 @@ export class FormCloudService {
}
async getIdByFormName(appName: string, formName: string): Promise<string> {
const forms = await this.getForms(appName);
const formEntry = forms.find((currentForm) => {
return currentForm.formRepresentation.name === formName;
});
const formEntry = forms.find((currentForm) => currentForm.formRepresentation.name === formName);
if (formEntry.formRepresentation) {
return formEntry.formRepresentation.id;

View File

@@ -26,7 +26,7 @@ export class MessageEventsService {
this.api = api;
}
async startMessageEvent(startMessage: string, appName: string, options?: Object): Promise<any> {
async startMessageEvent(startMessage: string, appName: string, options?: any): Promise<any> {
try {
const path = '/' + appName + '/rb/v1/process-instances/message';
const method = 'POST';
@@ -47,7 +47,7 @@ export class MessageEventsService {
}
async receiveMessageEvent(receiveMessage: string, appName: string, options?: Object): Promise<any> {
async receiveMessageEvent(receiveMessage: string, appName: string, options?: any): Promise<any> {
try {
const path = '/' + appName + '/rb/v1/process-instances/message';
const method = 'PUT';

View File

@@ -31,7 +31,8 @@ export class ProcessInstancesService {
const path = '/' + appName + '/rb/v1/process-instances';
const method = 'POST';
const queryParams = {}, postBody = {
const queryParams = {};
const postBody = {
processDefinitionKey: processDefKey,
payloadType: 'StartProcessPayload',
...options
@@ -40,7 +41,7 @@ export class ProcessInstancesService {
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
// tslint:disable-next-line:no-console
// eslint-disable-next-line no-console
Logger.error('create process-instances Service not working', error.message);
}
@@ -51,12 +52,13 @@ export class ProcessInstancesService {
const path = '/' + appName + '/rb/v1/process-instances/' + processInstanceId + '/suspend';
const method = 'POST';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
// tslint:disable-next-line:no-console
// eslint-disable-next-line no-console
Logger.error('suspend process-instances Service not working', error.message);
}
}
@@ -65,13 +67,13 @@ export class ProcessInstancesService {
try {
const path = '/' + appName + '/rb/v1/process-instances/' + processInstanceId;
const method = 'DELETE';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
// tslint:disable-next-line:no-console
// eslint-disable-next-line no-console
Logger.error('delete process-instances Service not working', error.message);
}
}
@@ -79,15 +81,14 @@ export class ProcessInstancesService {
async completeProcessInstance(processInstanceId, appName) {
try {
const path = '/' + appName + '/rb/v1/process-instances/' + processInstanceId + '/complete';
const method = 'POST';
const queryParams = {}, postBody = {};
const queryParams = {};
const postBody = {};
return this.api.performBpmOperation(path, method, queryParams, postBody);
} catch (error) {
// tslint:disable-next-line:no-console
// eslint-disable-next-line no-console
Logger.error('complete process-instances Service not working', error.message);
}
}

View File

@@ -122,12 +122,9 @@ export class Project {
});
}
private async retrySearchProject(modelId: string): Promise<{}> {
private async retrySearchProject(modelId: string): Promise<any> {
const predicate = (result: ResultSetPaging) => {
const foundModel = result.list.entries.find(model => {
return model.entry.id === modelId;
});
const foundModel = result.list.entries.find(model => model.entry.id === modelId);
return !!foundModel;
};
const apiCall = () => this.searchProjects();

View File

@@ -26,11 +26,12 @@ export class TasksService {
this.api = api;
}
async createStandaloneTask(taskName: string, appName: string, options?: Object): Promise<any> {
async createStandaloneTask(taskName: string, appName: string, options?: any): Promise<any> {
const path = '/' + appName + '/rb/v1/tasks';
const method = 'POST';
const queryParams = {}, postBody = {
const queryParams = {};
const postBody = {
name: taskName,
payloadType: 'CreateTaskPayload',
...options
@@ -42,7 +43,7 @@ export class TasksService {
});
}
async createStandaloneTaskWithForm(taskName: string, appName: string, formKey: string, options?: Object): Promise<any> {
async createStandaloneTaskWithForm(taskName: string, appName: string, formKey: string, options?: any): Promise<any> {
const path = '/' + appName + '/rb/v1/tasks';
const method = 'POST';
@@ -50,7 +51,7 @@ export class TasksService {
const postBody = {
name: taskName,
payloadType: 'CreateTaskPayload',
formKey: formKey,
formKey,
...options
};
@@ -64,7 +65,8 @@ export class TasksService {
const path = '/' + appName + '/rb/v1/tasks/' + taskId + '/complete';
const method = 'POST';
const queryParams = {}, postBody = { payloadType: 'CompleteTaskPayload' };
const queryParams = {};
const postBody = { payloadType: 'CompleteTaskPayload' };
return this.api.performBpmOperation(path, method, queryParams, postBody)
.catch((error) => {
@@ -122,7 +124,8 @@ export class TasksService {
const path = '/' + appName + '/query/v1/tasks';
const method = 'GET';
const queryParams = { name: taskName }, postBody = {};
const queryParams = { name: taskName };
const postBody = {};
const data = await this.api.performBpmOperation(path, method, queryParams, postBody)
.catch((error) => {
@@ -135,8 +138,8 @@ export class TasksService {
const path = '/' + appName + '/rb/v1/tasks';
const method = 'POST';
const queryParams = {},
postBody = { name: name, parentTaskId: parentTaskId, payloadType: 'CreateTaskPayload' };
const queryParams = {};
const postBody = { name, parentTaskId, payloadType: 'CreateTaskPayload' };
return this.api.performBpmOperation(path, method, queryParams, postBody)
.catch((error) => {

View File

@@ -108,7 +108,7 @@ export class EditProcessFilterCloudComponentPage {
}
getStateFilterDropDownValue(): Promise<string> {
return BrowserActions.getText($("mat-form-field[data-automation-id='status'] span"));
return BrowserActions.getText($(`mat-form-field[data-automation-id='status'] span`));
}
async setSortFilterDropDown(option) {
@@ -117,7 +117,7 @@ export class EditProcessFilterCloudComponentPage {
}
async getSortFilterDropDownValue(): Promise<string> {
const sortLocator = $$("mat-form-field[data-automation-id='sort'] span").first();
const sortLocator = $$(`mat-form-field[data-automation-id='sort'] span`).first();
return BrowserActions.getText(sortLocator);
}
@@ -127,7 +127,7 @@ export class EditProcessFilterCloudComponentPage {
}
getOrderFilterDropDownValue(): Promise<string> {
return BrowserActions.getText($("mat-form-field[data-automation-id='order'] span"));
return BrowserActions.getText($(`mat-form-field[data-automation-id='order'] span`));
}
async setAppNameDropDown(option: string) {
@@ -265,13 +265,27 @@ export class EditProcessFilterCloudComponentPage {
async setFilter(props: FilterProps) {
await this.openFilter();
if (props.name) { await this.setProcessName(props.name); }
if (props.status) { await this.setStatusFilterDropDown(props.status); }
if (props.sort) { await this.setSortFilterDropDown(props.sort); }
if (props.order) { await this.setOrderFilterDropDown(props.order); }
if (props.initiator) { await this.setInitiator(props.initiator); }
if (props.processName) { await this.setProcessName(props.processName); }
if (props.suspendedDateRange) { await this.setSuspendedDateRangeDropDown(props.suspendedDateRange); }
if (props.name) {
await this.setProcessName(props.name);
}
if (props.status) {
await this.setStatusFilterDropDown(props.status);
}
if (props.sort) {
await this.setSortFilterDropDown(props.sort);
}
if (props.order) {
await this.setOrderFilterDropDown(props.order);
}
if (props.initiator) {
await this.setInitiator(props.initiator);
}
if (props.processName) {
await this.setProcessName(props.processName);
}
if (props.suspendedDateRange) {
await this.setSuspendedDateRangeDropDown(props.suspendedDateRange);
}
await this.closeFilter();
}

View File

@@ -29,10 +29,10 @@ export class AttachFileWidgetCloudPage {
this.assignWidget(fieldId);
}
getFileAttachedLocatorByContainingText = async(text: string): Promise<ElementFinder> => {
getFileAttachedLocatorByContainingText = async (text: string): Promise<ElementFinder> => {
const filesListLocator = 'div[class="adf-file-properties-table"]';
return this.widget.$(filesListLocator).element(by.cssContainingText('table tbody tr td span ', text));
}
};
assignWidget(fieldId: string): void {
this.widget = $(`adf-form-field div[id='field-${fieldId}-container']`);

View File

@@ -27,7 +27,7 @@ export class PeopleCloudComponentPage {
assigneeField = $('input[data-automation-id="adf-people-cloud-search-input"]');
selectionReady = $('div[data-automation-id="adf-people-cloud-row"]');
formFields = new FormFields();
labelLocator: Locator = by.css("label[class*='adf-label']");
labelLocator: Locator = by.css(`label[class*='adf-label']`);
inputLocator: Locator = by.css('input');
assigneeChipList = $('mat-chip-list[data-automation-id="adf-cloud-people-chip-list"]');
noOfUsersDisplayed = $$('mat-option span.adf-people-label-name');

View File

@@ -27,7 +27,7 @@ const FILTERS = {
export class ProcessFiltersCloudComponentPage {
processFilters = $("mat-expansion-panel[data-automation-id='Process Filters']");
processFilters = $(`mat-expansion-panel[data-automation-id='Process Filters']`);
activeFilter = $('.adf-active [data-automation-id="adf-filter-label"]');
processFiltersList = $('adf-cloud-process-filters');

View File

@@ -271,6 +271,7 @@ export const ACTIVITI_CLOUD_APPS = {
poolForm: {
name: 'pool-usertaskform',
widgets: {
// eslint-disable-next-line id-blacklist
string: 'Text0rfn8p'
}
},

View File

@@ -46,7 +46,7 @@ export class IntegrationService {
}
}
async authenticateRepository(id: number, body: { username: string, password: string }): Promise<any> {
async authenticateRepository(id: number, body: { username: string; password: string }): Promise<any> {
await this.requestApiHelper.post(`activiti-app/app/rest/integration/alfresco/${id}/account`, { bodyParam: body });
}
}

View File

@@ -68,7 +68,8 @@ export class ApiService {
async performBpmOperation(path: string, method: string, queryParams: any, postBody: any): Promise<any> {
return new Promise((resolve, reject) => {
const uri = this.config.appConfig.hostBpm + path;
const pathParams = {}, formParams = {};
const pathParams = {};
const formParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -86,9 +87,9 @@ export class ApiService {
/** @deprecated */
async performIdentityOperation(path: string, method: string, queryParams: any, postBody: any): Promise<any> {
return new Promise((resolve, reject) => {
const uri = this.config.appConfig.oauth2.host.replace('/realms', '/admin/realms') + path;
const pathParams = {}, formParams = {};
const pathParams = {};
const formParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
@@ -107,7 +108,8 @@ export class ApiService {
async performECMOperation(path: string, method: string, queryParams: any, postBody: any): Promise<any> {
return new Promise((resolve, reject) => {
const uri = this.config.appConfig.hostEcm + path;
const pathParams = {}, formParams = {};
const pathParams = {};
const formParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];

View File

@@ -31,7 +31,7 @@ export class LogLevelsEnum extends Number {
static SILENT: number = 0;
}
export let logLevels: { level: LogLevelsEnum, name: LOG_LEVEL }[] = [
export let logLevels: { level: LogLevelsEnum; name: LOG_LEVEL }[] = [
{ level: LogLevelsEnum.TRACE, name: 'TRACE' },
{ level: LogLevelsEnum.DEBUG, name: 'DEBUG' },
{ level: LogLevelsEnum.INFO, name: 'INFO' },
@@ -47,7 +47,7 @@ export interface LoggerLike {
error(...messages: string[]): void;
}
/* tslint:disable:no-console */
/* eslint-disable no-console */
export class GenericLogger implements LoggerLike {
private level: LogLevelsEnum;

View File

@@ -1,18 +0,0 @@
{
"extends": "../tslint.json",
"rules": {
"no-floating-promises": true,
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}