From ddaf1f86b0f61156d0c05490f03895dc262ddd24 Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Tue, 14 Oct 2025 14:54:07 +0200 Subject: [PATCH] apiTest-coverage for #1523 --- .../trashbinRestore.feature | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/acceptance/features/coreApiTrashbinRestore/trashbinRestore.feature b/tests/acceptance/features/coreApiTrashbinRestore/trashbinRestore.feature index 5d9684475..1281f0067 100644 --- a/tests/acceptance/features/coreApiTrashbinRestore/trashbinRestore.feature +++ b/tests/acceptance/features/coreApiTrashbinRestore/trashbinRestore.feature @@ -567,3 +567,44 @@ Feature: restore deleted files/folders | dav-path-version | | spaces | | new | + + @issue-1523 + Scenario Outline: restore deleted folder when folder with same name exists + Given using DAV path + And user "Alice" has created folder "new" + And user "Alice" has uploaded file with content "content" to "new/test.txt" + And user "Alice" has deleted folder "new" + And user "Alice" has created folder "new" + And user "Alice" has uploaded file with content "new content" to "new/new-file.txt" + When user "Alice" restores the folder with original path "/new" to "/new (1)" using the trashbin API + Then the HTTP status code should be "201" + And as "Alice" folder "new (1)" should exist + And as "Alice" file "new (1)/test.txt" should exist + And as "Alice" folder "new" should exist + And as "Alice" file "new/new-file.txt" should exist + Examples: + | dav-path-version | + | spaces | + | new | + + @issue-1523 + Scenario Outline: restore deleted folder with files when folder with same name exists + Given using DAV path + And user "Alice" has created folder "folder-a" + And user "Alice" has uploaded file with content "content b" to "folder-a/b.txt" + And user "Alice" has uploaded file with content "content c" to "folder-a/c.txt" + And user "Alice" has deleted file "folder-a/b.txt" + And user "Alice" has deleted folder "folder-a" + And user "Alice" has created folder "folder-a" + When user "Alice" restores the file with original path "folder-a/b.txt" using the trashbin API + Then the HTTP status code should be "201" + When user "Alice" restores the folder with original path "/folder-a" to "/folder-a (1)" using the trashbin API + Then the HTTP status code should be "201" + And as "Alice" folder "folder-a" should exist + And as "Alice" file "folder-a/b.txt" should exist + And as "Alice" folder "folder-a (1)" should exist + And as "Alice" file "folder-a (1)/c.txt" should exist + Examples: + | dav-path-version | + | spaces | + | new |