mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-2380] refactor actions-available tests (#1144)
* compare arrays of actions instead of checking the available actions one by one add more tests for more file types reorganise and separate test files use correct capitalisation of “Leave Library”, according to ACA-2473 add some try catch blocks * fix test and rebalance suites * remove hidden old info button - that exists in DOM, even though hidden, after fix of [ACA-2288] issue * change actions order after ACA-2649
This commit is contained in:
committed by
Cilibiu Bogdan
parent
1bcb29473d
commit
b0121f06f8
@@ -67,7 +67,7 @@ export class FavoritesApi extends RepoApi {
|
||||
try {
|
||||
return await this.favoritesApi.createFavorite('-me-', data);
|
||||
} catch (error) {
|
||||
// console.log('--- add favorite by id catch ');
|
||||
console.log('--- add favorite by id catch ');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export class FavoritesApi extends RepoApi {
|
||||
try {
|
||||
return await this.favoritesApi.deleteFavorite('-me-', nodeId);
|
||||
} catch (error) {
|
||||
// console.log('--- remove favorite by id catch ');
|
||||
console.log('--- remove favorite by id catch ', error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,11 @@ export class NodesApi extends RepoApi {
|
||||
}
|
||||
|
||||
async createFile(name: string, parentId: string = '-my-', title: string = '', description: string = '', author: string = '', majorVersion: boolean = true) {
|
||||
try {
|
||||
return await this.createNode('cm:content', name, parentId, title, description, null, author, majorVersion);
|
||||
} catch (error) {
|
||||
console.log('==== catch createFile: ', error);
|
||||
}
|
||||
}
|
||||
|
||||
async createImage(name: string, parentId: string = '-my-', title: string = '', description: string = '') {
|
||||
|
||||
@@ -74,8 +74,12 @@ export class SitesApi extends RepoApi {
|
||||
id: siteId || title
|
||||
};
|
||||
|
||||
await this.apiAuth();
|
||||
try {
|
||||
await this.apiAuth();
|
||||
return await this.sitesApi.createSite(site);
|
||||
} catch (error) {
|
||||
console.log('=== create site catch: ', error);
|
||||
}
|
||||
}
|
||||
|
||||
async createSites(titles: string[], visibility?: string) {
|
||||
|
||||
@@ -54,8 +54,15 @@ export class UploadApi extends RepoApi {
|
||||
nodeType: 'cm:content'
|
||||
};
|
||||
|
||||
await this.apiAuth();
|
||||
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
try {
|
||||
await this.apiAuth();
|
||||
return await this.upload.uploadFile(file, '', parentFolderId, null, opts);
|
||||
} catch (error) {
|
||||
console.log('=== catch upload file with rename: ', error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user