From 058b69eef02be9bfa77e9b6a1d12d15f29ac6b0c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 26 Oct 2023 16:22:11 +0200 Subject: chore: Move integration tests from drone to github * Improve grouping as setting up CI took 3* the time of the test in average Signed-off-by: Joas Schilling --- .../comments_features/comments-search.feature | 271 ++++++++ .../integration/comments_features/comments.feature | 215 ++++++ build/integration/config/behat.yml | 80 +++ build/integration/dav_features/caldav.feature | 77 +++ build/integration/dav_features/carddav.feature | 79 +++ build/integration/dav_features/dav-v2.feature | 107 +++ .../dav_features/webdav-related.feature | 728 +++++++++++++++++++++ build/integration/features/caldav.feature | 77 --- build/integration/features/carddav.feature | 79 --- build/integration/features/checksums.feature | 76 --- build/integration/features/comments-search.feature | 271 -------- build/integration/features/comments.feature | 215 ------ build/integration/features/dav-v2.feature | 107 --- build/integration/features/download.feature | 294 --------- .../integration/features/external-storage.feature | 62 -- build/integration/features/favorites.feature | 149 ----- build/integration/features/tags.feature | 462 ------------- .../features/transfer-ownership.feature | 594 ----------------- build/integration/features/trashbin.feature | 81 --- build/integration/features/webdav-related.feature | 728 --------------------- build/integration/files_features/checksums.feature | 76 +++ build/integration/files_features/download.feature | 294 +++++++++ .../files_features/external-storage.feature | 62 ++ build/integration/files_features/favorites.feature | 149 +++++ build/integration/files_features/tags.feature | 462 +++++++++++++ .../files_features/transfer-ownership.feature | 594 +++++++++++++++++ build/integration/files_features/trashbin.feature | 81 +++ .../sharing-v1-video-verification.feature | 505 -------------- .../sharing-v1-video-verification.feature | 505 ++++++++++++++ 29 files changed, 3780 insertions(+), 3700 deletions(-) create mode 100644 build/integration/comments_features/comments-search.feature create mode 100644 build/integration/comments_features/comments.feature create mode 100644 build/integration/dav_features/caldav.feature create mode 100644 build/integration/dav_features/carddav.feature create mode 100644 build/integration/dav_features/dav-v2.feature create mode 100644 build/integration/dav_features/webdav-related.feature delete mode 100644 build/integration/features/caldav.feature delete mode 100644 build/integration/features/carddav.feature delete mode 100644 build/integration/features/checksums.feature delete mode 100644 build/integration/features/comments-search.feature delete mode 100644 build/integration/features/comments.feature delete mode 100644 build/integration/features/dav-v2.feature delete mode 100644 build/integration/features/download.feature delete mode 100644 build/integration/features/external-storage.feature delete mode 100644 build/integration/features/favorites.feature delete mode 100644 build/integration/features/tags.feature delete mode 100644 build/integration/features/transfer-ownership.feature delete mode 100644 build/integration/features/trashbin.feature delete mode 100644 build/integration/features/webdav-related.feature create mode 100644 build/integration/files_features/checksums.feature create mode 100644 build/integration/files_features/download.feature create mode 100644 build/integration/files_features/external-storage.feature create mode 100644 build/integration/files_features/favorites.feature create mode 100644 build/integration/files_features/tags.feature create mode 100644 build/integration/files_features/transfer-ownership.feature create mode 100644 build/integration/files_features/trashbin.feature delete mode 100644 build/integration/sharing_features/sharing-v1-video-verification.feature create mode 100644 build/integration/videoverification_features/sharing-v1-video-verification.feature (limited to 'build') diff --git a/build/integration/comments_features/comments-search.feature b/build/integration/comments_features/comments-search.feature new file mode 100644 index 00000000000..a1d116ee3f4 --- /dev/null +++ b/build/integration/comments_features/comments-search.feature @@ -0,0 +1,271 @@ +Feature: comments-search + + Scenario: Search my own comment on a file belonging to myself + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "first" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | My first comment | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My first comment | + + Scenario: Search my own comment on a file shared by someone with me + Given user "user0" exists + And user "user1" exists + And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" + And as "user1" creating a share with + | path | sharedFileToComment.txt | + | shareWith | user0 | + | shareType | 0 | + And user "user0" accepts last share + And "user0" posts a comment with content "My first comment" on the file named "/sharedFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "first" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | My first comment | + | authorId | user0 | + | authorName | user0 | + | path | sharedFileToComment.txt | + | fileName | sharedFileToComment.txt | + | name | My first comment | + + Scenario: Search other user's comment on a file shared by me + Given user "user0" exists + And user "user1" exists + And User "user0" uploads file "data/textfile.txt" to "/mySharedFileToComment.txt" + And as "user0" creating a share with + | path | mySharedFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + And "user1" posts a comment with content "Other's first comment" on the file named "/mySharedFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "first" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | Other's first comment | + | authorId | user1 | + | authorName | user1 | + | path | mySharedFileToComment.txt | + | fileName | mySharedFileToComment.txt | + | name | Other's first comment | + + Scenario: Search other user's comment on a file shared by someone with me + Given user "user0" exists + And user "user1" exists + And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" + And as "user1" creating a share with + | path | sharedFileToComment.txt | + | shareWith | user0 | + | shareType | 0 | + And user "user0" accepts last share + And "user1" posts a comment with content "Other's first comment" on the file named "/sharedFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "first" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | Other's first comment | + | authorId | user1 | + | authorName | user1 | + | path | sharedFileToComment.txt | + | fileName | sharedFileToComment.txt | + | name | Other's first comment | + + Scenario: Search several comments on a file belonging to myself + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "My first comment to be found" on the file named "/myFileToComment.txt" it should return "201" + And "user0" posts a comment with content "The second comment should not be found" on the file named "/myFileToComment.txt" it should return "201" + And "user0" posts a comment with content "My third comment to be found" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "comment to be found" in app "files" + Then the list of search results has "2" results + And search result "0" contains + | type | comment | + | comment | My third comment to be found | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My third comment to be found | + And search result "1" contains + | type | comment | + | comment | My first comment to be found | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My first comment to be found | + + Scenario: Search comment with a large message ellipsized on the right + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "verbose" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | A very verbose message that is meant to… | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | + + Scenario: Search comment with a large message ellipsized on the left + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "searching" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | …ed message returned when searching for long comments | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | + + Scenario: Search comment with a large message ellipsized on both ends + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "ellipsized" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | …t to be used to test the ellipsized message returned when se… | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | + + Scenario: Search comment on a file in a subfolder + Given user "user0" exists + And user "user0" created a folder "/subfolder" + And User "user0" uploads file "data/textfile.txt" to "/subfolder/myFileToComment.txt" + And "user0" posts a comment with content "My first comment" on the file named "/subfolder/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "first" in app "files" + Then the list of search results has "1" results + And search result "0" contains + | type | comment | + | comment | My first comment | + | authorId | user0 | + | authorName | user0 | + | path | subfolder/myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My first comment | + + Scenario: Search several comments + Given user "user0" exists + And user "user1" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And User "user0" uploads file "data/textfile.txt" to "/mySharedFileToComment.txt" + And as "user0" creating a share with + | path | mySharedFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" + And as "user1" creating a share with + | path | sharedFileToComment.txt | + | shareWith | user0 | + | shareType | 0 | + And user "user0" accepts last share + And "user0" posts a comment with content "My first comment to be found" on the file named "/myFileToComment.txt" it should return "201" + And "user0" posts a comment with content "The second comment should not be found" on the file named "/myFileToComment.txt" it should return "201" + And "user0" posts a comment with content "My first comment to be found" on the file named "/mySharedFileToComment.txt" it should return "201" + And "user1" posts a comment with content "Other's first comment that should not be found" on the file named "/mySharedFileToComment.txt" it should return "201" + And "user1" posts a comment with content "Other's second comment to be found" on the file named "/mySharedFileToComment.txt" it should return "201" + And "user0" posts a comment with content "My first comment that should not be found" on the file named "/sharedFileToComment.txt" it should return "201" + And "user1" posts a comment with content "Other's first comment to be found" on the file named "/sharedFileToComment.txt" it should return "201" + And "user0" posts a comment with content "My second comment to be found that happens to be more verbose than the others and thus should be ellipsized" on the file named "/sharedFileToComment.txt" it should return "201" + And "user0" posts a comment with content "My third comment to be found" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "comment to be found" in app "files" + Then the list of search results has "6" results + And search result "0" contains + | type | comment | + | comment | My third comment to be found | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My third comment to be found | + And search result "1" contains + | type | comment | + | comment | My second comment to be found that happens to be more … | + | authorId | user0 | + | authorName | user0 | + | path | sharedFileToComment.txt | + | fileName | sharedFileToComment.txt | + | name | My second comment to be found that happens to be more verbose than the others and thus should be ellipsized | + And search result "2" contains + | type | comment | + | comment | Other's first comment to be found | + | authorId | user1 | + | authorName | user1 | + | path | sharedFileToComment.txt | + | fileName | sharedFileToComment.txt | + | name | Other's first comment to be found | + And search result "3" contains + | type | comment | + | comment | Other's second comment to be found | + | authorId | user1 | + | authorName | user1 | + | path | mySharedFileToComment.txt | + | fileName | mySharedFileToComment.txt | + | name | Other's second comment to be found | + And search result "4" contains + | type | comment | + | comment | My first comment to be found | + | authorId | user0 | + | authorName | user0 | + | path | mySharedFileToComment.txt | + | fileName | mySharedFileToComment.txt | + | name | My first comment to be found | + And search result "5" contains + | type | comment | + | comment | My first comment to be found | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | My first comment to be found | + + Scenario: Search comment with a query that also matches a file name + Given user "user0" exists + And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + And "user0" posts a comment with content "A comment in myFileToComment.txt" on the file named "/myFileToComment.txt" it should return "201" + When Logging in using web as "user0" + And searching for "myFileToComment" in app "files" + Then the list of search results has "2" results + And search result "0" contains + | type | file | + | path | /myFileToComment.txt | + | name | myFileToComment.txt | + And search result "1" contains + | type | comment | + | comment | A comment in myFileToComment.txt | + | authorId | user0 | + | authorName | user0 | + | path | myFileToComment.txt | + | fileName | myFileToComment.txt | + | name | A comment in myFileToComment.txt | diff --git a/build/integration/comments_features/comments.feature b/build/integration/comments_features/comments.feature new file mode 100644 index 00000000000..0f3a4cc75cf --- /dev/null +++ b/build/integration/comments_features/comments.feature @@ -0,0 +1,215 @@ +Feature: comments + Scenario: Creating a comment on a file belonging to myself + Given user "user0" exists + Given As an "user0" + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + When "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user0" + And the response should contain only "1" comments + + Scenario: Creating a comment on a shared file belonging to another user + Given user "user0" exists + Given user "12345" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | 12345 | + | shareType | 0 | + Given user "12345" accepts last share + When "12345" posts a comment with content "A comment from another user" on the file named "/myFileToComment.txt" it should return "201" + Then As "12345" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "A comment from another user" + And the response should contain a property "oc:actorDisplayName" with value "12345" + And the response should contain only "1" comments + + Scenario: Creating a comment on a non-shared file belonging to another user + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Then "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "404" + + Scenario: Reading comments on a non-shared file belonging to another user + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Then As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "404" + + Scenario: Deleting my own comments on a file belonging to myself + Given user "user0" exists + Given As an "user0" + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + Then the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user0" + And the response should contain only "1" comments + And As "user0" delete the created comment it should return "204" + And As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain only "0" comments + + Scenario: Deleting my own comments on a file shared by somebody else + Given user "user0" exists + Given user "user1" exists + Given As an "user0" + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + And the response should contain only "1" comments + And As "user1" delete the created comment it should return "204" + And As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain only "0" comments + + Scenario: Deleting my own comments on a file unshared by someone else + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + And the response should contain only "1" comments + And As "user0" remove all shares from the file named "/myFileToComment.txt" + And As "user1" delete the created comment it should return "404" + And As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "404" + + Scenario: Edit my own comments on a file belonging to myself + Given user "user0" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user0" + And the response should contain only "1" comments + When As "user0" edit the last created comment and set text to "My edited comment" it should return "207" + Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My edited comment" + And the response should contain a property "oc:actorDisplayName" with value "user0" + + Scenario: Edit my own comments on a file shared by someone with me + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + And the response should contain only "1" comments + Given As "user1" edit the last created comment and set text to "My edited comment" it should return "207" + Then As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My edited comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + + Scenario: Edit my own comments on a file unshared by someone with me + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + When "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + And the response should contain only "1" comments + And As "user0" remove all shares from the file named "/myFileToComment.txt" + When As "user1" edit the last created comment and set text to "My edited comment" it should return "404" + Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + And the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + + Scenario: Edit comments of other users should not be possible + Given user "user0" exists + Given user "user1" exists + Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" + Given as "user0" creating a share with + | path | myFileToComment.txt | + | shareWith | user1 | + | shareType | 0 | + And user "user1" accepts last share + Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" + When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" + Then the response should contain a property "oc:parentId" with value "0" + And the response should contain a property "oc:childrenCount" with value "0" + And the response should contain a property "oc:verb" with value "comment" + And the response should contain a property "oc:actorType" with value "users" + And the response should contain a property "oc:objectType" with value "files" + And the response should contain a property "oc:message" with value "My first comment" + And the response should contain a property "oc:actorDisplayName" with value "user1" + And the response should contain only "1" comments + Then As "user0" edit the last created comment and set text to "My edited comment" it should return "403" diff --git a/build/integration/config/behat.yml b/build/integration/config/behat.yml index fdd9f890b0e..e82ac388fbc 100644 --- a/build/integration/config/behat.yml +++ b/build/integration/config/behat.yml @@ -29,6 +29,52 @@ default: - CommandLineContext: baseUrl: http://localhost:8080 ocPath: ../../ + comments: + paths: + - "%paths.base%/../comments_features" + contexts: + - FeatureContext: + baseUrl: http://localhost:8080/ocs/ + admin: + - admin + - admin + regular_user_password: 123456 + - CommentsContext: + baseUrl: http://localhost:8080 + - TagsContext: + baseUrl: http://localhost:8080 + - CardDavContext: + baseUrl: http://localhost:8080 + - CalDavContext: + baseUrl: http://localhost:8080 + - ChecksumsContext: + baseUrl: http://localhost:8080 + - CommandLineContext: + baseUrl: http://localhost:8080 + ocPath: ../../ + dav: + paths: + - "%paths.base%/../dav_features" + contexts: + - FeatureContext: + baseUrl: http://localhost:8080/ocs/ + admin: + - admin + - admin + regular_user_password: 123456 + - CommentsContext: + baseUrl: http://localhost:8080 + - TagsContext: + baseUrl: http://localhost:8080 + - CardDavContext: + baseUrl: http://localhost:8080 + - CalDavContext: + baseUrl: http://localhost:8080 + - ChecksumsContext: + baseUrl: http://localhost:8080 + - CommandLineContext: + baseUrl: http://localhost:8080 + ocPath: ../../ federation: paths: - "%paths.base%/../federation_features" @@ -39,6 +85,29 @@ default: - admin - admin regular_user_password: 123456 + files: + paths: + - "%paths.base%/../files_features" + contexts: + - FeatureContext: + baseUrl: http://localhost:8080/ocs/ + admin: + - admin + - admin + regular_user_password: 123456 + - CommentsContext: + baseUrl: http://localhost:8080 + - TagsContext: + baseUrl: http://localhost:8080 + - CardDavContext: + baseUrl: http://localhost:8080 + - CalDavContext: + baseUrl: http://localhost:8080 + - ChecksumsContext: + baseUrl: http://localhost:8080 + - CommandLineContext: + baseUrl: http://localhost:8080 + ocPath: ../../ capabilities: paths: - "%paths.base%/../capabilities_features" @@ -80,6 +149,17 @@ default: - admin regular_user_password: 123456 - TalkContext + videoverification: + paths: + - "%paths.base%/../videoverification_features" + contexts: + - SharingContext: + baseUrl: http://localhost:8080/ocs/ + admin: + - admin + - admin + regular_user_password: 123456 + - TalkContext setup: paths: - "%paths.base%/../setup_features" diff --git a/build/integration/dav_features/caldav.feature b/build/integration/dav_features/caldav.feature new file mode 100644 index 00000000000..e2cb4f8dc92 --- /dev/null +++ b/build/integration/dav_features/caldav.feature @@ -0,0 +1,77 @@ +Feature: caldav + Scenario: Accessing a not existing calendar of another user + Given user "user0" exists + When "admin" requests calendar "user0/MyCalendar" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Accessing a not shared calendar of another user + Given user "user0" exists + Given "admin" creates a calendar named "MyCalendar" + Given The CalDAV HTTP status code should be "201" + When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Accessing a not shared calendar of another user via the legacy endpoint + Given user "user0" exists + Given "admin" creates a calendar named "MyCalendar" + Given The CalDAV HTTP status code should be "201" + When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Accessing a not existing calendar of another user + Given user "user0" exists + When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Accessing a not existing calendar of another user via the legacy endpoint + Given user "user0" exists + When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Accessing a not existing calendar of myself + Given user "user0" exists + When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'MyCalendar' could not be found" + + Scenario: Creating a new calendar + When "admin" creates a calendar named "MyCalendar" + Then The CalDAV HTTP status code should be "201" + And "admin" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "207" + + Scenario: Propfind on public calendar endpoint without calendars + When "admin" creates a calendar named "MyCalendar" + Then The CalDAV HTTP status code should be "201" + And "admin" publicly shares the calendar named "MyCalendar" + Then The CalDAV HTTP status code should be "202" + When "admin" requests calendar "/" on the endpoint "/remote.php/dav/public-calendars" + Then The CalDAV HTTP status code should be "207" + Then There should be "0" calendars in the response body + + Scenario: Create calendar request for non-existing calendar of another user + Given user "user0" exists + When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'admin' could not be found" + + Scenario: Create calendar request for existing calendar of another user + Given user "user0" exists + When "admin" creates a calendar named "MyCalendar2" + Then The CalDAV HTTP status code should be "201" + When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/" + Then The CalDAV HTTP status code should be "404" + And The exception is "Sabre\DAV\Exception\NotFound" + And The error message is "Node with name 'admin' could not be found" diff --git a/build/integration/dav_features/carddav.feature b/build/integration/dav_features/carddav.feature new file mode 100644 index 00000000000..9c9df6ddd94 --- /dev/null +++ b/build/integration/dav_features/carddav.feature @@ -0,0 +1,79 @@ +Feature: carddav + Scenario: Accessing a not existing addressbook of another user + Given user "user0" exists + When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" + + Scenario: Accessing a not shared addressbook of another user + Given user "user0" exists + Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" + When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" + + Scenario: Accessing a not existing addressbook of another user via legacy endpoint + Given user "user0" exists + When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" + + Scenario: Accessing a not shared addressbook of another user via legacy endpoint + Given user "user0" exists + Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" + When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" + + Scenario: Accessing a not existing addressbook of myself + Given user "user0" exists + When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" + + Scenario: Creating a new addressbook + When "admin" creates an addressbook named "MyAddressbook" with statuscode "201" + Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/" + + Scenario: Accessing ones own contact + Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" + Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook" + When Downloading the contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin" + Then The following HTTP headers should be set + |Content-Disposition|attachment; filename*=UTF-8''bjoern.vcf; filename="bjoern.vcf"| + |Content-Type|text/vcard; charset=utf-8| + |Content-Security-Policy|default-src 'none';| + |X-Content-Type-Options |nosniff| + |X-Frame-Options|SAMEORIGIN| + |X-Permitted-Cross-Domain-Policies|none| + |X-Robots-Tag|noindex, nofollow| + |X-XSS-Protection|1; mode=block| + + Scenario: Exporting the picture of ones own contact + Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" + Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook" + When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin" + Then The following HTTP headers should be set + |Content-Disposition|attachment; filename=bjoern.vcf.jpg| + |Content-Type|image/jpeg| + |Content-Security-Policy|default-src 'none';| + |X-Content-Type-Options |nosniff| + |X-Frame-Options|SAMEORIGIN| + |X-Permitted-Cross-Domain-Policies|none| + |X-Robots-Tag|noindex, nofollow| + |X-XSS-Protection|1; mode=block| + + Scenario: Create addressbook request for non-existing addressbook of another user + Given user "user0" exists + When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/" + Then The CardDAV HTTP status code should be "404" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "File not found: admin in 'addressbooks'" + + Scenario: Create addressbook request for existing addressbook of another user + Given user "user0" exists + When "admin" creates an addressbook named "MyAddressbook2" with statuscode "201" + When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/" + Then The CardDAV HTTP status code should be "404" + And The CardDAV exception is "Sabre\DAV\Exception\NotFound" + And The CardDAV error message is "File not found: admin in 'addressbooks'" diff --git a/build/integration/dav_features/dav-v2.feature b/build/integration/dav_features/dav-v2.feature new file mode 100644 index 00000000000..a3ac59578e9 --- /dev/null +++ b/build/integration/dav_features/dav-v2.feature @@ -0,0 +1,107 @@ +Feature: dav-v2 + Background: + Given using api version "1" + + Scenario: moving a file new endpoint way + Given using new dav path + And As an "admin" + And user "user0" exists + When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" + Then the HTTP status code should be "201" + + Scenario: download a file with range using new endpoint + Given using new dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When Downloading file "/welcome.txt" with range "bytes=52-78" + Then Downloaded content should be "example file for developers" + + Scenario: Downloading a file on the new endpoint should serve security headers + Given using new dav path + And As an "admin" + When Downloading file "/welcome.txt" + Then The following headers should be set + |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"| + |Content-Security-Policy|default-src 'none';| + |X-Content-Type-Options |nosniff| + |X-Frame-Options|SAMEORIGIN| + |X-Permitted-Cross-Domain-Policies|none| + |X-Robots-Tag|noindex, nofollow| + |X-XSS-Protection|1; mode=block| + And Downloaded content should start with "Welcome to your Nextcloud account!" + + Scenario: Doing a GET with a web login should work without CSRF token on the new backend + Given Logging in using web as "admin" + When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken + Then Downloaded content should start with "Welcome to your Nextcloud account!" + Then the HTTP status code should be "200" + + Scenario: Doing a GET with a web login should work with CSRF token on the new backend + Given Logging in using web as "admin" + When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken + Then Downloaded content should start with "Welcome to your Nextcloud account!" + Then the HTTP status code should be "200" + + Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the new backend + Given Logging in using web as "admin" + When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken + Then the HTTP status code should be "401" + + Scenario: Doing a PROPFIND with a web login should work with CSRF token on the new backend + Given Logging in using web as "admin" + When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken + Then the HTTP status code should be "207" + + Scenario: Uploading a file having 0B as quota + Given using new dav path + And As an "admin" + And user "user0" exists + And user "user0" has a quota of "0 B" + And As an "user0" + When User "user0" uploads file "data/textfile.txt" to "/asdf.txt" + Then the HTTP status code should be "507" + + Scenario: Uploading a file as recipient using webdav new endpoint having quota + Given using new dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" has a quota of "10 MB" + And user "user1" has a quota of "10 MB" + And As an "user1" + And user "user1" created a folder "/testquota" + And as "user1" creating a share with + | path | testquota | + | shareType | 0 | + | permissions | 31 | + | shareWith | user0 | + And user "user0" accepts last share + And As an "user0" + When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" + Then the HTTP status code should be "201" + + Scenario: Create a search query on image + Given using new dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" + Then Image search should work + And the response should be empty + When User "user0" uploads file "data/green-square-256.png" to "/image.png" + Then Image search should work + And the single response should contain a property "{DAV:}getcontenttype" with value "image/png" + + Scenario: Create a search query on favorite + Given using new dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" uploads file "data/green-square-256.png" to "/fav_image.png" + Then Favorite search should work + And the response should be empty + When user "user0" favorites element "/fav_image.png" + Then Favorite search should work + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + diff --git a/build/integration/dav_features/webdav-related.feature b/build/integration/dav_features/webdav-related.feature new file mode 100644 index 00000000000..28a0cad619b --- /dev/null +++ b/build/integration/dav_features/webdav-related.feature @@ -0,0 +1,728 @@ +Feature: webdav-related + Background: + Given using api version "1" + + Scenario: Unauthenticated call old dav path + Given using old dav path + When connecting to dav endpoint + Then the HTTP status code should be "401" + And there are no duplicate headers + And The following headers should be set + |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"| + + Scenario: Unauthenticated call new dav path + Given using new dav path + When connecting to dav endpoint + Then the HTTP status code should be "401" + And there are no duplicate headers + And The following headers should be set + |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"| + + Scenario: Moving a file + Given using old dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" + Then the HTTP status code should be "201" + And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: Moving and overwriting a file old way + Given using old dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" moves file "/welcome.txt" to "/textfile0.txt" + Then the HTTP status code should be "204" + And Downloaded content when downloading file "/textfile0.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: Moving a file to a folder with no permissions + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testshare" + And as "user1" creating a share with + | path | testshare | + | shareType | 0 | + | permissions | 1 | + | shareWith | user0 | + And user "user0" accepts last share + And As an "user0" + And User "user0" moves file "/textfile0.txt" to "/testshare/textfile0.txt" + And the HTTP status code should be "403" + When Downloading file "/testshare/textfile0.txt" + Then the HTTP status code should be "404" + + Scenario: Moving a file to overwrite a file in a folder with no permissions + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testshare" + And as "user1" creating a share with + | path | testshare | + | shareType | 0 | + | permissions | 1 | + | shareWith | user0 | + And user "user0" accepts last share + And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt" + And As an "user0" + When User "user0" moves file "/textfile0.txt" to "/testshare/overwritethis.txt" + Then the HTTP status code should be "403" + And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: Copying a file + Given using old dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" copies file "/welcome.txt" to "/FOLDER/welcome.txt" + Then the HTTP status code should be "201" + And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: Copying and overwriting a file + Given using old dav path + And As an "admin" + And user "user0" exists + And As an "user0" + When User "user0" copies file "/welcome.txt" to "/textfile1.txt" + Then the HTTP status code should be "204" + And Downloaded content when downloading file "/textfile1.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: Copying a file to a folder with no permissions + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testshare" + And as "user1" creating a share with + | path | testshare | + | shareType | 0 | + | permissions | 1 | + | shareWith | user0 | + And user "user0" accepts last share + And As an "user0" + When User "user0" copies file "/textfile0.txt" to "/testshare/textfile0.txt" + Then the HTTP status code should be "403" + And Downloading file "/testshare/textfile0.txt" + And the HTTP status code should be "404" + + Scenario: Copying a file to overwrite a file into a folder with no permissions + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testshare" + And as "user1" creating a share with + | path | testshare | + | shareType | 0 | + | permissions | 1 | + | shareWith | user0 | + And user "user0" accepts last share + And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt" + And As an "user0" + When User "user0" copies file "/textfile0.txt" to "/testshare/overwritethis.txt" + Then the HTTP status code should be "403" + And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome" + + Scenario: download a file with range + Given using old dav path + And As an "admin" + When Downloading file "/welcome.txt" with range "bytes=52-78" + Then Downloaded content should be "example file for developers" + + Scenario: Upload forbidden if quota is 0 + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user0" has a quota of "0" + When User "user0" uploads file "data/textfile.txt" to "/asdf.txt" + Then the HTTP status code should be "507" + + Scenario: Retrieving folder quota when no quota is set + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" has unlimited quota + Then as "user0" gets properties of folder "/" with + |{DAV:}quota-available-bytes| + And the single response should contain a property "{DAV:}quota-available-bytes" with value "-3" + + Scenario: Retrieving folder quota when quota is set + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" has a quota of "10 MB" + Then as "user0" gets properties of folder "/" with + |{DAV:}quota-available-bytes| + And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" + + Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" has unlimited quota + And user "user1" has a quota of "10 MB" + And As an "user1" + And user "user1" created a folder "/testquota" + And as "user1" creating a share with + | path | testquota | + | shareType | 0 | + | permissions | 31 | + | shareWith | user0 | + And user "user0" accepts last share + Then as "user0" gets properties of folder "/testquota" with + |{DAV:}quota-available-bytes| + And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" + + Scenario: Uploading a file as recipient using webdav having quota + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" has a quota of "10 MB" + And user "user1" has a quota of "10 MB" + And As an "user1" + And user "user1" created a folder "/testquota" + And as "user1" creating a share with + | path | testquota | + | shareType | 0 | + | permissions | 31 | + | shareWith | user0 | + And user "user0" accepts last share + And As an "user0" + When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" + Then the HTTP status code should be "201" + + Scenario: Retrieving folder quota when quota is set and a file was uploaded + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user0" has a quota of "1 KB" + And user "user0" adds a file of 93 bytes to "/prueba.txt" + When as "user0" gets properties of folder "/" with + |{DAV:}quota-available-bytes| + Then the single response should contain a property "{DAV:}quota-available-bytes" with value "592" + + Scenario: Retrieving folder quota when quota is set and a file was received + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user1" has a quota of "1 KB" + And user "user0" adds a file of 93 bytes to "/user0.txt" + And file "user0.txt" of user "user0" is shared with user "user1" + And user "user1" accepts last share + When as "user1" gets properties of folder "/" with + |{DAV:}quota-available-bytes| + Then the single response should contain a property "{DAV:}quota-available-bytes" with value "685" + + Scenario: download a public shared file with range + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Downloading last public shared file with range "bytes=52-78" + Then Downloaded content should be "example file for developers" + + Scenario: download a public shared file inside a folder with range + Given user "user0" exists + And As an "user0" + When creating a share with + | path | PARENT | + | shareType | 3 | + And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8" + Then Downloaded content should be "extcloud" + + Scenario: Downloading a file on the old endpoint should serve security headers + Given using old dav path + And As an "admin" + When Downloading file "/welcome.txt" + Then The following headers should be set + |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"| + |Content-Security-Policy|default-src 'none';| + |X-Content-Type-Options |nosniff| + |X-Frame-Options|SAMEORIGIN| + |X-Permitted-Cross-Domain-Policies|none| + |X-Robots-Tag|noindex, nofollow| + |X-XSS-Protection|1; mode=block| + And Downloaded content should start with "Welcome to your Nextcloud account!" + + Scenario: Doing a GET with a web login should work without CSRF token on the old backend + Given Logging in using web as "admin" + When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken + Then Downloaded content should start with "Welcome to your Nextcloud account!" + Then the HTTP status code should be "200" + + Scenario: Doing a GET with a web login should work with CSRF token on the old backend + Given Logging in using web as "admin" + When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken + Then Downloaded content should start with "Welcome to your Nextcloud account!" + Then the HTTP status code should be "200" + + Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend + Given Logging in using web as "admin" + When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" without requesttoken + Then the HTTP status code should be "401" + + Scenario: Doing a PROPFIND with a web login should work with CSRF token on the old backend + Given Logging in using web as "admin" + When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" with requesttoken + Then the HTTP status code should be "207" + + Scenario: Upload chunked file asc + Given user "user0" exists + And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: Upload chunked file desc + Given user "user0" exists + And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: Upload chunked file random + Given user "user0" exists + And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" + And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: A file that is not shared does not have a share-types property + Given user "user0" exists + And user "user0" created a folder "/test" + When as "user0" gets properties of folder "/test" with + |{http://owncloud.org/ns}share-types| + Then the response should contain an empty property "{http://owncloud.org/ns}share-types" + + Scenario: A file that is shared to a user has a share-types property + Given user "user0" exists + And user "user1" exists + And user "user0" created a folder "/test" + And as "user0" creating a share with + | path | test | + | shareType | 0 | + | permissions | 31 | + | shareWith | user1 | + When as "user0" gets properties of folder "/test" with + |{http://owncloud.org/ns}share-types| + Then the response should contain a share-types property with + | 0 | + + Scenario: A file that is shared to a group has a share-types property + Given user "user0" exists + And group "group1" exists + And user "user0" created a folder "/test" + And as "user0" creating a share with + | path | test | + | shareType | 1 | + | permissions | 31 | + | shareWith | group1 | + When as "user0" gets properties of folder "/test" with + |{http://owncloud.org/ns}share-types| + Then the response should contain a share-types property with + | 1 | + + Scenario: A file that is shared by link has a share-types property + Given user "user0" exists + And user "user0" created a folder "/test" + And as "user0" creating a share with + | path | test | + | shareType | 3 | + | permissions | 31 | + When as "user0" gets properties of folder "/test" with + |{http://owncloud.org/ns}share-types| + Then the response should contain a share-types property with + | 3 | + + Scenario: A file that is shared by user,group and link has a share-types property + Given user "user0" exists + And user "user1" exists + And group "group2" exists + And user "user0" created a folder "/test" + And as "user0" creating a share with + | path | test | + | shareType | 0 | + | permissions | 31 | + | shareWith | user1 | + And as "user0" creating a share with + | path | test | + | shareType | 1 | + | permissions | 31 | + | shareWith | group2 | + And as "user0" creating a share with + | path | test | + | shareType | 3 | + | permissions | 31 | + When as "user0" gets properties of folder "/test" with + |{http://owncloud.org/ns}share-types| + Then the response should contain a share-types property with + | 0 | + | 1 | + | 3 | + + Scenario: Upload chunked file asc with new chunking + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: Upload chunked file desc with new chunking + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: Upload chunked file random with new chunking + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be "AAAAABBBBBCCCCC" + + Scenario: A disabled user cannot use webdav + Given user "userToBeDisabled" exists + And As an "admin" + And assure user "userToBeDisabled" is disabled + When Downloading file "/welcome.txt" as "userToBeDisabled" + Then the HTTP status code should be "503" + + Scenario: Copying files into a folder with edit permissions + Given using dav path "remote.php/webdav" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testcopypermissionsAllowed" + And as "user1" creating a share with + | path | testcopypermissionsAllowed | + | shareType | 0 | + | permissions | 31 | + | shareWith | user0 | + And user "user0" accepts last share + And User "user0" uploads file with content "copytest" to "/copytest.txt" + When User "user0" copies file "/copytest.txt" to "/testcopypermissionsAllowed/copytest.txt" + Then the HTTP status code should be "201" + + Scenario: Copying files into a folder without edit permissions + Given using dav path "remote.php/webdav" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testcopypermissionsNotAllowed" + And as "user1" creating a share with + | path | testcopypermissionsNotAllowed | + | shareType | 0 | + | permissions | 1 | + | shareWith | user0 | + And user "user0" accepts last share + And User "user0" uploads file with content "copytest" to "/copytest.txt" + When User "user0" copies file "/copytest.txt" to "/testcopypermissionsNotAllowed/copytest.txt" + Then the HTTP status code should be "403" + + Scenario: Uploading a file as recipient with limited permissions + Given using new dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" has a quota of "10 MB" + And user "user1" has a quota of "10 MB" + And As an "user1" + And user "user1" created a folder "/testfolder" + And as "user1" creating a share with + | path | testfolder | + | shareType | 0 | + | permissions | 23 | + | shareWith | user0 | + And user "user0" accepts last share + And As an "user0" + And User "user0" uploads file "data/textfile.txt" to "/testfolder/asdf.txt" + And As an "user1" + When User "user1" deletes file "/testfolder/asdf.txt" + Then the HTTP status code should be "204" + + Scenario: Creating a folder + Given using old dav path + And user "user0" exists + And user "user0" created a folder "/test_folder" + When as "user0" gets properties of folder "/test_folder" with + |{DAV:}resourcetype| + Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection" + + Scenario: Creating a folder with special chars + Given using old dav path + And user "user0" exists + And user "user0" created a folder "/test_folder:5" + When as "user0" gets properties of folder "/test_folder:5" with + |{DAV:}resourcetype| + Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection" + + Scenario: Removing everything of a folder + Given using old dav path + And As an "admin" + And user "user0" exists + And As an "user0" + And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" + And user "user0" created a folder "/FOLDER/SUBFOLDER" + And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt" + When User "user0" deletes everything from folder "/FOLDER/" + Then user "user0" should see following elements + | /FOLDER/ | + | /PARENT/ | + | /PARENT/parent.txt | + | /textfile0.txt | + | /textfile1.txt | + | /textfile2.txt | + | /textfile3.txt | + | /textfile4.txt | + + Scenario: Removing everything of a folder using new dav path + Given using new dav path + And As an "admin" + And user "user0" exists + And As an "user0" + And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" + And user "user0" created a folder "/FOLDER/SUBFOLDER" + And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt" + When User "user0" deletes everything from folder "/FOLDER/" + Then user "user0" should see following elements + | /FOLDER/ | + | /PARENT/ | + | /PARENT/parent.txt | + | /textfile0.txt | + | /textfile1.txt | + | /textfile2.txt | + | /textfile3.txt | + | /textfile4.txt | + + Scenario: Checking file id after a move using new endpoint + Given using new dav path + And user "user0" exists + And User "user0" stores id of file "/textfile0.txt" + When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" + Then User "user0" checks id of file "/FOLDER/textfile0.txt" + + Scenario: Checking file id after a move overwrite using new chunking endpoint + Given using new dav path + And user "user0" exists + And User "user0" copies file "/textfile0.txt" to "/existingFile.txt" + And User "user0" stores id of file "/existingFile.txt" + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + When user "user0" moves new chunk file with id "chunking-42" to "/existingFile.txt" + Then User "user0" checks id of file "/existingFile.txt" + + Scenario: Renaming a folder to a backslash encoded should return an error using old endpoint + Given using old dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/%5C" + Then the HTTP status code should be "400" + + Scenario: Renaming a folder beginning with a backslash encoded should return an error using old endpoint + Given using old dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/%5Ctestshare" + Then the HTTP status code should be "400" + + Scenario: Renaming a folder including a backslash encoded should return an error using old endpoint + Given using old dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/hola%5Chola" + Then the HTTP status code should be "400" + + Scenario: Renaming a folder to a backslash encoded should return an error using new endpoint + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/%5C" + Then the HTTP status code should be "400" + + Scenario: Renaming a folder beginning with a backslash encoded should return an error using new endpoint + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/%5Ctestshare" + Then the HTTP status code should be "400" + + Scenario: Renaming a folder including a backslash encoded should return an error using new endpoint + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/testshare" + When User "user0" moves folder "/testshare" to "/hola%5Chola" + Then the HTTP status code should be "400" + + Scenario: Upload file via new chunking endpoint with wrong size header + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 5 + Then the HTTP status code should be "400" + + Scenario: Upload file via new chunking endpoint with correct size header + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking upload with id "chunking-42" + And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" + And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" + And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" + When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 15 + Then the HTTP status code should be "201" + + Scenario: Upload bulked files + Given user "user0" exists + And user "user0" uploads bulked files "A.txt" with "AAAAA" and "B.txt" with "BBBBB" and "C.txt" with "CCCCC" + When As an "user0" + Then Downloading file "/A.txt" + And Downloaded content should be "AAAAA" + And File "/A.txt" should have prop "d:getlastmodified" equal to "Fri, 18 Mar 2005 01:58:31 GMT" + And Downloading file "/B.txt" + And Downloaded content should be "BBBBB" + And File "/B.txt" should have prop "d:getlastmodified" equal to "Sat, 02 Jun 2040 03:57:02 GMT" + And Downloading file "/C.txt" + And Downloaded content should be "CCCCC" + And File "/C.txt" should have prop "d:getlastmodified" equal to "Sun, 18 Aug 2075 05:55:33 GMT" + + Scenario: Creating a folder with invalid characters + Given using new dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And As an "user1" + And user "user1" created a folder "/testshare " + Then the HTTP status code should be "400" + + @s3-multipart + Scenario: Upload chunked file asc with new chunking v2 + Given using new dav path + And user "user0" exists + And user "user0" creates a file locally with "3" x 5 MB chunks + And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/myChunkedFile1.txt" + And user "user0" uploads new chunk v2 file "1" to id "chunking-42" + And user "user0" uploads new chunk v2 file "2" to id "chunking-42" + And user "user0" uploads new chunk v2 file "3" to id "chunking-42" + And user "user0" moves new chunk v2 file with id "chunking-42" + Then the S3 multipart upload was successful with status "201" + When As an "user0" + And Downloading file "/myChunkedFile1.txt" + Then Downloaded content should be the created file + + @s3-multipart + Scenario: Upload chunked file desc with new chunking v2 + Given using new dav path + And user "user0" exists + And user "user0" creates a file locally with "3" x 5 MB chunks + And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/myChunkedFile.txt" + And user "user0" uploads new chunk v2 file "3" to id "chunking-42" + And user "user0" uploads new chunk v2 file "2" to id "chunking-42" + And user "user0" uploads new chunk v2 file "1" to id "chunking-42" + And user "user0" moves new chunk v2 file with id "chunking-42" + Then the S3 multipart upload was successful with status "201" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be the created file + + @s3-multipart + Scenario: Upload chunked file with random chunk sizes + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking v2 upload with id "chunking-random" and destination "/myChunkedFile.txt" + And user user0 creates the chunk 1 with a size of 5 MB + And user user0 creates the chunk 2 with a size of 7 MB + And user user0 creates the chunk 3 with a size of 9 MB + And user user0 creates the chunk 4 with a size of 1 MB + And user "user0" uploads new chunk v2 file "1" to id "chunking-random" + And user "user0" uploads new chunk v2 file "3" to id "chunking-random" + And user "user0" uploads new chunk v2 file "2" to id "chunking-random" + And user "user0" uploads new chunk v2 file "4" to id "chunking-random" + And user "user0" moves new chunk v2 file with id "chunking-random" + Then the S3 multipart upload was successful with status "201" + When As an "user0" + And Downloading file "/myChunkedFile.txt" + Then Downloaded content should be the created file + + @s3-multipart + Scenario: Upload chunked file with too low chunk sizes + Given using new dav path + And user "user0" exists + And user "user0" creates a new chunking v2 upload with id "chunking-random" and destination "/myChunkedFile.txt" + And user user0 creates the chunk 1 with a size of 5 MB + And user user0 creates the chunk 2 with a size of 2 MB + And user user0 creates the chunk 3 with a size of 5 MB + And user user0 creates the chunk 4 with a size of 1 MB + And user "user0" uploads new chunk v2 file "1" to id "chunking-random" + And user "user0" uploads new chunk v2 file "3" to id "chunking-random" + And user "user0" uploads new chunk v2 file "2" to id "chunking-random" + And user "user0" uploads new chunk v2 file "4" to id "chunking-random" + And user "user0" moves new chunk v2 file with id "chunking-random" + Then the upload should fail on object storage + + @s3-multipart + Scenario: Upload chunked file with special characters with new chunking v2 + Given using new dav path + And user "user0" exists + And user "user0" creates a file locally with "3" x 5 MB chunks + And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/äöü.txt" + And user "user0" uploads new chunk v2 file "1" to id "chunking-42" + And user "user0" uploads new chunk v2 file "2" to id "chunking-42" + And user "user0" uploads new chunk v2 file "3" to id "chunking-42" + And user "user0" moves new chunk v2 file with id "chunking-42" + Then the S3 multipart upload was successful with status "201" + When As an "user0" + And Downloading file "/äöü.txt" + Then Downloaded content should be the created file + + @s3-multipart + Scenario: Upload chunked file with special characters in path with new chunking v2 + Given using new dav path + And user "user0" exists + And User "user0" created a folder "üäöé" + And user "user0" creates a file locally with "3" x 5 MB chunks + And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/üäöé/äöü.txt" + And user "user0" uploads new chunk v2 file "1" to id "chunking-42" + And user "user0" uploads new chunk v2 file "2" to id "chunking-42" + And user "user0" uploads new chunk v2 file "3" to id "chunking-42" + And user "user0" moves new chunk v2 file with id "chunking-42" + Then the S3 multipart upload was successful with status "201" + When As an "user0" + And Downloading file "/üäöé/äöü.txt" + Then Downloaded content should be the created file diff --git a/build/integration/features/caldav.feature b/build/integration/features/caldav.feature deleted file mode 100644 index e2cb4f8dc92..00000000000 --- a/build/integration/features/caldav.feature +++ /dev/null @@ -1,77 +0,0 @@ -Feature: caldav - Scenario: Accessing a not existing calendar of another user - Given user "user0" exists - When "admin" requests calendar "user0/MyCalendar" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Accessing a not shared calendar of another user - Given user "user0" exists - Given "admin" creates a calendar named "MyCalendar" - Given The CalDAV HTTP status code should be "201" - When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Accessing a not shared calendar of another user via the legacy endpoint - Given user "user0" exists - Given "admin" creates a calendar named "MyCalendar" - Given The CalDAV HTTP status code should be "201" - When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Accessing a not existing calendar of another user - Given user "user0" exists - When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Accessing a not existing calendar of another user via the legacy endpoint - Given user "user0" exists - When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/caldav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Accessing a not existing calendar of myself - Given user "user0" exists - When "user0" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'MyCalendar' could not be found" - - Scenario: Creating a new calendar - When "admin" creates a calendar named "MyCalendar" - Then The CalDAV HTTP status code should be "201" - And "admin" requests calendar "admin/MyCalendar" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "207" - - Scenario: Propfind on public calendar endpoint without calendars - When "admin" creates a calendar named "MyCalendar" - Then The CalDAV HTTP status code should be "201" - And "admin" publicly shares the calendar named "MyCalendar" - Then The CalDAV HTTP status code should be "202" - When "admin" requests calendar "/" on the endpoint "/remote.php/dav/public-calendars" - Then The CalDAV HTTP status code should be "207" - Then There should be "0" calendars in the response body - - Scenario: Create calendar request for non-existing calendar of another user - Given user "user0" exists - When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'admin' could not be found" - - Scenario: Create calendar request for existing calendar of another user - Given user "user0" exists - When "admin" creates a calendar named "MyCalendar2" - Then The CalDAV HTTP status code should be "201" - When "user0" sends a create calendar request to "admin/MyCalendar2" on the endpoint "/remote.php/dav/calendars/" - Then The CalDAV HTTP status code should be "404" - And The exception is "Sabre\DAV\Exception\NotFound" - And The error message is "Node with name 'admin' could not be found" diff --git a/build/integration/features/carddav.feature b/build/integration/features/carddav.feature deleted file mode 100644 index 9c9df6ddd94..00000000000 --- a/build/integration/features/carddav.feature +++ /dev/null @@ -1,79 +0,0 @@ -Feature: carddav - Scenario: Accessing a not existing addressbook of another user - Given user "user0" exists - When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" - - Scenario: Accessing a not shared addressbook of another user - Given user "user0" exists - Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" - When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" - - Scenario: Accessing a not existing addressbook of another user via legacy endpoint - Given user "user0" exists - When "admin" requests addressbook "user0/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" - - Scenario: Accessing a not shared addressbook of another user via legacy endpoint - Given user "user0" exists - Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" - When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/carddav/addressbooks/" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" - - Scenario: Accessing a not existing addressbook of myself - Given user "user0" exists - When "user0" requests addressbook "admin/MyAddressbook" with statuscode "404" on the endpoint "/remote.php/dav/addressbooks/users/" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "Addressbook with name 'MyAddressbook' could not be found" - - Scenario: Creating a new addressbook - When "admin" creates an addressbook named "MyAddressbook" with statuscode "201" - Then "admin" requests addressbook "admin/MyAddressbook" with statuscode "207" on the endpoint "/remote.php/dav/addressbooks/users/" - - Scenario: Accessing ones own contact - Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" - Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook" - When Downloading the contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin" - Then The following HTTP headers should be set - |Content-Disposition|attachment; filename*=UTF-8''bjoern.vcf; filename="bjoern.vcf"| - |Content-Type|text/vcard; charset=utf-8| - |Content-Security-Policy|default-src 'none';| - |X-Content-Type-Options |nosniff| - |X-Frame-Options|SAMEORIGIN| - |X-Permitted-Cross-Domain-Policies|none| - |X-Robots-Tag|noindex, nofollow| - |X-XSS-Protection|1; mode=block| - - Scenario: Exporting the picture of ones own contact - Given "admin" creates an addressbook named "MyAddressbook" with statuscode "201" - Given "admin" uploads the contact "bjoern.vcf" to the addressbook "MyAddressbook" - When Exporting the picture of contact "bjoern.vcf" from addressbook "MyAddressbook" as user "admin" - Then The following HTTP headers should be set - |Content-Disposition|attachment; filename=bjoern.vcf.jpg| - |Content-Type|image/jpeg| - |Content-Security-Policy|default-src 'none';| - |X-Content-Type-Options |nosniff| - |X-Frame-Options|SAMEORIGIN| - |X-Permitted-Cross-Domain-Policies|none| - |X-Robots-Tag|noindex, nofollow| - |X-XSS-Protection|1; mode=block| - - Scenario: Create addressbook request for non-existing addressbook of another user - Given user "user0" exists - When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/" - Then The CardDAV HTTP status code should be "404" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "File not found: admin in 'addressbooks'" - - Scenario: Create addressbook request for existing addressbook of another user - Given user "user0" exists - When "admin" creates an addressbook named "MyAddressbook2" with statuscode "201" - When "user0" sends a create addressbook request to "admin/MyAddressbook2" on the endpoint "/remote.php/dav/addressbooks/" - Then The CardDAV HTTP status code should be "404" - And The CardDAV exception is "Sabre\DAV\Exception\NotFound" - And The CardDAV error message is "File not found: admin in 'addressbooks'" diff --git a/build/integration/features/checksums.feature b/build/integration/features/checksums.feature deleted file mode 100644 index d391e93afe8..00000000000 --- a/build/integration/features/checksums.feature +++ /dev/null @@ -1,76 +0,0 @@ -Feature: checksums - - Scenario: Uploading a file with checksum should work - Given user "user0" exists - When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - Then The webdav response should have a status code "201" - - Scenario: Uploading a file with checksum should return the checksum in the propfind - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When user "user0" request the checksum of "/myChecksumFile.txt" via propfind - Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Uploading a file with checksum should return the checksum in the download header - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When user "user0" downloads the file "/myChecksumFile.txt" - Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Moving a file with checksum should return the checksum in the propfind - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" - And user "user0" request the checksum of "/myMovedChecksumFile.txt" via propfind - Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Moving file with checksum should return the checksum in the download header - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" - And user "user0" downloads the file "/myMovedChecksumFile.txt" - Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Copying a file with checksum should return the checksum in the propfind - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" - And user "user0" request the checksum of "/myChecksumFileCopy.txt" via propfind - Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Copying file with checksum should return the checksum in the download header - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" - And user "user0" downloads the file "/myChecksumFileCopy.txt" - Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" - - Scenario: Overwriting a file with checksum should remove the checksum and not return it in the propfind - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" - And user "user0" request the checksum of "/myChecksumFile.txt" via propfind - Then The webdav checksum should be empty - - Scenario: Overwriting a file with checksum should remove the checksum and not return it in the download header - Given user "user0" exists - And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" - When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" - And user "user0" downloads the file "/myChecksumFile.txt" - Then The OC-Checksum header should not be there - - Scenario: Uploading a chunked file with checksum should return the checksum in the propfind - Given user "user0" exists - And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - When user "user0" request the checksum of "/myChecksumFile.txt" via propfind - Then The webdav checksum should match "MD5:e892fdd61a74bc89cd05673cc2e22f88" - - Scenario: Uploading a chunked file with checksum should return the checksum in the download header - Given user "user0" exists - And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" - When user "user0" downloads the file "/myChecksumFile.txt" - Then The header checksum should match "MD5:e892fdd61a74bc89cd05673cc2e22f88" diff --git a/build/integration/features/comments-search.feature b/build/integration/features/comments-search.feature deleted file mode 100644 index a1d116ee3f4..00000000000 --- a/build/integration/features/comments-search.feature +++ /dev/null @@ -1,271 +0,0 @@ -Feature: comments-search - - Scenario: Search my own comment on a file belonging to myself - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "first" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | My first comment | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My first comment | - - Scenario: Search my own comment on a file shared by someone with me - Given user "user0" exists - And user "user1" exists - And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" - And as "user1" creating a share with - | path | sharedFileToComment.txt | - | shareWith | user0 | - | shareType | 0 | - And user "user0" accepts last share - And "user0" posts a comment with content "My first comment" on the file named "/sharedFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "first" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | My first comment | - | authorId | user0 | - | authorName | user0 | - | path | sharedFileToComment.txt | - | fileName | sharedFileToComment.txt | - | name | My first comment | - - Scenario: Search other user's comment on a file shared by me - Given user "user0" exists - And user "user1" exists - And User "user0" uploads file "data/textfile.txt" to "/mySharedFileToComment.txt" - And as "user0" creating a share with - | path | mySharedFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - And "user1" posts a comment with content "Other's first comment" on the file named "/mySharedFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "first" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | Other's first comment | - | authorId | user1 | - | authorName | user1 | - | path | mySharedFileToComment.txt | - | fileName | mySharedFileToComment.txt | - | name | Other's first comment | - - Scenario: Search other user's comment on a file shared by someone with me - Given user "user0" exists - And user "user1" exists - And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" - And as "user1" creating a share with - | path | sharedFileToComment.txt | - | shareWith | user0 | - | shareType | 0 | - And user "user0" accepts last share - And "user1" posts a comment with content "Other's first comment" on the file named "/sharedFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "first" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | Other's first comment | - | authorId | user1 | - | authorName | user1 | - | path | sharedFileToComment.txt | - | fileName | sharedFileToComment.txt | - | name | Other's first comment | - - Scenario: Search several comments on a file belonging to myself - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "My first comment to be found" on the file named "/myFileToComment.txt" it should return "201" - And "user0" posts a comment with content "The second comment should not be found" on the file named "/myFileToComment.txt" it should return "201" - And "user0" posts a comment with content "My third comment to be found" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "comment to be found" in app "files" - Then the list of search results has "2" results - And search result "0" contains - | type | comment | - | comment | My third comment to be found | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My third comment to be found | - And search result "1" contains - | type | comment | - | comment | My first comment to be found | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My first comment to be found | - - Scenario: Search comment with a large message ellipsized on the right - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "verbose" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | A very verbose message that is meant to… | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | - - Scenario: Search comment with a large message ellipsized on the left - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "searching" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | …ed message returned when searching for long comments | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | - - Scenario: Search comment with a large message ellipsized on both ends - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "ellipsized" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | …t to be used to test the ellipsized message returned when se… | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | A very verbose message that is meant to be used to test the ellipsized message returned when searching for long comments | - - Scenario: Search comment on a file in a subfolder - Given user "user0" exists - And user "user0" created a folder "/subfolder" - And User "user0" uploads file "data/textfile.txt" to "/subfolder/myFileToComment.txt" - And "user0" posts a comment with content "My first comment" on the file named "/subfolder/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "first" in app "files" - Then the list of search results has "1" results - And search result "0" contains - | type | comment | - | comment | My first comment | - | authorId | user0 | - | authorName | user0 | - | path | subfolder/myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My first comment | - - Scenario: Search several comments - Given user "user0" exists - And user "user1" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And User "user0" uploads file "data/textfile.txt" to "/mySharedFileToComment.txt" - And as "user0" creating a share with - | path | mySharedFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - And User "user1" uploads file "data/textfile.txt" to "/sharedFileToComment.txt" - And as "user1" creating a share with - | path | sharedFileToComment.txt | - | shareWith | user0 | - | shareType | 0 | - And user "user0" accepts last share - And "user0" posts a comment with content "My first comment to be found" on the file named "/myFileToComment.txt" it should return "201" - And "user0" posts a comment with content "The second comment should not be found" on the file named "/myFileToComment.txt" it should return "201" - And "user0" posts a comment with content "My first comment to be found" on the file named "/mySharedFileToComment.txt" it should return "201" - And "user1" posts a comment with content "Other's first comment that should not be found" on the file named "/mySharedFileToComment.txt" it should return "201" - And "user1" posts a comment with content "Other's second comment to be found" on the file named "/mySharedFileToComment.txt" it should return "201" - And "user0" posts a comment with content "My first comment that should not be found" on the file named "/sharedFileToComment.txt" it should return "201" - And "user1" posts a comment with content "Other's first comment to be found" on the file named "/sharedFileToComment.txt" it should return "201" - And "user0" posts a comment with content "My second comment to be found that happens to be more verbose than the others and thus should be ellipsized" on the file named "/sharedFileToComment.txt" it should return "201" - And "user0" posts a comment with content "My third comment to be found" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "comment to be found" in app "files" - Then the list of search results has "6" results - And search result "0" contains - | type | comment | - | comment | My third comment to be found | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My third comment to be found | - And search result "1" contains - | type | comment | - | comment | My second comment to be found that happens to be more … | - | authorId | user0 | - | authorName | user0 | - | path | sharedFileToComment.txt | - | fileName | sharedFileToComment.txt | - | name | My second comment to be found that happens to be more verbose than the others and thus should be ellipsized | - And search result "2" contains - | type | comment | - | comment | Other's first comment to be found | - | authorId | user1 | - | authorName | user1 | - | path | sharedFileToComment.txt | - | fileName | sharedFileToComment.txt | - | name | Other's first comment to be found | - And search result "3" contains - | type | comment | - | comment | Other's second comment to be found | - | authorId | user1 | - | authorName | user1 | - | path | mySharedFileToComment.txt | - | fileName | mySharedFileToComment.txt | - | name | Other's second comment to be found | - And search result "4" contains - | type | comment | - | comment | My first comment to be found | - | authorId | user0 | - | authorName | user0 | - | path | mySharedFileToComment.txt | - | fileName | mySharedFileToComment.txt | - | name | My first comment to be found | - And search result "5" contains - | type | comment | - | comment | My first comment to be found | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | My first comment to be found | - - Scenario: Search comment with a query that also matches a file name - Given user "user0" exists - And User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - And "user0" posts a comment with content "A comment in myFileToComment.txt" on the file named "/myFileToComment.txt" it should return "201" - When Logging in using web as "user0" - And searching for "myFileToComment" in app "files" - Then the list of search results has "2" results - And search result "0" contains - | type | file | - | path | /myFileToComment.txt | - | name | myFileToComment.txt | - And search result "1" contains - | type | comment | - | comment | A comment in myFileToComment.txt | - | authorId | user0 | - | authorName | user0 | - | path | myFileToComment.txt | - | fileName | myFileToComment.txt | - | name | A comment in myFileToComment.txt | diff --git a/build/integration/features/comments.feature b/build/integration/features/comments.feature deleted file mode 100644 index 0f3a4cc75cf..00000000000 --- a/build/integration/features/comments.feature +++ /dev/null @@ -1,215 +0,0 @@ -Feature: comments - Scenario: Creating a comment on a file belonging to myself - Given user "user0" exists - Given As an "user0" - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - When "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user0" - And the response should contain only "1" comments - - Scenario: Creating a comment on a shared file belonging to another user - Given user "user0" exists - Given user "12345" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | 12345 | - | shareType | 0 | - Given user "12345" accepts last share - When "12345" posts a comment with content "A comment from another user" on the file named "/myFileToComment.txt" it should return "201" - Then As "12345" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "A comment from another user" - And the response should contain a property "oc:actorDisplayName" with value "12345" - And the response should contain only "1" comments - - Scenario: Creating a comment on a non-shared file belonging to another user - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Then "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "404" - - Scenario: Reading comments on a non-shared file belonging to another user - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Then As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "404" - - Scenario: Deleting my own comments on a file belonging to myself - Given user "user0" exists - Given As an "user0" - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - Then the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user0" - And the response should contain only "1" comments - And As "user0" delete the created comment it should return "204" - And As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain only "0" comments - - Scenario: Deleting my own comments on a file shared by somebody else - Given user "user0" exists - Given user "user1" exists - Given As an "user0" - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - And the response should contain only "1" comments - And As "user1" delete the created comment it should return "204" - And As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain only "0" comments - - Scenario: Deleting my own comments on a file unshared by someone else - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - And the response should contain only "1" comments - And As "user0" remove all shares from the file named "/myFileToComment.txt" - And As "user1" delete the created comment it should return "404" - And As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "404" - - Scenario: Edit my own comments on a file belonging to myself - Given user "user0" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given "user0" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user0" - And the response should contain only "1" comments - When As "user0" edit the last created comment and set text to "My edited comment" it should return "207" - Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My edited comment" - And the response should contain a property "oc:actorDisplayName" with value "user0" - - Scenario: Edit my own comments on a file shared by someone with me - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - And the response should contain only "1" comments - Given As "user1" edit the last created comment and set text to "My edited comment" it should return "207" - Then As "user1" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My edited comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - - Scenario: Edit my own comments on a file unshared by someone with me - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - When "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - And the response should contain only "1" comments - And As "user0" remove all shares from the file named "/myFileToComment.txt" - When As "user1" edit the last created comment and set text to "My edited comment" it should return "404" - Then As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - And the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - - Scenario: Edit comments of other users should not be possible - Given user "user0" exists - Given user "user1" exists - Given User "user0" uploads file "data/textfile.txt" to "/myFileToComment.txt" - Given as "user0" creating a share with - | path | myFileToComment.txt | - | shareWith | user1 | - | shareType | 0 | - And user "user1" accepts last share - Given "user1" posts a comment with content "My first comment" on the file named "/myFileToComment.txt" it should return "201" - When As "user0" load all the comments of the file named "/myFileToComment.txt" it should return "207" - Then the response should contain a property "oc:parentId" with value "0" - And the response should contain a property "oc:childrenCount" with value "0" - And the response should contain a property "oc:verb" with value "comment" - And the response should contain a property "oc:actorType" with value "users" - And the response should contain a property "oc:objectType" with value "files" - And the response should contain a property "oc:message" with value "My first comment" - And the response should contain a property "oc:actorDisplayName" with value "user1" - And the response should contain only "1" comments - Then As "user0" edit the last created comment and set text to "My edited comment" it should return "403" diff --git a/build/integration/features/dav-v2.feature b/build/integration/features/dav-v2.feature deleted file mode 100644 index a3ac59578e9..00000000000 --- a/build/integration/features/dav-v2.feature +++ /dev/null @@ -1,107 +0,0 @@ -Feature: dav-v2 - Background: - Given using api version "1" - - Scenario: moving a file new endpoint way - Given using new dav path - And As an "admin" - And user "user0" exists - When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" - Then the HTTP status code should be "201" - - Scenario: download a file with range using new endpoint - Given using new dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When Downloading file "/welcome.txt" with range "bytes=52-78" - Then Downloaded content should be "example file for developers" - - Scenario: Downloading a file on the new endpoint should serve security headers - Given using new dav path - And As an "admin" - When Downloading file "/welcome.txt" - Then The following headers should be set - |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"| - |Content-Security-Policy|default-src 'none';| - |X-Content-Type-Options |nosniff| - |X-Frame-Options|SAMEORIGIN| - |X-Permitted-Cross-Domain-Policies|none| - |X-Robots-Tag|noindex, nofollow| - |X-XSS-Protection|1; mode=block| - And Downloaded content should start with "Welcome to your Nextcloud account!" - - Scenario: Doing a GET with a web login should work without CSRF token on the new backend - Given Logging in using web as "admin" - When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken - Then Downloaded content should start with "Welcome to your Nextcloud account!" - Then the HTTP status code should be "200" - - Scenario: Doing a GET with a web login should work with CSRF token on the new backend - Given Logging in using web as "admin" - When Sending a "GET" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken - Then Downloaded content should start with "Welcome to your Nextcloud account!" - Then the HTTP status code should be "200" - - Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the new backend - Given Logging in using web as "admin" - When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" without requesttoken - Then the HTTP status code should be "401" - - Scenario: Doing a PROPFIND with a web login should work with CSRF token on the new backend - Given Logging in using web as "admin" - When Sending a "PROPFIND" to "/remote.php/dav/files/admin/welcome.txt" with requesttoken - Then the HTTP status code should be "207" - - Scenario: Uploading a file having 0B as quota - Given using new dav path - And As an "admin" - And user "user0" exists - And user "user0" has a quota of "0 B" - And As an "user0" - When User "user0" uploads file "data/textfile.txt" to "/asdf.txt" - Then the HTTP status code should be "507" - - Scenario: Uploading a file as recipient using webdav new endpoint having quota - Given using new dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user0" has a quota of "10 MB" - And user "user1" has a quota of "10 MB" - And As an "user1" - And user "user1" created a folder "/testquota" - And as "user1" creating a share with - | path | testquota | - | shareType | 0 | - | permissions | 31 | - | shareWith | user0 | - And user "user0" accepts last share - And As an "user0" - When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" - Then the HTTP status code should be "201" - - Scenario: Create a search query on image - Given using new dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" - Then Image search should work - And the response should be empty - When User "user0" uploads file "data/green-square-256.png" to "/image.png" - Then Image search should work - And the single response should contain a property "{DAV:}getcontenttype" with value "image/png" - - Scenario: Create a search query on favorite - Given using new dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" uploads file "data/green-square-256.png" to "/fav_image.png" - Then Favorite search should work - And the response should be empty - When user "user0" favorites element "/fav_image.png" - Then Favorite search should work - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" - diff --git a/build/integration/features/download.feature b/build/integration/features/download.feature deleted file mode 100644 index 16d346b0150..00000000000 --- a/build/integration/features/download.feature +++ /dev/null @@ -1,294 +0,0 @@ -Feature: download - - Scenario: downloading 2 small files returns a zip32 - Given using new dav path - And user "user0" exists - And User "user0" copies file "/welcome.txt" to "/welcome2.txt" - When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data - And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/welcome2.txt" from "user0" data - - Scenario: downloading a small file and a directory returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/emptySubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "emptySubFolder/" - - Scenario: downloading a small file and 2 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/subFolder" - And user "user0" created a folder "/subFolder/emptySubSubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "subFolder/" - And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/" - - Scenario: downloading dir with 2 small files returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" - And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome2.txt" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/sparseFolder/welcome2.txt" from "user0" data - - Scenario: downloading dir with a small file and a directory returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" - And user "user0" created a folder "/sparseFolder/emptySubFolder" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/" - - Scenario: downloading dir with a small file and 2 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" - And user "user0" created a folder "/sparseFolder/subFolder" - And user "user0" created a folder "/sparseFolder/subFolder/emptySubSubFolder" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "sparseFolder/subFolder/" - And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/" - - Scenario: downloading (from folder) 2 small files returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" - And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome2.txt" - When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/baseFolder/welcome2.txt" from "user0" data - - Scenario: downloading (from folder) a small file and a directory returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" - And user "user0" created a folder "/baseFolder/emptySubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "emptySubFolder/" - - Scenario: downloading (from folder) a small file and 2 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" - And user "user0" created a folder "/baseFolder/subFolder" - And user "user0" created a folder "/baseFolder/subFolder/emptySubSubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "subFolder/" - And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/" - - Scenario: downloading (from folder) dir with 2 small files returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And user "user0" created a folder "/baseFolder/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" - And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome2.txt" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/baseFolder/sparseFolder/welcome2.txt" from "user0" data - - Scenario: downloading (from folder) dir with a small file and a directory returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And user "user0" created a folder "/baseFolder/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" - And user "user0" created a folder "/baseFolder/sparseFolder/emptySubFolder" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/" - - Scenario: downloading (from folder) dir with a small file and 2 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/baseFolder" - And user "user0" created a folder "/baseFolder/sparseFolder" - And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" - And user "user0" created a folder "/baseFolder/sparseFolder/subFolder" - And user "user0" created a folder "/baseFolder/sparseFolder/subFolder/emptySubSubFolder" - When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "sparseFolder/" - And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "sparseFolder/subFolder/" - And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/" - - @large - Scenario: downloading small file and dir with 65524 small files and 9 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/crowdedFolder" - And user "user0" created a folder "/crowdedFolder/subFolder1" - And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" - And user "user0" created a folder "/crowdedFolder/subFolder2" - And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" - And user "user0" created a folder "/crowdedFolder/subFolder3" - And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" - And user "user0" created a folder "/crowdedFolder/subFolder4" - And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" - And user "user0" created a folder "/crowdedFolder/subFolder5" - And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" - And user "user0" created a folder "/crowdedFolder/subFolder6" - And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" - And user "user0" created a folder "/crowdedFolder/subFolder7" - And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" - And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data - And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" - - @large - Scenario: downloading dir with 65525 small files and 9 nested directories returns a zip32 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/crowdedFolder" - And user "user0" created a folder "/crowdedFolder/subFolder1" - And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" - And user "user0" created a folder "/crowdedFolder/subFolder2" - And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" - And user "user0" created a folder "/crowdedFolder/subFolder3" - And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" - And user "user0" created a folder "/crowdedFolder/subFolder4" - And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" - And user "user0" created a folder "/crowdedFolder/subFolder5" - And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" - And user "user0" created a folder "/crowdedFolder/subFolder6" - And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" - And user "user0" created a folder "/crowdedFolder/subFolder7" - And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" - When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/" - Then the downloaded zip file is a zip32 file - And the downloaded zip file contains a folder named "crowdedFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" - And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data - And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" - - @large - Scenario: downloading small file and dir with 65524 small files and 10 nested directories returns a zip64 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/crowdedFolder" - And user "user0" created a folder "/crowdedFolder/subFolder1" - And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" - And user "user0" created a folder "/crowdedFolder/subFolder2" - And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" - And user "user0" created a folder "/crowdedFolder/subFolder3" - And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" - And user "user0" created a folder "/crowdedFolder/subFolder4" - And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" - And user "user0" created a folder "/crowdedFolder/subFolder5" - And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" - And user "user0" created a folder "/crowdedFolder/subFolder6" - And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" - And user "user0" created a folder "/crowdedFolder/subFolder7" - And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder" - When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/" - Then the downloaded zip file is a zip64 file - And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" - And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data - And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/" - - @large - Scenario: downloading dir with 65525 small files and 10 nested directories returns a zip64 - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/crowdedFolder" - And user "user0" created a folder "/crowdedFolder/subFolder1" - And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" - And user "user0" created a folder "/crowdedFolder/subFolder2" - And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" - And user "user0" created a folder "/crowdedFolder/subFolder3" - And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" - And user "user0" created a folder "/crowdedFolder/subFolder4" - And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" - And user "user0" created a folder "/crowdedFolder/subFolder5" - And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" - And user "user0" created a folder "/crowdedFolder/subFolder6" - And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" - And user "user0" created a folder "/crowdedFolder/subFolder7" - And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data - And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" - And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder" - When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/" - Then the downloaded zip file is a zip64 file - And the downloaded zip file contains a folder named "crowdedFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" - And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data - And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" - And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/" diff --git a/build/integration/features/external-storage.feature b/build/integration/features/external-storage.feature deleted file mode 100644 index d92cca3c458..00000000000 --- a/build/integration/features/external-storage.feature +++ /dev/null @@ -1,62 +0,0 @@ -Feature: external-storage - Background: - Given using api version "1" - Given using old dav path - - @local_storage - Scenario: Share by link a file inside a local external storage - Given user "user0" exists - And user "user1" exists - And As an "user0" - And user "user0" created a folder "/local_storage/foo" - And User "user0" moved file "/textfile0.txt" to "/local_storage/foo/textfile0.txt" - And folder "/local_storage/foo" of user "user0" is shared with user "user1" - And As an "user1" - And accepting last share - When creating a share with - | path | foo | - | shareType | 3 | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And Share fields of last share match with - | id | A_NUMBER | - | url | AN_URL | - | token | A_TOKEN | - | mimetype | httpd/unix-directory | - - Scenario: Shares don't overwrite external storage - Given user "user0" exists - And user "user1" exists - And As an "user0" - And User "user0" moved file "/textfile0.txt" to "/local_storage/textfile0.txt" - And invoking occ with "files_external:create --user user0 test local null::null -c datadir=./build/integration/work/local_storage" - And invoking occ with "files:scan --path /user0/files/test" - And as "user0" the file "/local_storage/textfile0.txt" exists - And as "user0" the folder "/test" exists - And as "user0" the file "/test/textfile0.txt" exists - And As an "user1" - And user "user1" created a folder "/test" - And User "user1" moved file "/textfile0.txt" to "/test/textfile1.txt" - And folder "/test" of user "user1" is shared with user "user0" - And As an "user0" - Then as "user0" the file "/test/textfile1.txt" does not exist - - Scenario: Move a file into storage works - Given user "user0" exists - And user "user1" exists - And As an "user0" - And user "user0" created a folder "/local_storage/foo1" - When User "user0" moved file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt" - Then as "user1" the file "/local_storage/foo1/textfile0.txt" exists - And as "user0" the file "/local_storage/foo1/textfile0.txt" exists - - Scenario: Move a file out of the storage works - Given user "user0" exists - And user "user1" exists - And As an "user0" - And user "user0" created a folder "/local_storage/foo2" - And User "user0" moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt" - When User "user1" moved file "/local_storage/foo2/textfile0.txt" to "/local.txt" - Then as "user1" the file "/local_storage/foo2/textfile0.txt" does not exist - And as "user0" the file "/local_storage/foo2/textfile0.txt" does not exist - And as "user1" the file "/local.txt" exists diff --git a/build/integration/features/favorites.feature b/build/integration/features/favorites.feature deleted file mode 100644 index 0439ada9d60..00000000000 --- a/build/integration/features/favorites.feature +++ /dev/null @@ -1,149 +0,0 @@ -Feature: favorite - Background: - Given using api version "1" - - Scenario: Favorite a folder - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - Then as "user0" gets properties of folder "/FOLDER" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" - - Scenario: Favorite and unfavorite a folder - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - And user "user0" unfavorites element "/FOLDER" - Then as "user0" gets properties of folder "/FOLDER" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" - - Scenario: Favorite a file - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/textfile0.txt" - Then as "user0" gets properties of file "/textfile0.txt" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" - - Scenario: Favorite and unfavorite a file - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/textfile0.txt" - And user "user0" unfavorites element "/textfile0.txt" - Then as "user0" gets properties of file "/textfile0.txt" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" - - Scenario: Favorite a folder new endpoint - Given using new dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - Then as "user0" gets properties of folder "/FOLDER" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" - - Scenario: Favorite and unfavorite a folder new endpoint - Given using new dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - And user "user0" unfavorites element "/FOLDER" - Then as "user0" gets properties of folder "/FOLDER" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" - - Scenario: Favorite a file new endpoint - Given using new dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/textfile0.txt" - Then as "user0" gets properties of file "/textfile0.txt" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" - - Scenario: Favorite and unfavorite a file new endpoint - Given using new dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/textfile0.txt" - And user "user0" unfavorites element "/textfile0.txt" - Then as "user0" gets properties of file "/textfile0.txt" with - |{http://owncloud.org/ns}favorite| - And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" - - Scenario: Get favorited elements of a folder - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - And user "user0" favorites element "/textfile0.txt" - And user "user0" favorites element "/textfile1.txt" - Then user "user0" in folder "/" should have favorited the following elements - | /FOLDER | - | /textfile0.txt | - | /textfile1.txt | - - Scenario: Get favorited elements of a folder using new path - Given using new dav path - And As an "admin" - And user "user0" exists - When user "user0" favorites element "/FOLDER" - And user "user0" favorites element "/textfile0.txt" - And user "user0" favorites element "/textfile1.txt" - Then user "user0" in folder "/" should have favorited the following elements - | /FOLDER | - | /textfile0.txt | - | /textfile1.txt | - - Scenario: Get favorited elements of a subfolder - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user0" created a folder "/subfolder" - And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt" - And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt" - And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt" - When user "user0" favorites element "/subfolder/textfile0.txt" - And user "user0" favorites element "/subfolder/textfile1.txt" - And user "user0" favorites element "/subfolder/textfile2.txt" - And user "user0" unfavorites element "/subfolder/textfile1.txt" - Then user "user0" in folder "/subfolder" should have favorited the following elements - | /subfolder/textfile0.txt | - | /subfolder/textfile2.txt | - - Scenario: Get favorited elements of a subfolder using new path - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user0" created a folder "/subfolder" - And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt" - And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt" - And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt" - When user "user0" favorites element "/subfolder/textfile0.txt" - And user "user0" favorites element "/subfolder/textfile1.txt" - And user "user0" favorites element "/subfolder/textfile2.txt" - And user "user0" unfavorites element "/subfolder/textfile1.txt" - Then user "user0" in folder "/subfolder" should have favorited the following elements - | /subfolder/textfile0.txt | - | /subfolder/textfile2.txt | - - Scenario: moving a favorite file out of a share keeps favorite state - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user0" created a folder "/shared" - And User "user0" moved file "/textfile0.txt" to "/shared/shared_file.txt" - And folder "/shared" of user "user0" is shared with user "user1" - And user "user1" accepts last share - And user "user1" favorites element "/shared/shared_file.txt" - When User "user1" moved file "/shared/shared_file.txt" to "/taken_out.txt" - Then user "user1" in folder "/" should have favorited the following elements - | /taken_out.txt | diff --git a/build/integration/features/tags.feature b/build/integration/features/tags.feature deleted file mode 100644 index 495008ffdd2..00000000000 --- a/build/integration/features/tags.feature +++ /dev/null @@ -1,462 +0,0 @@ -Feature: tags - - Scenario: Creating a normal tag as regular user should work - Given user "user0" exists - When "user0" creates a "normal" tag with name "MySuperAwesomeTagName" - Then The response should have a status code "201" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|true|true| - And The following tags should exist for "user0" - |MySuperAwesomeTagName|true|true| - - Scenario: Creating a not user-assignable tag as regular user should fail - Given user "user0" exists - When "user0" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" - Then The response should have a status code "400" - And "0" tags should exist for "admin" - - Scenario: Creating a not user-visible tag as regular user should fail - Given user "user0" exists - When "user0" creates a "not user-visible" tag with name "MySuperAwesomeTagName" - Then The response should have a status code "400" - And "0" tags should exist for "admin" - - Scenario: Creating a not user-assignable tag with groups as admin should work - Given user "user0" exists - When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" - Then The response should have a status code "201" - And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group2" - - Scenario: Creating a normal tag with groups as regular user should fail - Given user "user0" exists - When "user0" creates a "normal" tag with name "MySuperAwesomeTagName" and groups "group1|group2" - Then The response should have a status code "400" - And "0" tags should exist for "user0" - - Scenario: Renaming a normal tag as regular user should work - Given user "user0" exists - Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" - When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" - Then The response should have a status code "207" - And The following tags should exist for "admin" - |AnotherTagName|true|true| - - Scenario: Renaming a not user-assignable tag as regular user should fail - Given user "user0" exists - Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" - When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" - Then The response should have a status code "403" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|true|false| - - Scenario: Renaming a not user-visible tag as regular user should fail - Given user "user0" exists - Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" - When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" - Then The response should have a status code "404" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|false|true| - - Scenario: Editing tag groups as admin should work - Given user "user0" exists - Given "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" - When "admin" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3" - Then The response should have a status code "207" - And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group3" - - Scenario: Editing tag groups as regular user should fail - Given user "user0" exists - Given "admin" creates a "not user-assignable" tag with name "TagWithGroups" - When "user0" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3" - Then The response should have a status code "403" - - Scenario: Deleting a normal tag as regular user should fail - Given user "user0" exists - Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" - When "user0" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "403" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|true|true| - - Scenario: Deleting a not user-assignable tag as regular user should fail - Given user "user0" exists - Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" - When "user0" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "403" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|true|false| - - Scenario: Deleting a not user-visible tag as regular user should fail - Given user "user0" exists - Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" - When "user0" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "404" - And The following tags should exist for "admin" - |MySuperAwesomeTagName|false|true| - - Scenario: Deleting a normal tag as admin should work - Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" - When "admin" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "204" - And "0" tags should exist for "admin" - - Scenario: Deleting a not user-assignable tag as admin should work - Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" - When "admin" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "204" - And "0" tags should exist for "admin" - - Scenario: Deleting a not user-visible tag as admin should work - Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" - When "admin" deletes the tag with name "MySuperAwesomeTagName" - Then The response should have a status code "204" - And "0" tags should exist for "admin" - - Scenario: Assigning a normal tag to a file shared by someone else as regular user should work - Given user "user0" exists - Given user "12345" exists - Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | 12345 | - | shareType | 0 | - Given user "12345" accepts last share - When "12345" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "201" - And "/myFileToTag.txt" shared by "user0" has the following tags - |MySuperAwesomeTagName| - - Scenario: Assigning a normal tag to a file belonging to someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "404" - And "/myFileToTag.txt" shared by "user0" has the following tags - |MyFirstTag| - - Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "not user-assignable" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "403" - And "/myFileToTag.txt" shared by "user0" has the following tags - |MyFirstTag| - - Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user belongs to tag's groups should work - Given user "user0" exists - Given user "user1" exists - Given group "group1" exists - Given user "user1" belongs to group "group1" - Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" and groups "group1" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - When "user1" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "201" - And "/myFileToTag.txt" shared by "user0" has the following tags - |MySuperAwesomeTagName| - - - Scenario: Assigning a not user-visible tag to a file shared by someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "not user-visible" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "412" - And "/myFileToTag.txt" shared by "user0" has the following tags - |MyFirstTag| - - Scenario: Assigning a not user-visible tag to a file shared by someone else as admin user should work - Given user "user0" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "not user-visible" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "201" - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MyFirstTag| - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MyFirstTag| - - Scenario: Assigning a not user-assignable tag to a file shared by someone else as admin user should worj - Given user "user0" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "not user-assignable" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "201" - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MyFirstTag| - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MyFirstTag| - |MySecondTag| - - Scenario: Unassigning a normal tag from a file shared by someone else as regular user should work - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "204" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MySecondTag| - - Scenario: Unassigning a normal tag from a file unshared by someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "404" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MyFirstTag| - |MySecondTag| - - Scenario: Unassigning a not user-visible tag from a file shared by someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-visible" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "404" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MyFirstTag| - |MySecondTag| - - Scenario: Unassigning a not user-visible tag from a file shared by someone else as admin should work - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-visible" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "204" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MySecondTag| - - Scenario: Unassigning a not user-visible tag from a file unshared by someone else should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-visible" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Given As "user0" remove all shares from the file named "/myFileToTag.txt" - When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "404" - - Scenario: Unassigning a not user-assignable tag from a file shared by someone else as regular user should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "403" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MyFirstTag| - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MyFirstTag| - |MySecondTag| - - Scenario: Unassigning a not user-assignable tag from a file shared by someone else as admin should work - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "204" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MySecondTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" - |MySecondTag| - - Scenario: Unassigning a not user-assignable tag from a file unshared by someone else should fail - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" - Given "admin" creates a "normal" tag with name "MySecondTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | user1 | - | shareType | 0 | - Given user "user1" accepts last share - Given as "user0" creating a share with - | path | myFileToTag.txt | - | shareWith | admin | - | shareType | 0 | - Given user "admin" accepts last share - Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" - Given As "user0" remove all shares from the file named "/myFileToTag.txt" - When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" - Then The response should have a status code "404" - - Scenario: Overwriting existing normal tags should fail - Given user "user0" exists - Given "user0" creates a "normal" tag with name "MyFirstTag" - When "user0" creates a "normal" tag with name "MyFirstTag" - Then The response should have a status code "409" - - Scenario: Overwriting existing not user-assignable tags should fail - Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" - When "admin" creates a "not user-assignable" tag with name "MyFirstTag" - Then The response should have a status code "409" - - Scenario: Overwriting existing not user-visible tags should fail - Given "admin" creates a "not user-visible" tag with name "MyFirstTag" - When "admin" creates a "not user-visible" tag with name "MyFirstTag" - Then The response should have a status code "409" - - Scenario: Getting tags only works with access to the file - Given user "user0" exists - Given user "user1" exists - Given "admin" creates a "normal" tag with name "MyFirstTag" - Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" - When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" - And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" - |MyFirstTag| - And "/myFileToTag.txt" shared by "user0" has the following tags for "user1" - || - And The response should have a status code "404" - - Scenario: User can assign tags when in the tag's groups - Given user "user0" exists - Given group "group1" exists - Given user "user0" belongs to group "group1" - When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" - Then The response should have a status code "201" - And the user "user0" can assign the "not user-assignable" tag with name "TagWithGroups" - - Scenario: User cannot assign tags when not in the tag's groups - Given user "user0" exists - When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" - Then The response should have a status code "201" - And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups" - - Scenario: Assign a normal tag to a file - Given user "user0" exists - And "admin" creates a "normal" tag with name "Etiqueta" - And As an "user0" - When "user0" adds the tag "Etiqueta" to "/textfile0.txt" owned by "user0" - Then The response should have a status code "201" - And "textfile0.txt" owned by "user0" has the following tags - | Etiqueta | - diff --git a/build/integration/features/transfer-ownership.feature b/build/integration/features/transfer-ownership.feature deleted file mode 100644 index 22e34dcf7af..00000000000 --- a/build/integration/features/transfer-ownership.feature +++ /dev/null @@ -1,594 +0,0 @@ -Feature: transfer-ownership - - Scenario: transferring ownership of a file - Given user "user0" exists - And user "user1" exists - And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the file "/somefile.txt" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the file "/somefile.txt" exists - - Scenario: transferring ownership of a folder - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - - Scenario: transferring ownership from user with risky display name - Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - - Scenario: transferring ownership of file shares - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" - And file "/somefile.txt" of user "user0" is shared with user "user2" with permissions 19 - And user "user2" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the file "/somefile.txt" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the file "/somefile.txt" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of folder shared with third user - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of folder shared with transfer recipient - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with user "user1" with permissions 31 - And user "user1" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - Then as "user1" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And Getting info of last share - And the OCS status code should be "404" - - Scenario: transferring ownership of folder doubly shared with third user - Given group "group1" exists - And user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user2" belongs to group "group1" - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with group "group1" with permissions 31 - And user "user2" accepts last share - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of file shares to user with the same id as the group - Given user "user0" exists - And user "test" exists - And user "user2" exists - And group "test" exists - And user "user2" belongs to group "test" - And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" - And file "/somefile.txt" of user "user0" is shared with group "test" - And user "user2" accepts last share - When transferring ownership from "user0" to "test" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the file "/somefile.txt" does not exist - And using received transfer folder of "user1" as dav path - And as "test" the file "/somefile.txt" exists - And As an "test" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | test | - | uid_file_owner | test | - | share_with | test | - - Scenario: transferring ownership of folder reshared with another user - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user3" exists - And User "user3" created a folder "/test" - And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user3" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" exists - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" does not exist - And As an "user0" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user0 | - | uid_file_owner | user3 | - | share_with | user2 | - - Scenario: transferring ownership of folder reshared with group to a user in the group - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user3" exists - And group "group1" exists - And user "user1" belongs to group "group1" - And User "user3" created a folder "/test" - And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user3" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And folder "/test" of user "user0" is shared with group "group1" with permissions 31 - And user "user1" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" exists - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" does not exist - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user3 | - | share_with | group1 | - - Scenario: transferring ownership of folder reshared with group to a user not in the group - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user3" exists - And group "group1" exists - And user "user2" belongs to group "group1" - And User "user3" created a folder "/test" - And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user3" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And folder "/test" of user "user0" is shared with group "group1" with permissions 31 - And user "user2" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" exists - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" does not exist - And As an "user0" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user0 | - | uid_file_owner | user3 | - | share_with | group1 | - - Scenario: transferring ownership does not transfer received shares - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user2" created a folder "/test" - And folder "/test" of user "user2" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then as "user1" the folder "/test" does not exist - And using old dav path - And as "user0" the folder "/test" exists - And As an "user2" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user2 | - | uid_file_owner | user2 | - | share_with | user0 | - - @local_storage - Scenario: transferring ownership does not transfer external storage - Given user "user0" exists - And user "user1" exists - When transferring ownership from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then as "user1" the folder "/local_storage" does not exist - - Scenario: transferring ownership does not fail with shared trashed files - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user0" created a folder "/sub" - And User "user0" created a folder "/sub/test" - And folder "/sub/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - And User "user0" deletes folder "/sub" - When transferring ownership from "user0" to "user1" - Then the command was successful - - Scenario: transferring ownership fails with invalid source user - Given user "user0" exists - When transferring ownership from "invalid_user" to "user0" - Then the command output contains the text "Unknown source user" - And the command failed with exit code 1 - - Scenario: transferring ownership fails with invalid target user - Given user "user0" exists - When transferring ownership from "user0" to "invalid_user" - Then the command output contains the text "Unknown destination user invalid_user" - And the command failed with exit code 1 - - Scenario: transferring ownership of a file - Given user "user0" exists - And user "user1" exists - And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" - When transferring ownership of path "somefile.txt" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the file "/somefile.txt" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the file "/somefile.txt" exists - - Scenario: transferring ownership of a folder - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - - Scenario: transferring ownership from user with risky display name - Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - - Scenario: transferring ownership of path does not affect other files - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And User "user0" created a folder "/test2" - And User "user0" uploads file "data/textfile.txt" to "/test2/somefile.txt" - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And as "user0" the folder "/test2" exists - And as "user0" the file "/test2/somefile.txt" exists - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And as "user1" the folder "/test2" does not exist - - Scenario: transferring ownership of path does not affect other shares - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And User "user0" created a folder "/test2" - And User "user0" uploads file "data/textfile.txt" to "/test2/sharedfile.txt" - And file "/test2/sharedfile.txt" of user "user0" is shared with user "user1" with permissions 19 - And user "user1" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And as "user0" the folder "/test2" exists - And as "user0" the file "/test2/sharedfile.txt" exists - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And as "user1" the folder "/test2" does not exist - And using old dav path - And as "user1" the file "/sharedfile.txt" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user0 | - | uid_file_owner | user0 | - | share_with | user1 | - - Scenario: transferring ownership of file shares - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19 - And user "user2" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of folder shared with third user - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of folder shared with transfer recipient - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with user "user1" with permissions 31 - And user "user1" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user1" - Then as "user1" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And Getting info of last share - And the OCS status code should be "404" - - Scenario: transferring ownership of folder doubly shared with third user - Given group "group1" exists - And user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user2" belongs to group "group1" - And User "user0" created a folder "/test" - And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user0" is shared with group "group1" with permissions 31 - And user "user2" accepts last share - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - And the command was successful - And As an "user2" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" - And using old dav path - And as "user0" the folder "/test" does not exist - And using received transfer folder of "user1" as dav path - And as "user1" the folder "/test" exists - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user1 | - | share_with | user2 | - - Scenario: transferring ownership of path fails for reshares - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And user "user3" exists - And User "user3" created a folder "/test" - And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" - And folder "/test" of user "user3" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And folder "/test" of user "user0" is shared with user "user2" with permissions 31 - And user "user2" accepts last share - When transferring ownership of path "test" from "user0" to "user1" - Then the command failed with exit code 1 - And the command output contains the text "Could not transfer files." - - Scenario: transferring ownership does not transfer received shares - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user2" created a folder "/test" - And User "user0" created a folder "/sub" - And folder "/test" of user "user2" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And User "user0" moved folder "/test" to "/sub/test" - When transferring ownership of path "sub" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then as "user1" the folder "/sub" exists - And as "user1" the folder "/sub/test" does not exist - And using old dav path - And as "user0" the folder "/sub" does not exist - And Getting info of last share - And the OCS status code should be "404" - - Scenario: transferring ownership transfers received shares into subdir when requested - Given user "user0" exists - And user "user1" exists - And user "user2" exists - And User "user2" created a folder "/transfer-share" - And User "user2" created a folder "/do-not-transfer" - And User "user0" created a folder "/sub" - And folder "/transfer-share" of user "user2" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - And User "user0" moved folder "/transfer-share" to "/sub/transfer-share" - And folder "/do-not-transfer" of user "user2" is shared with user "user0" with permissions 31 - And user "user0" accepts last share - When transferring ownership of path "sub" from "user0" to "user1" with received shares - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then as "user1" the folder "/sub" exists - And as "user1" the folder "/do-not-transfer" does not exist - And as "user1" the folder "/sub/do-not-transfer" does not exist - And as "user1" the folder "/sub/transfer-share" exists - And using old dav path - And as "user1" the folder "/transfer-share" does not exist - And as "user1" the folder "/do-not-transfer" does not exist - And using old dav path - And as "user0" the folder "/sub" does not exist - And as "user0" the folder "/do-not-transfer" exists - And Getting info of last share - And the OCS status code should be "404" - - Scenario: transferring ownership does not transfer external storage - Given user "user0" exists - And user "user1" exists - And User "user0" created a folder "/sub" - When transferring ownership of path "sub" from "user0" to "user1" - And the command was successful - And As an "user1" - And using received transfer folder of "user1" as dav path - Then as "user1" the folder "/local_storage" does not exist - - Scenario: transferring ownership fails with invalid source user - Given user "user0" exists - And User "user0" created a folder "/sub" - When transferring ownership of path "sub" from "invalid_user" to "user0" - Then the command output contains the text "Unknown source user" - And the command failed with exit code 1 - - Scenario: transferring ownership fails with invalid target user - Given user "user0" exists - And User "user0" created a folder "/sub" - When transferring ownership of path "sub" from "user0" to "invalid_user" - Then the command output contains the text "Unknown destination user invalid_user" - And the command failed with exit code 1 - - Scenario: transferring ownership fails with invalid path - Given user "user0" exists - And user "user1" exists - When transferring ownership of path "test" from "user0" to "user1" - Then the command output contains the text "Unknown path provided: test" - And the command failed with exit code 1 diff --git a/build/integration/features/trashbin.feature b/build/integration/features/trashbin.feature deleted file mode 100644 index 3a9c29f7cb8..00000000000 --- a/build/integration/features/trashbin.feature +++ /dev/null @@ -1,81 +0,0 @@ -Feature: trashbin - Background: - Given using api version "1" - And using new dav path - And As an "admin" - And app "files_trashbin" is enabled - - Scenario: deleting a file moves it to trashbin - Given As an "admin" - And user "user0" exists - When User "user0" deletes file "/textfile0.txt" - Then user "user0" in trash folder "/" should have 1 element - And user "user0" in trash folder "/" should have the following elements - | textfile0.txt | - - Scenario: clearing the trashbin - Given As an "admin" - And user "user0" exists - When User "user0" deletes file "/textfile0.txt" - And User "user0" empties trashbin - Then user "user0" in trash folder "/" should have 0 elements - - Scenario: restoring file from trashbin - Given As an "admin" - And user "user0" exists - When User "user0" deletes file "/textfile0.txt" - And user "user0" in restores "/textfile0.txt" from trash - Then user "user0" in trash folder "/" should have 0 elements - And as "user0" the file "/textfile0.txt" exists - - Scenario: deleting and restoring a folder - Given As an "admin" - And user "user0" exists - When User "user0" created a folder "/testfolder" - And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" - And as "user0" the file "/testfolder/textfile0.txt" exists - And User "user0" deletes file "/testfolder" - And user "user0" in trash folder "/" should have 1 element - And user "user0" in trash folder "/" should have the following elements - | testfolder | - And user "user0" in trash folder "/testfolder" should have 1 element - And user "user0" in trash folder "/testfolder" should have the following elements - | textfile0.txt | - And user "user0" in restores "/testfolder" from trash - Then user "user0" in trash folder "/" should have 0 elements - And as "user0" the file "/testfolder/textfile0.txt" exists - - Scenario: deleting a file from a subfolder and restoring it moves it back to the subfolder - Given As an "admin" - And user "user0" exists - When User "user0" created a folder "/testfolder" - And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" - And as "user0" the file "/testfolder/textfile0.txt" exists - And User "user0" deletes file "/testfolder/textfile0.txt" - And user "user0" in trash folder "/" should have 1 element - And user "user0" in trash folder "/" should have the following elements - | textfile0.txt | - And user "user0" in restores "/textfile0.txt" from trash - Then user "user0" in trash folder "/" should have 0 elements - And as "user0" the file "/textfile0.txt" does not exist - And as "user0" the file "/testfolder/textfile0.txt" exists - - Scenario: deleting and a folder and restoring a file inside it - Given As an "admin" - And user "user0" exists - When User "user0" created a folder "/testfolder" - And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" - And as "user0" the file "/testfolder/textfile0.txt" exists - And User "user0" deletes file "/testfolder" - And user "user0" in trash folder "/" should have 1 element - And user "user0" in trash folder "/" should have the following elements - | testfolder | - And user "user0" in trash folder "/testfolder" should have 1 element - And user "user0" in trash folder "/testfolder" should have the following elements - | textfile0.txt | - And user "user0" in restores "/testfolder/textfile0.txt" from trash - Then user "user0" in trash folder "/" should have 1 elements - And user "user0" in trash folder "/testfolder" should have 0 element - And as "user0" the file "/textfile0.txt" exists - - diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature deleted file mode 100644 index 28a0cad619b..00000000000 --- a/build/integration/features/webdav-related.feature +++ /dev/null @@ -1,728 +0,0 @@ -Feature: webdav-related - Background: - Given using api version "1" - - Scenario: Unauthenticated call old dav path - Given using old dav path - When connecting to dav endpoint - Then the HTTP status code should be "401" - And there are no duplicate headers - And The following headers should be set - |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"| - - Scenario: Unauthenticated call new dav path - Given using new dav path - When connecting to dav endpoint - Then the HTTP status code should be "401" - And there are no duplicate headers - And The following headers should be set - |WWW-Authenticate|Basic realm="Nextcloud", charset="UTF-8"| - - Scenario: Moving a file - Given using old dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" - Then the HTTP status code should be "201" - And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: Moving and overwriting a file old way - Given using old dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" moves file "/welcome.txt" to "/textfile0.txt" - Then the HTTP status code should be "204" - And Downloaded content when downloading file "/textfile0.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: Moving a file to a folder with no permissions - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testshare" - And as "user1" creating a share with - | path | testshare | - | shareType | 0 | - | permissions | 1 | - | shareWith | user0 | - And user "user0" accepts last share - And As an "user0" - And User "user0" moves file "/textfile0.txt" to "/testshare/textfile0.txt" - And the HTTP status code should be "403" - When Downloading file "/testshare/textfile0.txt" - Then the HTTP status code should be "404" - - Scenario: Moving a file to overwrite a file in a folder with no permissions - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testshare" - And as "user1" creating a share with - | path | testshare | - | shareType | 0 | - | permissions | 1 | - | shareWith | user0 | - And user "user0" accepts last share - And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt" - And As an "user0" - When User "user0" moves file "/textfile0.txt" to "/testshare/overwritethis.txt" - Then the HTTP status code should be "403" - And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: Copying a file - Given using old dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" copies file "/welcome.txt" to "/FOLDER/welcome.txt" - Then the HTTP status code should be "201" - And Downloaded content when downloading file "/FOLDER/welcome.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: Copying and overwriting a file - Given using old dav path - And As an "admin" - And user "user0" exists - And As an "user0" - When User "user0" copies file "/welcome.txt" to "/textfile1.txt" - Then the HTTP status code should be "204" - And Downloaded content when downloading file "/textfile1.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: Copying a file to a folder with no permissions - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testshare" - And as "user1" creating a share with - | path | testshare | - | shareType | 0 | - | permissions | 1 | - | shareWith | user0 | - And user "user0" accepts last share - And As an "user0" - When User "user0" copies file "/textfile0.txt" to "/testshare/textfile0.txt" - Then the HTTP status code should be "403" - And Downloading file "/testshare/textfile0.txt" - And the HTTP status code should be "404" - - Scenario: Copying a file to overwrite a file into a folder with no permissions - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testshare" - And as "user1" creating a share with - | path | testshare | - | shareType | 0 | - | permissions | 1 | - | shareWith | user0 | - And user "user0" accepts last share - And User "user1" copies file "/welcome.txt" to "/testshare/overwritethis.txt" - And As an "user0" - When User "user0" copies file "/textfile0.txt" to "/testshare/overwritethis.txt" - Then the HTTP status code should be "403" - And Downloaded content when downloading file "/testshare/overwritethis.txt" with range "bytes=0-6" should be "Welcome" - - Scenario: download a file with range - Given using old dav path - And As an "admin" - When Downloading file "/welcome.txt" with range "bytes=52-78" - Then Downloaded content should be "example file for developers" - - Scenario: Upload forbidden if quota is 0 - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user0" has a quota of "0" - When User "user0" uploads file "data/textfile.txt" to "/asdf.txt" - Then the HTTP status code should be "507" - - Scenario: Retrieving folder quota when no quota is set - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" has unlimited quota - Then as "user0" gets properties of folder "/" with - |{DAV:}quota-available-bytes| - And the single response should contain a property "{DAV:}quota-available-bytes" with value "-3" - - Scenario: Retrieving folder quota when quota is set - Given using old dav path - And As an "admin" - And user "user0" exists - When user "user0" has a quota of "10 MB" - Then as "user0" gets properties of folder "/" with - |{DAV:}quota-available-bytes| - And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" - - Scenario: Retrieving folder quota of shared folder with quota when no quota is set for recipient - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user0" has unlimited quota - And user "user1" has a quota of "10 MB" - And As an "user1" - And user "user1" created a folder "/testquota" - And as "user1" creating a share with - | path | testquota | - | shareType | 0 | - | permissions | 31 | - | shareWith | user0 | - And user "user0" accepts last share - Then as "user0" gets properties of folder "/testquota" with - |{DAV:}quota-available-bytes| - And the single response should contain a property "{DAV:}quota-available-bytes" with value "10485421" - - Scenario: Uploading a file as recipient using webdav having quota - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user0" has a quota of "10 MB" - And user "user1" has a quota of "10 MB" - And As an "user1" - And user "user1" created a folder "/testquota" - And as "user1" creating a share with - | path | testquota | - | shareType | 0 | - | permissions | 31 | - | shareWith | user0 | - And user "user0" accepts last share - And As an "user0" - When User "user0" uploads file "data/textfile.txt" to "/testquota/asdf.txt" - Then the HTTP status code should be "201" - - Scenario: Retrieving folder quota when quota is set and a file was uploaded - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user0" has a quota of "1 KB" - And user "user0" adds a file of 93 bytes to "/prueba.txt" - When as "user0" gets properties of folder "/" with - |{DAV:}quota-available-bytes| - Then the single response should contain a property "{DAV:}quota-available-bytes" with value "592" - - Scenario: Retrieving folder quota when quota is set and a file was received - Given using old dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user1" has a quota of "1 KB" - And user "user0" adds a file of 93 bytes to "/user0.txt" - And file "user0.txt" of user "user0" is shared with user "user1" - And user "user1" accepts last share - When as "user1" gets properties of folder "/" with - |{DAV:}quota-available-bytes| - Then the single response should contain a property "{DAV:}quota-available-bytes" with value "685" - - Scenario: download a public shared file with range - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Downloading last public shared file with range "bytes=52-78" - Then Downloaded content should be "example file for developers" - - Scenario: download a public shared file inside a folder with range - Given user "user0" exists - And As an "user0" - When creating a share with - | path | PARENT | - | shareType | 3 | - And Downloading last public shared file inside a folder "/parent.txt" with range "bytes=1-8" - Then Downloaded content should be "extcloud" - - Scenario: Downloading a file on the old endpoint should serve security headers - Given using old dav path - And As an "admin" - When Downloading file "/welcome.txt" - Then The following headers should be set - |Content-Disposition|attachment; filename*=UTF-8''welcome.txt; filename="welcome.txt"| - |Content-Security-Policy|default-src 'none';| - |X-Content-Type-Options |nosniff| - |X-Frame-Options|SAMEORIGIN| - |X-Permitted-Cross-Domain-Policies|none| - |X-Robots-Tag|noindex, nofollow| - |X-XSS-Protection|1; mode=block| - And Downloaded content should start with "Welcome to your Nextcloud account!" - - Scenario: Doing a GET with a web login should work without CSRF token on the old backend - Given Logging in using web as "admin" - When Sending a "GET" to "/remote.php/webdav/welcome.txt" without requesttoken - Then Downloaded content should start with "Welcome to your Nextcloud account!" - Then the HTTP status code should be "200" - - Scenario: Doing a GET with a web login should work with CSRF token on the old backend - Given Logging in using web as "admin" - When Sending a "GET" to "/remote.php/webdav/welcome.txt" with requesttoken - Then Downloaded content should start with "Welcome to your Nextcloud account!" - Then the HTTP status code should be "200" - - Scenario: Doing a PROPFIND with a web login should not work without CSRF token on the old backend - Given Logging in using web as "admin" - When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" without requesttoken - Then the HTTP status code should be "401" - - Scenario: Doing a PROPFIND with a web login should work with CSRF token on the old backend - Given Logging in using web as "admin" - When Sending a "PROPFIND" to "/remote.php/webdav/welcome.txt" with requesttoken - Then the HTTP status code should be "207" - - Scenario: Upload chunked file asc - Given user "user0" exists - And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: Upload chunked file desc - Given user "user0" exists - And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: Upload chunked file random - Given user "user0" exists - And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChunkedFile.txt" - And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: A file that is not shared does not have a share-types property - Given user "user0" exists - And user "user0" created a folder "/test" - When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain an empty property "{http://owncloud.org/ns}share-types" - - Scenario: A file that is shared to a user has a share-types property - Given user "user0" exists - And user "user1" exists - And user "user0" created a folder "/test" - And as "user0" creating a share with - | path | test | - | shareType | 0 | - | permissions | 31 | - | shareWith | user1 | - When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain a share-types property with - | 0 | - - Scenario: A file that is shared to a group has a share-types property - Given user "user0" exists - And group "group1" exists - And user "user0" created a folder "/test" - And as "user0" creating a share with - | path | test | - | shareType | 1 | - | permissions | 31 | - | shareWith | group1 | - When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain a share-types property with - | 1 | - - Scenario: A file that is shared by link has a share-types property - Given user "user0" exists - And user "user0" created a folder "/test" - And as "user0" creating a share with - | path | test | - | shareType | 3 | - | permissions | 31 | - When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain a share-types property with - | 3 | - - Scenario: A file that is shared by user,group and link has a share-types property - Given user "user0" exists - And user "user1" exists - And group "group2" exists - And user "user0" created a folder "/test" - And as "user0" creating a share with - | path | test | - | shareType | 0 | - | permissions | 31 | - | shareWith | user1 | - And as "user0" creating a share with - | path | test | - | shareType | 1 | - | permissions | 31 | - | shareWith | group2 | - And as "user0" creating a share with - | path | test | - | shareType | 3 | - | permissions | 31 | - When as "user0" gets properties of folder "/test" with - |{http://owncloud.org/ns}share-types| - Then the response should contain a share-types property with - | 0 | - | 1 | - | 3 | - - Scenario: Upload chunked file asc with new chunking - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: Upload chunked file desc with new chunking - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: Upload chunked file random with new chunking - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be "AAAAABBBBBCCCCC" - - Scenario: A disabled user cannot use webdav - Given user "userToBeDisabled" exists - And As an "admin" - And assure user "userToBeDisabled" is disabled - When Downloading file "/welcome.txt" as "userToBeDisabled" - Then the HTTP status code should be "503" - - Scenario: Copying files into a folder with edit permissions - Given using dav path "remote.php/webdav" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testcopypermissionsAllowed" - And as "user1" creating a share with - | path | testcopypermissionsAllowed | - | shareType | 0 | - | permissions | 31 | - | shareWith | user0 | - And user "user0" accepts last share - And User "user0" uploads file with content "copytest" to "/copytest.txt" - When User "user0" copies file "/copytest.txt" to "/testcopypermissionsAllowed/copytest.txt" - Then the HTTP status code should be "201" - - Scenario: Copying files into a folder without edit permissions - Given using dav path "remote.php/webdav" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testcopypermissionsNotAllowed" - And as "user1" creating a share with - | path | testcopypermissionsNotAllowed | - | shareType | 0 | - | permissions | 1 | - | shareWith | user0 | - And user "user0" accepts last share - And User "user0" uploads file with content "copytest" to "/copytest.txt" - When User "user0" copies file "/copytest.txt" to "/testcopypermissionsNotAllowed/copytest.txt" - Then the HTTP status code should be "403" - - Scenario: Uploading a file as recipient with limited permissions - Given using new dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And user "user0" has a quota of "10 MB" - And user "user1" has a quota of "10 MB" - And As an "user1" - And user "user1" created a folder "/testfolder" - And as "user1" creating a share with - | path | testfolder | - | shareType | 0 | - | permissions | 23 | - | shareWith | user0 | - And user "user0" accepts last share - And As an "user0" - And User "user0" uploads file "data/textfile.txt" to "/testfolder/asdf.txt" - And As an "user1" - When User "user1" deletes file "/testfolder/asdf.txt" - Then the HTTP status code should be "204" - - Scenario: Creating a folder - Given using old dav path - And user "user0" exists - And user "user0" created a folder "/test_folder" - When as "user0" gets properties of folder "/test_folder" with - |{DAV:}resourcetype| - Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection" - - Scenario: Creating a folder with special chars - Given using old dav path - And user "user0" exists - And user "user0" created a folder "/test_folder:5" - When as "user0" gets properties of folder "/test_folder:5" with - |{DAV:}resourcetype| - Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection" - - Scenario: Removing everything of a folder - Given using old dav path - And As an "admin" - And user "user0" exists - And As an "user0" - And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" - And user "user0" created a folder "/FOLDER/SUBFOLDER" - And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt" - When User "user0" deletes everything from folder "/FOLDER/" - Then user "user0" should see following elements - | /FOLDER/ | - | /PARENT/ | - | /PARENT/parent.txt | - | /textfile0.txt | - | /textfile1.txt | - | /textfile2.txt | - | /textfile3.txt | - | /textfile4.txt | - - Scenario: Removing everything of a folder using new dav path - Given using new dav path - And As an "admin" - And user "user0" exists - And As an "user0" - And User "user0" moves file "/welcome.txt" to "/FOLDER/welcome.txt" - And user "user0" created a folder "/FOLDER/SUBFOLDER" - And User "user0" copies file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt" - When User "user0" deletes everything from folder "/FOLDER/" - Then user "user0" should see following elements - | /FOLDER/ | - | /PARENT/ | - | /PARENT/parent.txt | - | /textfile0.txt | - | /textfile1.txt | - | /textfile2.txt | - | /textfile3.txt | - | /textfile4.txt | - - Scenario: Checking file id after a move using new endpoint - Given using new dav path - And user "user0" exists - And User "user0" stores id of file "/textfile0.txt" - When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" - Then User "user0" checks id of file "/FOLDER/textfile0.txt" - - Scenario: Checking file id after a move overwrite using new chunking endpoint - Given using new dav path - And user "user0" exists - And User "user0" copies file "/textfile0.txt" to "/existingFile.txt" - And User "user0" stores id of file "/existingFile.txt" - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - When user "user0" moves new chunk file with id "chunking-42" to "/existingFile.txt" - Then User "user0" checks id of file "/existingFile.txt" - - Scenario: Renaming a folder to a backslash encoded should return an error using old endpoint - Given using old dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/%5C" - Then the HTTP status code should be "400" - - Scenario: Renaming a folder beginning with a backslash encoded should return an error using old endpoint - Given using old dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/%5Ctestshare" - Then the HTTP status code should be "400" - - Scenario: Renaming a folder including a backslash encoded should return an error using old endpoint - Given using old dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/hola%5Chola" - Then the HTTP status code should be "400" - - Scenario: Renaming a folder to a backslash encoded should return an error using new endpoint - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/%5C" - Then the HTTP status code should be "400" - - Scenario: Renaming a folder beginning with a backslash encoded should return an error using new endpoint - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/%5Ctestshare" - Then the HTTP status code should be "400" - - Scenario: Renaming a folder including a backslash encoded should return an error using new endpoint - Given using new dav path - And user "user0" exists - And user "user0" created a folder "/testshare" - When User "user0" moves folder "/testshare" to "/hola%5Chola" - Then the HTTP status code should be "400" - - Scenario: Upload file via new chunking endpoint with wrong size header - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 5 - Then the HTTP status code should be "400" - - Scenario: Upload file via new chunking endpoint with correct size header - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking upload with id "chunking-42" - And user "user0" uploads new chunk file "1" with "AAAAA" to id "chunking-42" - And user "user0" uploads new chunk file "2" with "BBBBB" to id "chunking-42" - And user "user0" uploads new chunk file "3" with "CCCCC" to id "chunking-42" - When user "user0" moves new chunk file with id "chunking-42" to "/myChunkedFile.txt" with size 15 - Then the HTTP status code should be "201" - - Scenario: Upload bulked files - Given user "user0" exists - And user "user0" uploads bulked files "A.txt" with "AAAAA" and "B.txt" with "BBBBB" and "C.txt" with "CCCCC" - When As an "user0" - Then Downloading file "/A.txt" - And Downloaded content should be "AAAAA" - And File "/A.txt" should have prop "d:getlastmodified" equal to "Fri, 18 Mar 2005 01:58:31 GMT" - And Downloading file "/B.txt" - And Downloaded content should be "BBBBB" - And File "/B.txt" should have prop "d:getlastmodified" equal to "Sat, 02 Jun 2040 03:57:02 GMT" - And Downloading file "/C.txt" - And Downloaded content should be "CCCCC" - And File "/C.txt" should have prop "d:getlastmodified" equal to "Sun, 18 Aug 2075 05:55:33 GMT" - - Scenario: Creating a folder with invalid characters - Given using new dav path - And As an "admin" - And user "user0" exists - And user "user1" exists - And As an "user1" - And user "user1" created a folder "/testshare " - Then the HTTP status code should be "400" - - @s3-multipart - Scenario: Upload chunked file asc with new chunking v2 - Given using new dav path - And user "user0" exists - And user "user0" creates a file locally with "3" x 5 MB chunks - And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/myChunkedFile1.txt" - And user "user0" uploads new chunk v2 file "1" to id "chunking-42" - And user "user0" uploads new chunk v2 file "2" to id "chunking-42" - And user "user0" uploads new chunk v2 file "3" to id "chunking-42" - And user "user0" moves new chunk v2 file with id "chunking-42" - Then the S3 multipart upload was successful with status "201" - When As an "user0" - And Downloading file "/myChunkedFile1.txt" - Then Downloaded content should be the created file - - @s3-multipart - Scenario: Upload chunked file desc with new chunking v2 - Given using new dav path - And user "user0" exists - And user "user0" creates a file locally with "3" x 5 MB chunks - And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/myChunkedFile.txt" - And user "user0" uploads new chunk v2 file "3" to id "chunking-42" - And user "user0" uploads new chunk v2 file "2" to id "chunking-42" - And user "user0" uploads new chunk v2 file "1" to id "chunking-42" - And user "user0" moves new chunk v2 file with id "chunking-42" - Then the S3 multipart upload was successful with status "201" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be the created file - - @s3-multipart - Scenario: Upload chunked file with random chunk sizes - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking v2 upload with id "chunking-random" and destination "/myChunkedFile.txt" - And user user0 creates the chunk 1 with a size of 5 MB - And user user0 creates the chunk 2 with a size of 7 MB - And user user0 creates the chunk 3 with a size of 9 MB - And user user0 creates the chunk 4 with a size of 1 MB - And user "user0" uploads new chunk v2 file "1" to id "chunking-random" - And user "user0" uploads new chunk v2 file "3" to id "chunking-random" - And user "user0" uploads new chunk v2 file "2" to id "chunking-random" - And user "user0" uploads new chunk v2 file "4" to id "chunking-random" - And user "user0" moves new chunk v2 file with id "chunking-random" - Then the S3 multipart upload was successful with status "201" - When As an "user0" - And Downloading file "/myChunkedFile.txt" - Then Downloaded content should be the created file - - @s3-multipart - Scenario: Upload chunked file with too low chunk sizes - Given using new dav path - And user "user0" exists - And user "user0" creates a new chunking v2 upload with id "chunking-random" and destination "/myChunkedFile.txt" - And user user0 creates the chunk 1 with a size of 5 MB - And user user0 creates the chunk 2 with a size of 2 MB - And user user0 creates the chunk 3 with a size of 5 MB - And user user0 creates the chunk 4 with a size of 1 MB - And user "user0" uploads new chunk v2 file "1" to id "chunking-random" - And user "user0" uploads new chunk v2 file "3" to id "chunking-random" - And user "user0" uploads new chunk v2 file "2" to id "chunking-random" - And user "user0" uploads new chunk v2 file "4" to id "chunking-random" - And user "user0" moves new chunk v2 file with id "chunking-random" - Then the upload should fail on object storage - - @s3-multipart - Scenario: Upload chunked file with special characters with new chunking v2 - Given using new dav path - And user "user0" exists - And user "user0" creates a file locally with "3" x 5 MB chunks - And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/äöü.txt" - And user "user0" uploads new chunk v2 file "1" to id "chunking-42" - And user "user0" uploads new chunk v2 file "2" to id "chunking-42" - And user "user0" uploads new chunk v2 file "3" to id "chunking-42" - And user "user0" moves new chunk v2 file with id "chunking-42" - Then the S3 multipart upload was successful with status "201" - When As an "user0" - And Downloading file "/äöü.txt" - Then Downloaded content should be the created file - - @s3-multipart - Scenario: Upload chunked file with special characters in path with new chunking v2 - Given using new dav path - And user "user0" exists - And User "user0" created a folder "üäöé" - And user "user0" creates a file locally with "3" x 5 MB chunks - And user "user0" creates a new chunking v2 upload with id "chunking-42" and destination "/üäöé/äöü.txt" - And user "user0" uploads new chunk v2 file "1" to id "chunking-42" - And user "user0" uploads new chunk v2 file "2" to id "chunking-42" - And user "user0" uploads new chunk v2 file "3" to id "chunking-42" - And user "user0" moves new chunk v2 file with id "chunking-42" - Then the S3 multipart upload was successful with status "201" - When As an "user0" - And Downloading file "/üäöé/äöü.txt" - Then Downloaded content should be the created file diff --git a/build/integration/files_features/checksums.feature b/build/integration/files_features/checksums.feature new file mode 100644 index 00000000000..d391e93afe8 --- /dev/null +++ b/build/integration/files_features/checksums.feature @@ -0,0 +1,76 @@ +Feature: checksums + + Scenario: Uploading a file with checksum should work + Given user "user0" exists + When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + Then The webdav response should have a status code "201" + + Scenario: Uploading a file with checksum should return the checksum in the propfind + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When user "user0" request the checksum of "/myChecksumFile.txt" via propfind + Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Uploading a file with checksum should return the checksum in the download header + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When user "user0" downloads the file "/myChecksumFile.txt" + Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Moving a file with checksum should return the checksum in the propfind + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" + And user "user0" request the checksum of "/myMovedChecksumFile.txt" via propfind + Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Moving file with checksum should return the checksum in the download header + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When User "user0" moved file "/myChecksumFile.txt" to "/myMovedChecksumFile.txt" + And user "user0" downloads the file "/myMovedChecksumFile.txt" + Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Copying a file with checksum should return the checksum in the propfind + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" + And user "user0" request the checksum of "/myChecksumFileCopy.txt" via propfind + Then The webdav checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Copying file with checksum should return the checksum in the download header + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When User "user0" copied file "/myChecksumFile.txt" to "/myChecksumFileCopy.txt" + And user "user0" downloads the file "/myChecksumFileCopy.txt" + Then The header checksum should match "MD5:d70b40f177b14b470d1756a3c12b963a" + + Scenario: Overwriting a file with checksum should remove the checksum and not return it in the propfind + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" + And user "user0" request the checksum of "/myChecksumFile.txt" via propfind + Then The webdav checksum should be empty + + Scenario: Overwriting a file with checksum should remove the checksum and not return it in the download header + Given user "user0" exists + And user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" with checksum "MD5:d70b40f177b14b470d1756a3c12b963a" + When user "user0" uploads file "data/textfile.txt" to "/myChecksumFile.txt" + And user "user0" downloads the file "/myChecksumFile.txt" + Then The OC-Checksum header should not be there + + Scenario: Uploading a chunked file with checksum should return the checksum in the propfind + Given user "user0" exists + And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + When user "user0" request the checksum of "/myChecksumFile.txt" via propfind + Then The webdav checksum should match "MD5:e892fdd61a74bc89cd05673cc2e22f88" + + Scenario: Uploading a chunked file with checksum should return the checksum in the download header + Given user "user0" exists + And user "user0" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + And user "user0" uploads chunk file "2" of "3" with "BBBBB" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + And user "user0" uploads chunk file "3" of "3" with "CCCCC" to "/myChecksumFile.txt" with checksum "MD5:e892fdd61a74bc89cd05673cc2e22f88" + When user "user0" downloads the file "/myChecksumFile.txt" + Then The header checksum should match "MD5:e892fdd61a74bc89cd05673cc2e22f88" diff --git a/build/integration/files_features/download.feature b/build/integration/files_features/download.feature new file mode 100644 index 00000000000..16d346b0150 --- /dev/null +++ b/build/integration/files_features/download.feature @@ -0,0 +1,294 @@ +Feature: download + + Scenario: downloading 2 small files returns a zip32 + Given using new dav path + And user "user0" exists + And User "user0" copies file "/welcome.txt" to "/welcome2.txt" + When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data + And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/welcome2.txt" from "user0" data + + Scenario: downloading a small file and a directory returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/emptySubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "emptySubFolder/" + + Scenario: downloading a small file and 2 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/subFolder" + And user "user0" created a folder "/subFolder/emptySubSubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "subFolder/" + And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/" + + Scenario: downloading dir with 2 small files returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" + And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome2.txt" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/sparseFolder/welcome2.txt" from "user0" data + + Scenario: downloading dir with a small file and a directory returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" + And user "user0" created a folder "/sparseFolder/emptySubFolder" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/" + + Scenario: downloading dir with a small file and 2 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/sparseFolder/welcome.txt" + And user "user0" created a folder "/sparseFolder/subFolder" + And user "user0" created a folder "/sparseFolder/subFolder/emptySubSubFolder" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "sparseFolder/subFolder/" + And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/" + + Scenario: downloading (from folder) 2 small files returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" + And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome2.txt" + When user "user0" downloads zip file for entries '"welcome.txt","welcome2.txt"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a file named "welcome2.txt" with the contents of "/baseFolder/welcome2.txt" from "user0" data + + Scenario: downloading (from folder) a small file and a directory returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" + And user "user0" created a folder "/baseFolder/emptySubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","emptySubFolder"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "emptySubFolder/" + + Scenario: downloading (from folder) a small file and 2 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/welcome.txt" + And user "user0" created a folder "/baseFolder/subFolder" + And user "user0" created a folder "/baseFolder/subFolder/emptySubSubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","subFolder"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/baseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "subFolder/" + And the downloaded zip file contains a folder named "subFolder/emptySubSubFolder/" + + Scenario: downloading (from folder) dir with 2 small files returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And user "user0" created a folder "/baseFolder/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" + And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome2.txt" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a file named "sparseFolder/welcome2.txt" with the contents of "/baseFolder/sparseFolder/welcome2.txt" from "user0" data + + Scenario: downloading (from folder) dir with a small file and a directory returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And user "user0" created a folder "/baseFolder/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" + And user "user0" created a folder "/baseFolder/sparseFolder/emptySubFolder" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "sparseFolder/emptySubFolder/" + + Scenario: downloading (from folder) dir with a small file and 2 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/baseFolder" + And user "user0" created a folder "/baseFolder/sparseFolder" + And User "user0" copies file "/welcome.txt" to "/baseFolder/sparseFolder/welcome.txt" + And user "user0" created a folder "/baseFolder/sparseFolder/subFolder" + And user "user0" created a folder "/baseFolder/sparseFolder/subFolder/emptySubSubFolder" + When user "user0" downloads zip file for entries '"sparseFolder"' in folder "/baseFolder/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "sparseFolder/" + And the downloaded zip file contains a file named "sparseFolder/welcome.txt" with the contents of "/baseFolder/sparseFolder/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "sparseFolder/subFolder/" + And the downloaded zip file contains a folder named "sparseFolder/subFolder/emptySubSubFolder/" + + @large + Scenario: downloading small file and dir with 65524 small files and 9 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/crowdedFolder" + And user "user0" created a folder "/crowdedFolder/subFolder1" + And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" + And user "user0" created a folder "/crowdedFolder/subFolder2" + And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" + And user "user0" created a folder "/crowdedFolder/subFolder3" + And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" + And user "user0" created a folder "/crowdedFolder/subFolder4" + And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" + And user "user0" created a folder "/crowdedFolder/subFolder5" + And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" + And user "user0" created a folder "/crowdedFolder/subFolder6" + And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" + And user "user0" created a folder "/crowdedFolder/subFolder7" + And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" + And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data + And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" + + @large + Scenario: downloading dir with 65525 small files and 9 nested directories returns a zip32 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/crowdedFolder" + And user "user0" created a folder "/crowdedFolder/subFolder1" + And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" + And user "user0" created a folder "/crowdedFolder/subFolder2" + And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" + And user "user0" created a folder "/crowdedFolder/subFolder3" + And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" + And user "user0" created a folder "/crowdedFolder/subFolder4" + And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" + And user "user0" created a folder "/crowdedFolder/subFolder5" + And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" + And user "user0" created a folder "/crowdedFolder/subFolder6" + And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" + And user "user0" created a folder "/crowdedFolder/subFolder7" + And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" + When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/" + Then the downloaded zip file is a zip32 file + And the downloaded zip file contains a folder named "crowdedFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" + And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data + And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" + + @large + Scenario: downloading small file and dir with 65524 small files and 10 nested directories returns a zip64 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/crowdedFolder" + And user "user0" created a folder "/crowdedFolder/subFolder1" + And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" + And user "user0" created a folder "/crowdedFolder/subFolder2" + And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" + And user "user0" created a folder "/crowdedFolder/subFolder3" + And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" + And user "user0" created a folder "/crowdedFolder/subFolder4" + And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" + And user "user0" created a folder "/crowdedFolder/subFolder5" + And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" + And user "user0" created a folder "/crowdedFolder/subFolder6" + And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" + And user "user0" created a folder "/crowdedFolder/subFolder7" + And file "/crowdedFolder/subFolder7/test.txt" is created "5524" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder" + When user "user0" downloads zip file for entries '"welcome.txt","crowdedFolder"' in folder "/" + Then the downloaded zip file is a zip64 file + And the downloaded zip file contains a file named "welcome.txt" with the contents of "/welcome.txt" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" + And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data + And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5523" with the contents of "/crowdedFolder/subFolder7/test.txt-5523" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/" + + @large + Scenario: downloading dir with 65525 small files and 10 nested directories returns a zip64 + Given using new dav path + And user "user0" exists + And user "user0" created a folder "/crowdedFolder" + And user "user0" created a folder "/crowdedFolder/subFolder1" + And file "/crowdedFolder/subFolder1/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder1" + And user "user0" created a folder "/crowdedFolder/subFolder2" + And file "/crowdedFolder/subFolder2/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder2" + And user "user0" created a folder "/crowdedFolder/subFolder3" + And file "/crowdedFolder/subFolder3/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder3" + And user "user0" created a folder "/crowdedFolder/subFolder4" + And file "/crowdedFolder/subFolder4/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder4" + And user "user0" created a folder "/crowdedFolder/subFolder5" + And file "/crowdedFolder/subFolder5/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder5" + And user "user0" created a folder "/crowdedFolder/subFolder6" + And file "/crowdedFolder/subFolder6/test.txt" is created "10000" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder6" + And user "user0" created a folder "/crowdedFolder/subFolder7" + And file "/crowdedFolder/subFolder7/test.txt" is created "5525" times in "user0" user data + And invoking occ with "files:scan --path /user0/files/crowdedFolder/subFolder7" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder" + And user "user0" created a folder "/crowdedFolder/subFolder7/emptySubSubFolder" + When user "user0" downloads zip file for entries '"crowdedFolder"' in folder "/" + Then the downloaded zip file is a zip64 file + And the downloaded zip file contains a folder named "crowdedFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder1/" + And the downloaded zip file contains a file named "crowdedFolder/subFolder1/test.txt-0" with the contents of "/crowdedFolder/subFolder1/test.txt-0" from "user0" data + And the downloaded zip file contains a file named "crowdedFolder/subFolder7/test.txt-5524" with the contents of "/crowdedFolder/subFolder7/test.txt-5524" from "user0" data + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/subSubFolder/emptySubSubSubFolder/" + And the downloaded zip file contains a folder named "crowdedFolder/subFolder7/emptySubSubFolder/" diff --git a/build/integration/files_features/external-storage.feature b/build/integration/files_features/external-storage.feature new file mode 100644 index 00000000000..d92cca3c458 --- /dev/null +++ b/build/integration/files_features/external-storage.feature @@ -0,0 +1,62 @@ +Feature: external-storage + Background: + Given using api version "1" + Given using old dav path + + @local_storage + Scenario: Share by link a file inside a local external storage + Given user "user0" exists + And user "user1" exists + And As an "user0" + And user "user0" created a folder "/local_storage/foo" + And User "user0" moved file "/textfile0.txt" to "/local_storage/foo/textfile0.txt" + And folder "/local_storage/foo" of user "user0" is shared with user "user1" + And As an "user1" + And accepting last share + When creating a share with + | path | foo | + | shareType | 3 | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And Share fields of last share match with + | id | A_NUMBER | + | url | AN_URL | + | token | A_TOKEN | + | mimetype | httpd/unix-directory | + + Scenario: Shares don't overwrite external storage + Given user "user0" exists + And user "user1" exists + And As an "user0" + And User "user0" moved file "/textfile0.txt" to "/local_storage/textfile0.txt" + And invoking occ with "files_external:create --user user0 test local null::null -c datadir=./build/integration/work/local_storage" + And invoking occ with "files:scan --path /user0/files/test" + And as "user0" the file "/local_storage/textfile0.txt" exists + And as "user0" the folder "/test" exists + And as "user0" the file "/test/textfile0.txt" exists + And As an "user1" + And user "user1" created a folder "/test" + And User "user1" moved file "/textfile0.txt" to "/test/textfile1.txt" + And folder "/test" of user "user1" is shared with user "user0" + And As an "user0" + Then as "user0" the file "/test/textfile1.txt" does not exist + + Scenario: Move a file into storage works + Given user "user0" exists + And user "user1" exists + And As an "user0" + And user "user0" created a folder "/local_storage/foo1" + When User "user0" moved file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt" + Then as "user1" the file "/local_storage/foo1/textfile0.txt" exists + And as "user0" the file "/local_storage/foo1/textfile0.txt" exists + + Scenario: Move a file out of the storage works + Given user "user0" exists + And user "user1" exists + And As an "user0" + And user "user0" created a folder "/local_storage/foo2" + And User "user0" moved file "/textfile0.txt" to "/local_storage/foo2/textfile0.txt" + When User "user1" moved file "/local_storage/foo2/textfile0.txt" to "/local.txt" + Then as "user1" the file "/local_storage/foo2/textfile0.txt" does not exist + And as "user0" the file "/local_storage/foo2/textfile0.txt" does not exist + And as "user1" the file "/local.txt" exists diff --git a/build/integration/files_features/favorites.feature b/build/integration/files_features/favorites.feature new file mode 100644 index 00000000000..0439ada9d60 --- /dev/null +++ b/build/integration/files_features/favorites.feature @@ -0,0 +1,149 @@ +Feature: favorite + Background: + Given using api version "1" + + Scenario: Favorite a folder + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a folder + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + And user "user0" unfavorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" + + Scenario: Favorite a file + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a file + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + And user "user0" unfavorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" + + Scenario: Favorite a folder new endpoint + Given using new dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a folder new endpoint + Given using new dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + And user "user0" unfavorites element "/FOLDER" + Then as "user0" gets properties of folder "/FOLDER" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" + + Scenario: Favorite a file new endpoint + Given using new dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "1" + + Scenario: Favorite and unfavorite a file new endpoint + Given using new dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/textfile0.txt" + And user "user0" unfavorites element "/textfile0.txt" + Then as "user0" gets properties of file "/textfile0.txt" with + |{http://owncloud.org/ns}favorite| + And the single response should contain a property "{http://owncloud.org/ns}favorite" with value "0" + + Scenario: Get favorited elements of a folder + Given using old dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + And user "user0" favorites element "/textfile0.txt" + And user "user0" favorites element "/textfile1.txt" + Then user "user0" in folder "/" should have favorited the following elements + | /FOLDER | + | /textfile0.txt | + | /textfile1.txt | + + Scenario: Get favorited elements of a folder using new path + Given using new dav path + And As an "admin" + And user "user0" exists + When user "user0" favorites element "/FOLDER" + And user "user0" favorites element "/textfile0.txt" + And user "user0" favorites element "/textfile1.txt" + Then user "user0" in folder "/" should have favorited the following elements + | /FOLDER | + | /textfile0.txt | + | /textfile1.txt | + + Scenario: Get favorited elements of a subfolder + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user0" created a folder "/subfolder" + And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt" + And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt" + And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt" + When user "user0" favorites element "/subfolder/textfile0.txt" + And user "user0" favorites element "/subfolder/textfile1.txt" + And user "user0" favorites element "/subfolder/textfile2.txt" + And user "user0" unfavorites element "/subfolder/textfile1.txt" + Then user "user0" in folder "/subfolder" should have favorited the following elements + | /subfolder/textfile0.txt | + | /subfolder/textfile2.txt | + + Scenario: Get favorited elements of a subfolder using new path + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user0" created a folder "/subfolder" + And User "user0" moves file "/textfile0.txt" to "/subfolder/textfile0.txt" + And User "user0" moves file "/textfile1.txt" to "/subfolder/textfile1.txt" + And User "user0" moves file "/textfile2.txt" to "/subfolder/textfile2.txt" + When user "user0" favorites element "/subfolder/textfile0.txt" + And user "user0" favorites element "/subfolder/textfile1.txt" + And user "user0" favorites element "/subfolder/textfile2.txt" + And user "user0" unfavorites element "/subfolder/textfile1.txt" + Then user "user0" in folder "/subfolder" should have favorited the following elements + | /subfolder/textfile0.txt | + | /subfolder/textfile2.txt | + + Scenario: moving a favorite file out of a share keeps favorite state + Given using old dav path + And As an "admin" + And user "user0" exists + And user "user1" exists + And user "user0" created a folder "/shared" + And User "user0" moved file "/textfile0.txt" to "/shared/shared_file.txt" + And folder "/shared" of user "user0" is shared with user "user1" + And user "user1" accepts last share + And user "user1" favorites element "/shared/shared_file.txt" + When User "user1" moved file "/shared/shared_file.txt" to "/taken_out.txt" + Then user "user1" in folder "/" should have favorited the following elements + | /taken_out.txt | diff --git a/build/integration/files_features/tags.feature b/build/integration/files_features/tags.feature new file mode 100644 index 00000000000..495008ffdd2 --- /dev/null +++ b/build/integration/files_features/tags.feature @@ -0,0 +1,462 @@ +Feature: tags + + Scenario: Creating a normal tag as regular user should work + Given user "user0" exists + When "user0" creates a "normal" tag with name "MySuperAwesomeTagName" + Then The response should have a status code "201" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|true|true| + And The following tags should exist for "user0" + |MySuperAwesomeTagName|true|true| + + Scenario: Creating a not user-assignable tag as regular user should fail + Given user "user0" exists + When "user0" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" + Then The response should have a status code "400" + And "0" tags should exist for "admin" + + Scenario: Creating a not user-visible tag as regular user should fail + Given user "user0" exists + When "user0" creates a "not user-visible" tag with name "MySuperAwesomeTagName" + Then The response should have a status code "400" + And "0" tags should exist for "admin" + + Scenario: Creating a not user-assignable tag with groups as admin should work + Given user "user0" exists + When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" + Then The response should have a status code "201" + And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group2" + + Scenario: Creating a normal tag with groups as regular user should fail + Given user "user0" exists + When "user0" creates a "normal" tag with name "MySuperAwesomeTagName" and groups "group1|group2" + Then The response should have a status code "400" + And "0" tags should exist for "user0" + + Scenario: Renaming a normal tag as regular user should work + Given user "user0" exists + Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" + When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" + Then The response should have a status code "207" + And The following tags should exist for "admin" + |AnotherTagName|true|true| + + Scenario: Renaming a not user-assignable tag as regular user should fail + Given user "user0" exists + Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" + When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" + Then The response should have a status code "403" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|true|false| + + Scenario: Renaming a not user-visible tag as regular user should fail + Given user "user0" exists + Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" + When "user0" edits the tag with name "MySuperAwesomeTagName" and sets its name to "AnotherTagName" + Then The response should have a status code "404" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|false|true| + + Scenario: Editing tag groups as admin should work + Given user "user0" exists + Given "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" + When "admin" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3" + Then The response should have a status code "207" + And The "not user-assignable" tag with name "TagWithGroups" has the groups "group1|group3" + + Scenario: Editing tag groups as regular user should fail + Given user "user0" exists + Given "admin" creates a "not user-assignable" tag with name "TagWithGroups" + When "user0" edits the tag with name "TagWithGroups" and sets its groups to "group1|group3" + Then The response should have a status code "403" + + Scenario: Deleting a normal tag as regular user should fail + Given user "user0" exists + Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" + When "user0" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "403" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|true|true| + + Scenario: Deleting a not user-assignable tag as regular user should fail + Given user "user0" exists + Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" + When "user0" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "403" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|true|false| + + Scenario: Deleting a not user-visible tag as regular user should fail + Given user "user0" exists + Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" + When "user0" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "404" + And The following tags should exist for "admin" + |MySuperAwesomeTagName|false|true| + + Scenario: Deleting a normal tag as admin should work + Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" + When "admin" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "204" + And "0" tags should exist for "admin" + + Scenario: Deleting a not user-assignable tag as admin should work + Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" + When "admin" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "204" + And "0" tags should exist for "admin" + + Scenario: Deleting a not user-visible tag as admin should work + Given "admin" creates a "not user-visible" tag with name "MySuperAwesomeTagName" + When "admin" deletes the tag with name "MySuperAwesomeTagName" + Then The response should have a status code "204" + And "0" tags should exist for "admin" + + Scenario: Assigning a normal tag to a file shared by someone else as regular user should work + Given user "user0" exists + Given user "12345" exists + Given "admin" creates a "normal" tag with name "MySuperAwesomeTagName" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | 12345 | + | shareType | 0 | + Given user "12345" accepts last share + When "12345" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "201" + And "/myFileToTag.txt" shared by "user0" has the following tags + |MySuperAwesomeTagName| + + Scenario: Assigning a normal tag to a file belonging to someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "404" + And "/myFileToTag.txt" shared by "user0" has the following tags + |MyFirstTag| + + Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "not user-assignable" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "403" + And "/myFileToTag.txt" shared by "user0" has the following tags + |MyFirstTag| + + Scenario: Assigning a not user-assignable tag to a file shared by someone else as regular user belongs to tag's groups should work + Given user "user0" exists + Given user "user1" exists + Given group "group1" exists + Given user "user1" belongs to group "group1" + Given "admin" creates a "not user-assignable" tag with name "MySuperAwesomeTagName" and groups "group1" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + When "user1" adds the tag "MySuperAwesomeTagName" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "201" + And "/myFileToTag.txt" shared by "user0" has the following tags + |MySuperAwesomeTagName| + + + Scenario: Assigning a not user-visible tag to a file shared by someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "not user-visible" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + When "user1" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "412" + And "/myFileToTag.txt" shared by "user0" has the following tags + |MyFirstTag| + + Scenario: Assigning a not user-visible tag to a file shared by someone else as admin user should work + Given user "user0" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "not user-visible" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "201" + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MyFirstTag| + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MyFirstTag| + + Scenario: Assigning a not user-assignable tag to a file shared by someone else as admin user should worj + Given user "user0" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "not user-assignable" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + When "admin" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "201" + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MyFirstTag| + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MyFirstTag| + |MySecondTag| + + Scenario: Unassigning a normal tag from a file shared by someone else as regular user should work + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "204" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MySecondTag| + + Scenario: Unassigning a normal tag from a file unshared by someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "404" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MyFirstTag| + |MySecondTag| + + Scenario: Unassigning a not user-visible tag from a file shared by someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-visible" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "404" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MyFirstTag| + |MySecondTag| + + Scenario: Unassigning a not user-visible tag from a file shared by someone else as admin should work + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-visible" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "204" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MySecondTag| + + Scenario: Unassigning a not user-visible tag from a file unshared by someone else should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-visible" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Given As "user0" remove all shares from the file named "/myFileToTag.txt" + When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "404" + + Scenario: Unassigning a not user-assignable tag from a file shared by someone else as regular user should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "user1" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "403" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MyFirstTag| + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MyFirstTag| + |MySecondTag| + + Scenario: Unassigning a not user-assignable tag from a file shared by someone else as admin should work + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "204" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MySecondTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "admin" + |MySecondTag| + + Scenario: Unassigning a not user-assignable tag from a file unshared by someone else should fail + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" + Given "admin" creates a "normal" tag with name "MySecondTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | user1 | + | shareType | 0 | + Given user "user1" accepts last share + Given as "user0" creating a share with + | path | myFileToTag.txt | + | shareWith | admin | + | shareType | 0 | + Given user "admin" accepts last share + Given "admin" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + Given "user0" adds the tag "MySecondTag" to "/myFileToTag.txt" shared by "user0" + Given As "user0" remove all shares from the file named "/myFileToTag.txt" + When "admin" removes the tag "MyFirstTag" from "/myFileToTag.txt" shared by "user0" + Then The response should have a status code "404" + + Scenario: Overwriting existing normal tags should fail + Given user "user0" exists + Given "user0" creates a "normal" tag with name "MyFirstTag" + When "user0" creates a "normal" tag with name "MyFirstTag" + Then The response should have a status code "409" + + Scenario: Overwriting existing not user-assignable tags should fail + Given "admin" creates a "not user-assignable" tag with name "MyFirstTag" + When "admin" creates a "not user-assignable" tag with name "MyFirstTag" + Then The response should have a status code "409" + + Scenario: Overwriting existing not user-visible tags should fail + Given "admin" creates a "not user-visible" tag with name "MyFirstTag" + When "admin" creates a "not user-visible" tag with name "MyFirstTag" + Then The response should have a status code "409" + + Scenario: Getting tags only works with access to the file + Given user "user0" exists + Given user "user1" exists + Given "admin" creates a "normal" tag with name "MyFirstTag" + Given user "user0" uploads file "data/textfile.txt" to "/myFileToTag.txt" + When "user0" adds the tag "MyFirstTag" to "/myFileToTag.txt" shared by "user0" + And "/myFileToTag.txt" shared by "user0" has the following tags for "user0" + |MyFirstTag| + And "/myFileToTag.txt" shared by "user0" has the following tags for "user1" + || + And The response should have a status code "404" + + Scenario: User can assign tags when in the tag's groups + Given user "user0" exists + Given group "group1" exists + Given user "user0" belongs to group "group1" + When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" + Then The response should have a status code "201" + And the user "user0" can assign the "not user-assignable" tag with name "TagWithGroups" + + Scenario: User cannot assign tags when not in the tag's groups + Given user "user0" exists + When "admin" creates a "not user-assignable" tag with name "TagWithGroups" and groups "group1|group2" + Then The response should have a status code "201" + And the user "user0" cannot assign the "not user-assignable" tag with name "TagWithGroups" + + Scenario: Assign a normal tag to a file + Given user "user0" exists + And "admin" creates a "normal" tag with name "Etiqueta" + And As an "user0" + When "user0" adds the tag "Etiqueta" to "/textfile0.txt" owned by "user0" + Then The response should have a status code "201" + And "textfile0.txt" owned by "user0" has the following tags + | Etiqueta | + diff --git a/build/integration/files_features/transfer-ownership.feature b/build/integration/files_features/transfer-ownership.feature new file mode 100644 index 00000000000..22e34dcf7af --- /dev/null +++ b/build/integration/files_features/transfer-ownership.feature @@ -0,0 +1,594 @@ +Feature: transfer-ownership + + Scenario: transferring ownership of a file + Given user "user0" exists + And user "user1" exists + And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the file "/somefile.txt" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the file "/somefile.txt" exists + + Scenario: transferring ownership of a folder + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + + Scenario: transferring ownership from user with risky display name + Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + + Scenario: transferring ownership of file shares + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" + And file "/somefile.txt" of user "user0" is shared with user "user2" with permissions 19 + And user "user2" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the file "/somefile.txt" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the file "/somefile.txt" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of folder shared with third user + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of folder shared with transfer recipient + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with user "user1" with permissions 31 + And user "user1" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + Then as "user1" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And Getting info of last share + And the OCS status code should be "404" + + Scenario: transferring ownership of folder doubly shared with third user + Given group "group1" exists + And user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user2" belongs to group "group1" + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with group "group1" with permissions 31 + And user "user2" accepts last share + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of file shares to user with the same id as the group + Given user "user0" exists + And user "test" exists + And user "user2" exists + And group "test" exists + And user "user2" belongs to group "test" + And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" + And file "/somefile.txt" of user "user0" is shared with group "test" + And user "user2" accepts last share + When transferring ownership from "user0" to "test" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the file "/somefile.txt" does not exist + And using received transfer folder of "user1" as dav path + And as "test" the file "/somefile.txt" exists + And As an "test" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | test | + | uid_file_owner | test | + | share_with | test | + + Scenario: transferring ownership of folder reshared with another user + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + And User "user3" created a folder "/test" + And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user3" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" exists + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" does not exist + And As an "user0" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user0 | + | uid_file_owner | user3 | + | share_with | user2 | + + Scenario: transferring ownership of folder reshared with group to a user in the group + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + And group "group1" exists + And user "user1" belongs to group "group1" + And User "user3" created a folder "/test" + And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user3" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And folder "/test" of user "user0" is shared with group "group1" with permissions 31 + And user "user1" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" exists + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" does not exist + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user3 | + | share_with | group1 | + + Scenario: transferring ownership of folder reshared with group to a user not in the group + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + And group "group1" exists + And user "user2" belongs to group "group1" + And User "user3" created a folder "/test" + And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user3" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And folder "/test" of user "user0" is shared with group "group1" with permissions 31 + And user "user2" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" exists + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" does not exist + And As an "user0" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user0 | + | uid_file_owner | user3 | + | share_with | group1 | + + Scenario: transferring ownership does not transfer received shares + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user2" created a folder "/test" + And folder "/test" of user "user2" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then as "user1" the folder "/test" does not exist + And using old dav path + And as "user0" the folder "/test" exists + And As an "user2" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user2 | + | uid_file_owner | user2 | + | share_with | user0 | + + @local_storage + Scenario: transferring ownership does not transfer external storage + Given user "user0" exists + And user "user1" exists + When transferring ownership from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then as "user1" the folder "/local_storage" does not exist + + Scenario: transferring ownership does not fail with shared trashed files + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user0" created a folder "/sub" + And User "user0" created a folder "/sub/test" + And folder "/sub/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + And User "user0" deletes folder "/sub" + When transferring ownership from "user0" to "user1" + Then the command was successful + + Scenario: transferring ownership fails with invalid source user + Given user "user0" exists + When transferring ownership from "invalid_user" to "user0" + Then the command output contains the text "Unknown source user" + And the command failed with exit code 1 + + Scenario: transferring ownership fails with invalid target user + Given user "user0" exists + When transferring ownership from "user0" to "invalid_user" + Then the command output contains the text "Unknown destination user invalid_user" + And the command failed with exit code 1 + + Scenario: transferring ownership of a file + Given user "user0" exists + And user "user1" exists + And User "user0" uploads file "data/textfile.txt" to "/somefile.txt" + When transferring ownership of path "somefile.txt" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the file "/somefile.txt" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the file "/somefile.txt" exists + + Scenario: transferring ownership of a folder + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + + Scenario: transferring ownership from user with risky display name + Given user "user0" with displayname "user0 \"risky\"? ヂspḷay 'na|\/|e':.#" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And transfer folder name contains "transferred from user0 -risky- ヂspḷay -na|-|e- on" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + + Scenario: transferring ownership of path does not affect other files + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And User "user0" created a folder "/test2" + And User "user0" uploads file "data/textfile.txt" to "/test2/somefile.txt" + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And as "user0" the folder "/test2" exists + And as "user0" the file "/test2/somefile.txt" exists + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And as "user1" the folder "/test2" does not exist + + Scenario: transferring ownership of path does not affect other shares + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And User "user0" created a folder "/test2" + And User "user0" uploads file "data/textfile.txt" to "/test2/sharedfile.txt" + And file "/test2/sharedfile.txt" of user "user0" is shared with user "user1" with permissions 19 + And user "user1" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And as "user0" the folder "/test2" exists + And as "user0" the file "/test2/sharedfile.txt" exists + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And as "user1" the folder "/test2" does not exist + And using old dav path + And as "user1" the file "/sharedfile.txt" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user0 | + | uid_file_owner | user0 | + | share_with | user1 | + + Scenario: transferring ownership of file shares + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And file "/test/somefile.txt" of user "user0" is shared with user "user2" with permissions 19 + And user "user2" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of folder shared with third user + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of folder shared with transfer recipient + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with user "user1" with permissions 31 + And user "user1" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user1" + Then as "user1" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And Getting info of last share + And the OCS status code should be "404" + + Scenario: transferring ownership of folder doubly shared with third user + Given group "group1" exists + And user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user2" belongs to group "group1" + And User "user0" created a folder "/test" + And User "user0" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user0" is shared with group "group1" with permissions 31 + And user "user2" accepts last share + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + And the command was successful + And As an "user2" + Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" + And using old dav path + And as "user0" the folder "/test" does not exist + And using received transfer folder of "user1" as dav path + And as "user1" the folder "/test" exists + And As an "user1" + And Getting info of last share + And the OCS status code should be "100" + And Share fields of last share match with + | uid_owner | user1 | + | uid_file_owner | user1 | + | share_with | user2 | + + Scenario: transferring ownership of path fails for reshares + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And user "user3" exists + And User "user3" created a folder "/test" + And User "user3" uploads file "data/textfile.txt" to "/test/somefile.txt" + And folder "/test" of user "user3" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And folder "/test" of user "user0" is shared with user "user2" with permissions 31 + And user "user2" accepts last share + When transferring ownership of path "test" from "user0" to "user1" + Then the command failed with exit code 1 + And the command output contains the text "Could not transfer files." + + Scenario: transferring ownership does not transfer received shares + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user2" created a folder "/test" + And User "user0" created a folder "/sub" + And folder "/test" of user "user2" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And User "user0" moved folder "/test" to "/sub/test" + When transferring ownership of path "sub" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then as "user1" the folder "/sub" exists + And as "user1" the folder "/sub/test" does not exist + And using old dav path + And as "user0" the folder "/sub" does not exist + And Getting info of last share + And the OCS status code should be "404" + + Scenario: transferring ownership transfers received shares into subdir when requested + Given user "user0" exists + And user "user1" exists + And user "user2" exists + And User "user2" created a folder "/transfer-share" + And User "user2" created a folder "/do-not-transfer" + And User "user0" created a folder "/sub" + And folder "/transfer-share" of user "user2" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + And User "user0" moved folder "/transfer-share" to "/sub/transfer-share" + And folder "/do-not-transfer" of user "user2" is shared with user "user0" with permissions 31 + And user "user0" accepts last share + When transferring ownership of path "sub" from "user0" to "user1" with received shares + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then as "user1" the folder "/sub" exists + And as "user1" the folder "/do-not-transfer" does not exist + And as "user1" the folder "/sub/do-not-transfer" does not exist + And as "user1" the folder "/sub/transfer-share" exists + And using old dav path + And as "user1" the folder "/transfer-share" does not exist + And as "user1" the folder "/do-not-transfer" does not exist + And using old dav path + And as "user0" the folder "/sub" does not exist + And as "user0" the folder "/do-not-transfer" exists + And Getting info of last share + And the OCS status code should be "404" + + Scenario: transferring ownership does not transfer external storage + Given user "user0" exists + And user "user1" exists + And User "user0" created a folder "/sub" + When transferring ownership of path "sub" from "user0" to "user1" + And the command was successful + And As an "user1" + And using received transfer folder of "user1" as dav path + Then as "user1" the folder "/local_storage" does not exist + + Scenario: transferring ownership fails with invalid source user + Given user "user0" exists + And User "user0" created a folder "/sub" + When transferring ownership of path "sub" from "invalid_user" to "user0" + Then the command output contains the text "Unknown source user" + And the command failed with exit code 1 + + Scenario: transferring ownership fails with invalid target user + Given user "user0" exists + And User "user0" created a folder "/sub" + When transferring ownership of path "sub" from "user0" to "invalid_user" + Then the command output contains the text "Unknown destination user invalid_user" + And the command failed with exit code 1 + + Scenario: transferring ownership fails with invalid path + Given user "user0" exists + And user "user1" exists + When transferring ownership of path "test" from "user0" to "user1" + Then the command output contains the text "Unknown path provided: test" + And the command failed with exit code 1 diff --git a/build/integration/files_features/trashbin.feature b/build/integration/files_features/trashbin.feature new file mode 100644 index 00000000000..3a9c29f7cb8 --- /dev/null +++ b/build/integration/files_features/trashbin.feature @@ -0,0 +1,81 @@ +Feature: trashbin + Background: + Given using api version "1" + And using new dav path + And As an "admin" + And app "files_trashbin" is enabled + + Scenario: deleting a file moves it to trashbin + Given As an "admin" + And user "user0" exists + When User "user0" deletes file "/textfile0.txt" + Then user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | textfile0.txt | + + Scenario: clearing the trashbin + Given As an "admin" + And user "user0" exists + When User "user0" deletes file "/textfile0.txt" + And User "user0" empties trashbin + Then user "user0" in trash folder "/" should have 0 elements + + Scenario: restoring file from trashbin + Given As an "admin" + And user "user0" exists + When User "user0" deletes file "/textfile0.txt" + And user "user0" in restores "/textfile0.txt" from trash + Then user "user0" in trash folder "/" should have 0 elements + And as "user0" the file "/textfile0.txt" exists + + Scenario: deleting and restoring a folder + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | testfolder | + And user "user0" in trash folder "/testfolder" should have 1 element + And user "user0" in trash folder "/testfolder" should have the following elements + | textfile0.txt | + And user "user0" in restores "/testfolder" from trash + Then user "user0" in trash folder "/" should have 0 elements + And as "user0" the file "/testfolder/textfile0.txt" exists + + Scenario: deleting a file from a subfolder and restoring it moves it back to the subfolder + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder/textfile0.txt" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | textfile0.txt | + And user "user0" in restores "/textfile0.txt" from trash + Then user "user0" in trash folder "/" should have 0 elements + And as "user0" the file "/textfile0.txt" does not exist + And as "user0" the file "/testfolder/textfile0.txt" exists + + Scenario: deleting and a folder and restoring a file inside it + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | testfolder | + And user "user0" in trash folder "/testfolder" should have 1 element + And user "user0" in trash folder "/testfolder" should have the following elements + | textfile0.txt | + And user "user0" in restores "/testfolder/textfile0.txt" from trash + Then user "user0" in trash folder "/" should have 1 elements + And user "user0" in trash folder "/testfolder" should have 0 element + And as "user0" the file "/textfile0.txt" exists + + diff --git a/build/integration/sharing_features/sharing-v1-video-verification.feature b/build/integration/sharing_features/sharing-v1-video-verification.feature deleted file mode 100644 index cc4be425aab..00000000000 --- a/build/integration/sharing_features/sharing-v1-video-verification.feature +++ /dev/null @@ -1,505 +0,0 @@ -@Talk -Feature: sharing - Background: - Given using api version "1" - Given using old dav path - Given invoking occ with "app:enable --force spreed" - Given the command was successful - - Scenario: Creating a link share with send password by Talk - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with different password in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Enabling send password by Talk with different password set after creation in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Enabling send password by Talk with same password in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with same password set after creation in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk without updating password in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk without updating password set after creation in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with no password in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share can be downloaded - - Scenario: Enabling send password by Talk with no password removed after creation in a link share - Given user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - And Updating last share with - | password | | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share can be downloaded - - Scenario: Disabling send password by Talk without setting new password in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk without setting new password set after creation in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting same password in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting same password set after creation in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting new password in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Disabling send password by Talk setting new password set after creation in a link share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 3 | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - - - - - Scenario: Creating a mail share with send password by Talk - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with different password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Enabling send password by Talk with different password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Enabling send password by Talk with same password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with same password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk without updating password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk without updating password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Enabling send password by Talk with no password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share can be downloaded - - Scenario: Enabling send password by Talk with no password removed after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - And Updating last share with - | password | | - And Updating last share with - | sendPasswordByTalk | true | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share can be downloaded - - Scenario: Disabling send password by Talk without setting new password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | sendPasswordByTalk | false | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk without setting new password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | sendPasswordByTalk | false | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting same password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting same password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "400" - And the HTTP status code should be "200" - And last share with password "secret" can be downloaded - - Scenario: Disabling send password by Talk setting new password in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded - - Scenario: Disabling send password by Talk setting new password set after creation in a mail share - Given dummy mail server is listening - And user "user0" exists - And As an "user0" - When creating a share with - | path | welcome.txt | - | shareType | 4 | - | shareWith | dummy@test.com | - And Updating last share with - | password | secret | - | sendPasswordByTalk | true | - And Updating last share with - | password | another secret | - | sendPasswordByTalk | false | - Then the OCS status code should be "100" - And the HTTP status code should be "200" - And last share with password "another secret" can be downloaded diff --git a/build/integration/videoverification_features/sharing-v1-video-verification.feature b/build/integration/videoverification_features/sharing-v1-video-verification.feature new file mode 100644 index 00000000000..cc4be425aab --- /dev/null +++ b/build/integration/videoverification_features/sharing-v1-video-verification.feature @@ -0,0 +1,505 @@ +@Talk +Feature: sharing + Background: + Given using api version "1" + Given using old dav path + Given invoking occ with "app:enable --force spreed" + Given the command was successful + + Scenario: Creating a link share with send password by Talk + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with different password in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Enabling send password by Talk with different password set after creation in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Enabling send password by Talk with same password in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with same password set after creation in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk without updating password in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk without updating password set after creation in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with no password in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share can be downloaded + + Scenario: Enabling send password by Talk with no password removed after creation in a link share + Given user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + And Updating last share with + | password | | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share can be downloaded + + Scenario: Disabling send password by Talk without setting new password in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk without setting new password set after creation in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting same password in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting same password set after creation in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting new password in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Disabling send password by Talk setting new password set after creation in a link share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 3 | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + + + + + Scenario: Creating a mail share with send password by Talk + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with different password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Enabling send password by Talk with different password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Enabling send password by Talk with same password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with same password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk without updating password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk without updating password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Enabling send password by Talk with no password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share can be downloaded + + Scenario: Enabling send password by Talk with no password removed after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + And Updating last share with + | password | | + And Updating last share with + | sendPasswordByTalk | true | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share can be downloaded + + Scenario: Disabling send password by Talk without setting new password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | sendPasswordByTalk | false | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk without setting new password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | sendPasswordByTalk | false | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting same password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting same password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "400" + And the HTTP status code should be "200" + And last share with password "secret" can be downloaded + + Scenario: Disabling send password by Talk setting new password in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded + + Scenario: Disabling send password by Talk setting new password set after creation in a mail share + Given dummy mail server is listening + And user "user0" exists + And As an "user0" + When creating a share with + | path | welcome.txt | + | shareType | 4 | + | shareWith | dummy@test.com | + And Updating last share with + | password | secret | + | sendPasswordByTalk | true | + And Updating last share with + | password | another secret | + | sendPasswordByTalk | false | + Then the OCS status code should be "100" + And the HTTP status code should be "200" + And last share with password "another secret" can be downloaded -- cgit v1.2.3