mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-5016] [E2E] delete actions migrated to playwright (#3868)
* [ACS-5016] [E2E] delete actions migrated to playwright * [ACS-5016] sonar fix 1 * [ACS-5016] sonar fix 2 * [ACS-5016] upload.effects.spec.ts reverted * [ACS-5016] upload-file.test.ts reverted * [ACS-5016] review fix 1
This commit is contained in:
@@ -81,6 +81,15 @@ export class NodesApi {
|
||||
}
|
||||
}
|
||||
|
||||
async createFolders(names: string[], relativePath = '/'): Promise<NodePaging> {
|
||||
try {
|
||||
return await this.createContent({ folders: names }, relativePath);
|
||||
} catch (error) {
|
||||
console.error(`${this.constructor.name} ${this.createFolders.name}: ${error}`);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async deleteDeletedNode(name: string): Promise<void> {
|
||||
try {
|
||||
await this.apiService.trashCan.deleteDeletedNode(name);
|
||||
@@ -174,6 +183,16 @@ export class NodesApi {
|
||||
}
|
||||
}
|
||||
|
||||
async unlockNodes(nodeIds: string[]) {
|
||||
try {
|
||||
for (const nodeId of nodeIds) {
|
||||
await this.apiService.nodes.unlockNode(nodeId);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`${this.constructor.name} ${this.unlockNodes.name}`, error);
|
||||
}
|
||||
}
|
||||
|
||||
async createContent(content: NodeContentTree, relativePath: string = '/'): Promise<NodePaging> {
|
||||
try {
|
||||
return await this.apiService.nodes.createNode('-my-', flattenNodeContentTree(content, relativePath) as any);
|
||||
|
Reference in New Issue
Block a user