code cleanup (#3210)

* code cleanup

* rollback changes

* remove dead code

* remove debug app config

* cleanup unused locales

* no-unused-vars rule

* test fixes and cleanup

* remove unnecessary translate modules
This commit is contained in:
Denys Vuika
2023-05-22 08:23:35 +01:00
committed by GitHub
parent 19e31adbb9
commit fd495f6e95
87 changed files with 197 additions and 841 deletions

View File

@@ -27,7 +27,7 @@ import { isPresentAndDisplayed, Utils } from '../../../utilities/utils';
import { BrowserActions, TestElement } from '@alfresco/adf-testing';
export class GenericFilter {
private filterName: string;
private readonly filterName: string;
constructor(filterName: string) {
this.filterName = filterName;

View File

@@ -24,7 +24,7 @@
import { browser, by } from 'protractor';
import { Component } from '../component';
import { waitForPresence, waitElement } from '../../utilities/utils';
import { waitElement, waitForPresence } from '../../utilities/utils';
import { BrowserActions, BrowserVisibility, TestElement } from '@alfresco/adf-testing';
export class SearchInput extends Component {
@@ -174,7 +174,7 @@ export class SearchInput extends Component {
async searchUntilResult(text: string, methodType: 'URL' | 'UI', waitPerSearch: number = 2000, timeout: number = 20000) {
const attempts = Math.round(timeout / waitPerSearch);
let loopCount = 0;
let myPromise = new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
const check = async () => {
loopCount++;
loopCount >= attempts ? reject('File not found') : methodType === 'UI' ? await this.searchFor(text) : await this.searchByURL(text);
@@ -182,6 +182,5 @@ export class SearchInput extends Component {
};
return check();
});
return myPromise;
}
}

View File

@@ -23,8 +23,8 @@
*/
import { RepoApi } from '../repo-api';
import { NodeContentTree, flattenNodeContentTree } from './node-content-tree';
import { NodesApi as AdfNodeApi, NodeEntry, NodeChildAssociationPaging } from '@alfresco/js-api';
import { flattenNodeContentTree, NodeContentTree } from './node-content-tree';
import { NodeChildAssociationPaging, NodeEntry, NodesApi as AdfNodeApi } from '@alfresco/js-api';
import { Utils } from '../../../../utilities/utils';
export class NodesApi extends RepoApi {
@@ -166,8 +166,7 @@ export class NodesApi extends RepoApi {
try {
await names.reduce(async (previous, current) => {
await previous;
const req = await this.deleteNodeByPath(`${relativePath}/${current}`, permanent);
return req;
return await this.deleteNodeByPath(`${relativePath}/${current}`, permanent);
}, Promise.resolve());
} catch (error) {
this.handleError(`${this.constructor.name} ${this.deleteNodes.name}`, error);