From 335032996e1fd5b701ec9715468a795dc17670ef Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi Date: Fri, 22 Jul 2022 14:07:21 +0545 Subject: [PATCH] Add etag related tests removed by core-40226 --- .../apiSpaces/etagPropagation.feature | 117 +++++++++++++++++- 1 file changed, 116 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/apiSpaces/etagPropagation.feature b/tests/acceptance/features/apiSpaces/etagPropagation.feature index 306b491ae2f..738bd3363f3 100644 --- a/tests/acceptance/features/apiSpaces/etagPropagation.feature +++ b/tests/acceptance/features/apiSpaces/etagPropagation.feature @@ -34,7 +34,7 @@ Feature: check etag propagation after different file alterations Scenario: copying a file inside a folder as a sharer changes its etag for all collaborators Given user "Alice" has been created with default attributes and without skeleton files - Given user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files And using spaces DAV path And user "Alice" has created folder "/upload" And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" @@ -62,3 +62,118 @@ Feature: check etag propagation after different file alterations | user | path | space | | Alice | /upload/file.txt | Personal | | Brian | /upload/file.txt | Shares Jail | + + +Scenario: as share receiver renaming a file inside a folder changes its etag for all collaborators + Given user "Alice" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files + And using spaces DAV path + And user "Alice" has created folder "/upload" + And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" + And user "Alice" has shared folder "/upload" with user "Brian" + And user "Brian" has accepted share "/upload" offered by user "Alice" + And user "Alice" has stored etag of element "/" inside space "Personal" + And user "Alice" has stored etag of element "/upload" inside space "Personal" + And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal" + And user "Brian" has stored etag of element "/" inside space "Shares Jail" + And user "Brian" has stored etag of element "/upload" inside space "Shares Jail" + And user "Brian" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail" + When user "Brian" moves file "/upload/file.txt" to "/upload/renamed.txt" in space "Shares Jail" using the WebDAV API + Then the HTTP status code should be "201" + And these etags should have changed + | user | path | space | + | Alice | / | Personal | + | Alice | /upload | Personal | + | Brian | / | Shares Jail | + | Brian | /upload | Shares Jail | + And these etags should not have changed + | user | path | space | + | Alice | /upload/renamed.txt | Personal | + | Brian | /upload/renamed.txt | Shares Jail | + + +Scenario: as sharer renaming a file inside a folder changes its etag for all collaborators + Given user "Alice" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files + And using spaces DAV path + And user "Alice" has created folder "/upload" + And user "Alice" has uploaded file with content "uploaded content" to "/upload/file.txt" + And user "Alice" has shared folder "/upload" with user "Brian" + And user "Brian" has accepted share "/upload" offered by user "Alice" + And user "Alice" has stored etag of element "/" inside space "Personal" + And user "Alice" has stored etag of element "/upload" inside space "Personal" + And user "Alice" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Personal" + And user "Brian" has stored etag of element "/" inside space "Shares Jail" + And user "Brian" has stored etag of element "/upload" inside space "Shares Jail" + And user "Brian" has stored etag of element "/upload/file.txt" on path "/upload/renamed.txt" inside space "Shares Jail" + When user "Alice" moves file "/upload/file.txt" to "/upload/renamed.txt" using the WebDAV API + Then the HTTP status code should be "201" + And these etags should have changed + | user | path | space | + | Alice | / | Personal | + | Alice | /upload | Personal | + | Brian | / | Shares Jail | + | Brian | /upload | Shares Jail | + And these etags should not have changed + | user | path | space | + | Alice | /upload/renamed.txt | Personal | + | Brian | /upload/renamed.txt | Shares Jail | + + +Scenario: as sharer moving a file from one folder to an other changes the etags of both folders for all collaborators + Given user "Alice" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files + And using spaces DAV path + And user "Alice" has created folder "/src" + And user "Alice" has created folder "/dst" + And user "Alice" has uploaded file with content "uploaded content" to "/src/file.txt" + And user "Alice" has shared folder "/src" with user "Brian" + And user "Brian" has accepted share "/src" offered by user "Alice" + And user "Alice" has shared folder "/dst" with user "Brian" + And user "Brian" has accepted share "/dst" offered by user "Alice" + And user "Alice" has stored etag of element "/" inside space "Personal" + And user "Alice" has stored etag of element "/src" inside space "Personal" + And user "Alice" has stored etag of element "/dst" inside space "Personal" + And user "Alice" has stored etag of element "/src/file.txt" on path "/dst/file.txt" inside space "Personal" + And user "Brian" has stored etag of element "/" inside space "Shares Jail" + And user "Brian" has stored etag of element "/src" inside space "Shares Jail" + And user "Brian" has stored etag of element "/dst" inside space "Shares Jail" + When user "Alice" moves file "/src/file.txt" to "/dst/file.txt" using the WebDAV API + Then the HTTP status code should be "201" + And these etags should have changed + | user | path | space | + | Alice | / | Personal | + | Alice | /src | Personal | + | Alice | /dst | Personal | + | Brian | / | Shares Jail | + | Brian | /src | Shares Jail | + | Brian | /dst | Shares Jail | + +Scenario: as share receiver moving a file from one folder to an other changes the etags of both folders for all collaborators + Given user "Alice" has been created with default attributes and without skeleton files + And user "Brian" has been created with default attributes and without skeleton files + And using spaces DAV path + And user "Alice" has created folder "/src" + And user "Alice" has created folder "/dst" + And user "Alice" has uploaded file with content "uploaded content" to "/src/file.txt" + And user "Alice" has shared folder "/src" with user "Brian" + And user "Brian" has accepted share "/src" offered by user "Alice" + And user "Alice" has shared folder "/dst" with user "Brian" + And user "Brian" has accepted share "/dst" offered by user "Alice" + And user "Alice" has stored etag of element "/" inside space "Personal" + And user "Alice" has stored etag of element "/src" inside space "Personal" + And user "Alice" has stored etag of element "/dst" inside space "Personal" + And user "Alice" has stored etag of element "/src/file.txt" on path "/dst/file.txt" inside space "Personal" + And user "Brian" has stored etag of element "/" inside space "Shares Jail" + And user "Brian" has stored etag of element "/src" inside space "Shares Jail" + And user "Brian" has stored etag of element "/dst" inside space "Shares Jail" + When user "Brian" moves file "/src/file.txt" to "/dst/file.txt" in space "Shares Jail" using the WebDAV API + Then the HTTP status code should be "201" + And these etags should have changed + | user | path | space | + | Alice | / | Personal | + | Alice | /src | Personal | + | Alice | /dst | Personal | + | Brian | / | Shares Jail | + | Brian | /src | Shares Jail | + | Brian | /dst | Shares Jail | \ No newline at end of file