[ACA-1928] e2e improvements - part1 (#883)

* refactor Mark as favourite tests
rename method to be more clear
create separate methods for some checks and actions

* forgot some changes

* refactor delete-undo tests

* some more refactoring

* fix
This commit is contained in:
Adina Parpalita
2018-12-20 11:27:54 +02:00
committed by Suzana Dirla
parent 0882686172
commit b8ce533759
54 changed files with 2310 additions and 2069 deletions

View File

@@ -59,13 +59,26 @@ export class NodesApi extends RepoApi {
return '';
}
async getSharedId(nodeId: string) {
return await this.getNodeProperty(nodeId, 'qshare:sharedId');
}
async getSharedExpiryDate(nodeId: string) {
return await this.getNodeProperty(nodeId, 'qshare:expiryDate');
}
async isFileShared(nodeId: string) {
return (await this.getNodeProperty(nodeId, 'qshare:sharedId')) !== '';
return (await this.getSharedId(nodeId)) !== '';
}
async deleteNodeById(id: string, permanent: boolean = true) {
await this.apiAuth();
return await this.alfrescoJsApi.core.nodesApi.deleteNode(id, { permanent });
try {
return await this.alfrescoJsApi.core.nodesApi.deleteNode(id, { permanent });
} catch (error) {
console.log('------ deleteNodeById failed ');
}
}
async deleteNodeByPath(path: string, permanent: boolean = true) {