mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Various code fixes (#1704)
* fix typings and missing lib * fix i18n typo, add typings * code improvements * fix missing awaits * more fixes * fix bug in the evaluators, simplify code * more fixes
This commit is contained in:
@@ -128,7 +128,7 @@ export class FavoritesApi extends RepoApi {
|
||||
}
|
||||
|
||||
async isFavoriteWithRetry(nodeId: string, data: { expect: boolean }) {
|
||||
let isFavorite: boolean;
|
||||
let isFavorite = false;
|
||||
try {
|
||||
const favorite = async () => {
|
||||
isFavorite = await this.isFavorite(nodeId);
|
||||
|
@@ -49,8 +49,7 @@ export class NodesApi extends RepoApi {
|
||||
async getNodeById(id: string): Promise<NodeEntry | null> {
|
||||
try {
|
||||
await this.apiAuth();
|
||||
const node = await this.nodesApi.getNode(id);
|
||||
return node;
|
||||
return await this.nodesApi.getNode(id);
|
||||
} catch (error) {
|
||||
this.handleError(`${this.constructor.name} ${this.getNodeById.name}`, error);
|
||||
return null;
|
||||
@@ -525,7 +524,7 @@ export class NodesApi extends RepoApi {
|
||||
expect: expect,
|
||||
retry: 5
|
||||
};
|
||||
let isLocked: boolean;
|
||||
let isLocked = false;
|
||||
try {
|
||||
const locked = async () => {
|
||||
isLocked = (await this.getLockType(nodeId)) === 'WRITE_LOCK';
|
||||
|
@@ -30,7 +30,7 @@ import { Logger } from '@alfresco/adf-testing';
|
||||
export abstract class RepoApi {
|
||||
alfrescoJsApi = new AlfrescoApi();
|
||||
|
||||
constructor(private username: string = browser.params.ADMIN_USERNAME, private password: string = browser.params.ADMIN_PASSWORD) {
|
||||
protected constructor(private username: string = browser.params.ADMIN_USERNAME, private password: string = browser.params.ADMIN_PASSWORD) {
|
||||
this.alfrescoJsApi.setConfig(browser.params.config);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user