Improved ESLint configuration, integrated spellcheck and error fixes (#8931)

* integrate cspell with eslint, improved configuration

* core: fix linting errors

* core: fix lint warnings

* content: lint fixes

* process service lint fixes

* lint: process services cloud

* lint: insights

* lint: extensions

* [ci:force] lint: cli fixes

* [ci:force] comment out dead code

* [ci:force] exclude dead code

* fix code and tests

* rollback some changes

* fix testing lib

* fix demo shell

* minor lint warning fixes

* minor lint fixes

* fix process services
This commit is contained in:
Denys Vuika
2023-09-26 13:46:53 +01:00
committed by GitHub
parent 8370a3de66
commit ef551a9c71
134 changed files with 2436 additions and 2269 deletions

View File

@@ -101,7 +101,7 @@ export class QueryService {
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);
return data.list?.entries.length && data.list.entries.find(task => task.entry.name === taskName && task.entry.status === status);
} catch (error) {
Logger.error('get process-instances tasks by status - Service error');
}

View File

@@ -402,14 +402,14 @@ export class DataTableComponentPage {
/** @deprecated use Playwright instead **/
async isColumnDisplayed(columnTitle: string): Promise<boolean> {
const isColumnDisplated = (await this.allColumns).some(
const isColumnDisplayed = (await this.allColumns).some(
async column => {
const columnText = await column.getText();
return columnText === columnTitle;
}
);
return isColumnDisplated;
return isColumnDisplayed;
}
/** @deprecated use Playwright instead **/

View File

@@ -26,13 +26,13 @@ export class BrowserVisibility {
static DEFAULT_TIMEOUT = BrowserVisibility.getVisibleTimeout() ? browser.params.testConfig.timeouts.visible_timeout : 10000;
static getVisibleTimeout() {
if (browser && browser.params && browser.params.testConfig && browser.params.testConfig.timeouts) {
if (browser?.params?.testConfig?.timeouts) {
return browser.params.testConfig.timeouts.visible_timeout;
}
}
static getNoVisibleTimeout() {
if (browser && browser.params && browser.params.testConfig && browser.params.testConfig.timeouts) {
if (browser?.params?.testConfig?.timeouts) {
return browser.params.testConfig.timeouts.no_visible_timeout;
}
}
@@ -91,7 +91,7 @@ export class BrowserVisibility {
static async waitUntilElementHasValue(elementToCheck: ElementFinder, elementValue, waitTimeout: number = BrowserVisibility.DEFAULT_TIMEOUT): Promise<any> {
Logger.info(`Wait Until Element has value ${elementToCheck.locator().toString()} for ${waitTimeout}`);
return browser.wait(BrowserVisibility.textToBePresentInElementValue(elementToCheck, elementValue), waitTimeout, `Element doesn\'t have a value ${elementValue} ${elementToCheck.locator()}`);
return browser.wait(BrowserVisibility.textToBePresentInElementValue(elementToCheck, elementValue), waitTimeout, `Element doesn't have a value ${elementValue} ${elementToCheck.locator()}`);
}
/*
@@ -100,7 +100,7 @@ export class BrowserVisibility {
static async waitUntilElementHasText(elementToCheck: ElementFinder, text, waitTimeout: number = BrowserVisibility.DEFAULT_TIMEOUT): Promise<any> {
Logger.info(`Wait Until Element has value ${elementToCheck.locator().toString()} for ${waitTimeout}`);
return browser.wait(protractor.ExpectedConditions.textToBePresentInElement(elementToCheck, text), waitTimeout, `Element doesn\'t have the text ${text} ${elementToCheck.locator()}`);
return browser.wait(protractor.ExpectedConditions.textToBePresentInElement(elementToCheck, text), waitTimeout, `Element doesn't have the text ${text} ${elementToCheck.locator()}`);
}
static async waitUntilElementIsNotPresent(elementToCheck: ElementFinder, waitTimeout: number = BrowserVisibility.NOT_VISIBLE_DEFAULT_TIMEOUT): Promise<any> {

View File

@@ -44,8 +44,7 @@ export class FormUtil {
}
async getFormByName(name: string): Promise<FormRepresentation> {
// @ts-ignore
const forms: any = await this.editorApi.getForms();
const forms: any = await this.editorApi.getForms(undefined);
return forms.data.find((currentForm) => currentForm.name === name);
}

View File

@@ -15,6 +15,7 @@
* limitations under the License.
*/
/* eslint-disable @cspell/spellchecker */
/* eslint-disable @typescript-eslint/naming-convention */
export const ACTIVITI_CLOUD_APPS = {