diff --git a/tests/acceptance/features/apiBasic/addUser.feature b/tests/acceptance/features/apiBasic/addUser.feature new file mode 100644 index 000000000..935325269 --- /dev/null +++ b/tests/acceptance/features/apiBasic/addUser.feature @@ -0,0 +1,18 @@ +@api @provisioning_api-app-required @skipOnLDAP +Feature: add user + As an admin + I want to be able to add users + So that I can give people controlled individual access to resources on the ownCloud server + + Scenario Outline: admin creates a user + Given using OCS API version "" + And user "brand-new-user" has been deleted + When the administrator sends a user creation request for user "brand-new-user" password "%alt1%" using the provisioning API + Then the OCS status code should be "" + And the HTTP status code should be "200" + And user "brand-new-user" should exist + And user "brand-new-user" should be able to access a skeleton file + Examples: + | ocs_api_version | ocs_status_code | + | 1 | 100 | + | 2 | 200 | \ No newline at end of file diff --git a/tests/acceptance/features/apiBasic/uploadFile.feature b/tests/acceptance/features/apiBasic/uploadFile.feature new file mode 100644 index 000000000..1cc63b89a --- /dev/null +++ b/tests/acceptance/features/apiBasic/uploadFile.feature @@ -0,0 +1,18 @@ +@api +Feature: upload file + As a user + I want to be able to upload files + So that I can store and share files between multiple client systems + + Scenario Outline: upload a file and check download content + Given using OCS API version "" + And user "Alice" has been created with default attributes and without skeleton files + And using DAV path + When user "Alice" uploads file with content "uploaded content" to "/upload.txt" using the WebDAV API + Then the content of file "/upload.txt" for user "Alice" should be "uploaded content" + Examples: + | ocs_api_version | dav_version | + | 1 | old | + | 1 | new | + | 2 | old | + | 2 | new | \ No newline at end of file diff --git a/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature b/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature new file mode 100644 index 000000000..79f0b3adb --- /dev/null +++ b/tests/acceptance/features/apiBasic/webDavPUTAuthInvalid.feature @@ -0,0 +1,26 @@ +@api +Feature: attempt to PUT files with invalid password + + Background: + Given user "Alice" has been created with default attributes and without skeleton files + And user "Alice" has created folder "/PARENT" + + Scenario: send PUT requests to webDav endpoints as normal user with wrong password + When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "invalid" about user "Alice" + | endpoint | + | /remote.php/webdav/textfile0.txt | + | /remote.php/dav/files/%username%/textfile0.txt | + | /remote.php/webdav/PARENT | + | /remote.php/dav/files/%username%/PARENT | + | /remote.php/dav/files/%username%/PARENT/parent.txt | + Then the HTTP status code of responses on all endpoints should be "401" + + Scenario: send PUT requests to webDav endpoints as normal user with no password + When user "Alice" requests these endpoints with "PUT" including body "doesnotmatter" using password "" about user "Alice" + | endpoint | + | /remote.php/webdav/textfile0.txt | + | /remote.php/dav/files/%username%/textfile0.txt | + | /remote.php/webdav/PARENT | + | /remote.php/dav/files/%username%/PARENT | + | /remote.php/dav/files/%username%/PARENT/parent.txt | + Then the HTTP status code of responses on all endpoints should be "401"