test: Add credential helper and ndv helper (#18636)

This commit is contained in:
shortstacked
2025-08-21 17:40:30 +01:00
committed by GitHub
parent 944960bf43
commit 8ca75d6f51
10 changed files with 747 additions and 7 deletions

View File

@@ -27,4 +27,19 @@ export class ProjectApiHelper {
const result = await response.json();
return result.data ?? result;
}
/**
* Delete a project
* @param projectId The ID of the project to delete
* @returns True if deletion was successful
*/
async deleteProject(projectId: string): Promise<boolean> {
const response = await this.api.request.delete(`/rest/projects/${projectId}`);
if (!response.ok()) {
throw new TestError(`Failed to delete project: ${await response.text()}`);
}
return true;
}
}