Undelete a Test Case Folder

You need to pass a parameter object, like this:

await testiny.testcaseFolder.undelete({ id: 1455})

:exclamation: However, this undeletes only a single folder! You might want to undelete its subfolders and its test cases:

Find all folders in deleted time range in your project:

await testiny.testcaseFolder.find({
  includeDeleted: true, 
  filter: { 
    project_id: 1,
    is_deleted: true, 
    deleted_at: { op: "range", value: ["2024-11-29T12:19:00.000Z", "2024-11-29T12:20:00.000Z"]} }
})

Find all test cases in deleted time range in your project:

await testiny.testcase.find({
  includeDeleted: true, 
  filter: { 
    project_id: 1,
    is_deleted: true, 
    deleted_at: { op: "range", value: ["2024-11-29T12:19:00.000Z", "2024-11-29T12:20:00.000Z"]} }
})

To undelete multiple folders (or test cases) at once, you can pass in multiple ids in an array like this:

await testiny.testcaseFolder.undelete(
  [{ id: 1455},{ id: 1456},...]
);

If you’re unsure, you can also send us a private message here or an email to our support team, with the information of which folder you would like to undelete and give us support access to your organization and we’ll undelete it for you. :slight_smile:

Best regards,
Hanna