[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:
Adam Świderski
2024-06-04 10:54:30 +02:00
committed by GitHub
parent 36fef43fc7
commit 7c92f39127
21 changed files with 866 additions and 635 deletions

View File

@@ -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);