diff --git a/tests/acceptance/expected-failures-API-on-OCIS-storage.md b/tests/acceptance/expected-failures-API-on-OCIS-storage.md index a4258733e..e4147f4e0 100644 --- a/tests/acceptance/expected-failures-API-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-API-on-OCIS-storage.md @@ -70,24 +70,12 @@ _ocdav: api compatibility, return correct status code_ - [coreApiAuth/webDavMKCOLAuth.feature:42](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature#L42) - [coreApiAuth/webDavMKCOLAuth.feature:53](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature#L53) -#### [trying to lock file of another user gives http 200](https://github.com/owncloud/ocis/issues/2176) +#### [trying to lock file of another user gives http 500](https://github.com/owncloud/ocis/issues/2176) - [coreApiAuth/webDavLOCKAuth.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature#L46) - [coreApiAuth/webDavLOCKAuth.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature#L58) -#### [send POST requests to another user's webDav endpoints as normal user](https://github.com/owncloud/ocis/issues/1287) - -_ocdav: api compatibility, return correct status code_ - -- [coreApiAuth/webDavPOSTAuth.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature#L46) -- [coreApiAuth/webDavPOSTAuth.feature:55](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature#L55) - -#### Another users space literally does not exist because it is not listed as a space for him, 404 seems correct, expects 403 - -- [coreApiAuth/webDavPUTAuth.feature:46](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature#L46) -- [coreApiAuth/webDavPUTAuth.feature:58](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature#L58) - -#### [[old/new/spaces] In ocis and oc10, REPORT request response differently](https://github.com/owncloud/ocis/issues/4712) +#### [Missing properties in REPORT response](https://github.com/owncloud/ocis/issues/9780), [REPORT response has different date format for d:getlastmodified](https://github.com/owncloud/ocis/issues/9781), [d:getetag property has empty value in REPORT response](https://github.com/owncloud/ocis/issues/9783) - [coreApiWebdavOperations/search.feature:180](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/search.feature#L180) - [coreApiWebdavOperations/search.feature:181](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavOperations/search.feature#L181) @@ -100,13 +88,13 @@ _ocdav: api compatibility, return correct status code_ - [coreApiFavorites/favorites.feature:101](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L101) - [coreApiFavorites/favorites.feature:102](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L102) +- [coreApiFavorites/favorites.feature:103](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L103) - [coreApiFavorites/favorites.feature:124](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L124) - [coreApiFavorites/favorites.feature:125](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L125) +- [coreApiFavorites/favorites.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L126) - [coreApiFavorites/favorites.feature:189](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L189) - [coreApiFavorites/favorites.feature:190](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L190) - -And other missing implementation of favorites - +- [coreApiFavorites/favorites.feature:191](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L191) - [coreApiFavorites/favorites.feature:145](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L145) - [coreApiFavorites/favorites.feature:146](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L146) - [coreApiFavorites/favorites.feature:147](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L147) @@ -169,35 +157,14 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers - _The `OC-LazyOps` header is [no longer supported by the client](https://github.com/owncloud/client/pull/8398), implementing this is not necessary for a first production release. We plan to have an upload state machine to visualize the state of a file, see https://github.com/owncloud/ocis/issues/214_ - _Blacklisted ignored files are no longer required because ocis can handle `.htaccess` files without security implications introduced by serving user provided files with apache._ -#### [Blacklist files extensions](https://github.com/owncloud/ocis/issues/2177) - -- [coreApiWebdavProperties/copyFile.feature:109](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L109) -- [coreApiWebdavProperties/copyFile.feature:110](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L110) -- [coreApiWebdavProperties/copyFile.feature:111](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L111) -- [coreApiWebdavProperties/createFileFolder.feature:95](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L95) -- [coreApiWebdavProperties/createFileFolder.feature:96](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L96) -- [coreApiWebdavProperties/createFileFolder.feature:97](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature#L97) -- [coreApiWebdavUpload/uploadFile.feature:153](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L153) -- [coreApiWebdavUpload/uploadFile.feature:152](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L152) -- [coreApiWebdavUpload/uploadFile.feature:154](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature#L154) -- [coreApiWebdavMove2/moveFile.feature:177](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L177) -- [coreApiWebdavMove2/moveFile.feature:178](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L178) -- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143) - #### [Renaming resource to banned name is allowed in spaces webdav](https://github.com/owncloud/ocis/issues/3099) +- [coreApiWebdavMove2/moveFile.feature:143](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L143) - [coreApiWebdavMove1/moveFolder.feature:36](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L36) - [coreApiWebdavMove1/moveFolder.feature:50](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L50) - [coreApiWebdavMove1/moveFolder.feature:64](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature#L64) -- [coreApiWebdavMove2/moveFile.feature:179](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature#L179) -#### [REPORT method on spaces returns an incorrect d:href response](https://github.com/owncloud/ocis/issues/3111) - -- [coreApiFavorites/favorites.feature:103](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L103) -- [coreApiFavorites/favorites.feature:126](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L126) -- [coreApiFavorites/favorites.feature:191](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiFavorites/favorites.feature#L191) - -#### [HTTP status code differ while deleting file of another user's trash bin](https://github.com/owncloud/ocis/issues/3544) +#### [Trying to delete other user's trashbin item returns 409 for spaces path instead of 404](https://github.com/owncloud/ocis/issues/9791) - [coreApiTrashbin/trashbinDelete.feature:92](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature#L92) @@ -215,9 +182,9 @@ Not everything needs to be implemented for ocis. While the oc10 testsuite covers ### [COPY file/folder to same name is possible (but 500 code error for folder with spaces path)](https://github.com/owncloud/ocis/issues/8711) - [coreApiSharePublicLink2/copyFromPublicLink.feature:198](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiSharePublicLink2/copyFromPublicLink.feature#L198) -- [coreApiWebdavProperties/copyFile.feature:1071](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1071) -- [coreApiWebdavProperties/copyFile.feature:1072](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1072) -- [coreApiWebdavProperties/copyFile.feature:1073](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1073) +- [coreApiWebdavProperties/copyFile.feature:1067](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1067) +- [coreApiWebdavProperties/copyFile.feature:1068](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1068) +- [coreApiWebdavProperties/copyFile.feature:1069](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature#L1069) Note: always have an empty line at the end of this file. The bash script that processes this file requires that the last line has a newline on the end. diff --git a/tests/acceptance/features/bootstrap/FavoritesContext.php b/tests/acceptance/features/bootstrap/FavoritesContext.php index 0cf927acb..b9117033e 100644 --- a/tests/acceptance/features/bootstrap/FavoritesContext.php +++ b/tests/acceptance/features/bootstrap/FavoritesContext.php @@ -100,7 +100,7 @@ class FavoritesContext implements Context { } /** - * @Then /^user "([^"]*)" should (not|)\s?have favorited the following elements$/ + * @Then /^user "([^"]*)" should (not|)\s?have the following favorited items$/ * * @param string $user * @param string $shouldOrNot (not|) diff --git a/tests/acceptance/features/bootstrap/TrashbinContext.php b/tests/acceptance/features/bootstrap/TrashbinContext.php index 0a337c67a..65f246819 100644 --- a/tests/acceptance/features/bootstrap/TrashbinContext.php +++ b/tests/acceptance/features/bootstrap/TrashbinContext.php @@ -502,41 +502,35 @@ class TrashbinContext implements Context { } /** - * @When user :asUser tries to delete the file with original path :path from the trashbin of user :user using the trashbin API + * @When user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the trashbin API * - * @param string $asUser - * @param string $path * @param string $user + * @param string $path + * @param string $ofUser * * @return void * @throws Exception */ - public function userTriesToDeleteFromTrashbinOfUser(string $asUser, string $path, string $user):void { - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $path, $asUser); - foreach ($responseArray as $response) { - $this->featureContext->setResponse($response); - } + public function userTriesToDeleteFromTrashbinOfUser(string $user, string $path, string $ofUser):void { + $response = $this->deleteItemFromTrashbin($user, $path, $ofUser); + $this->featureContext->setResponse($response); } /** - * @When user :asUser tries to delete the file with original path :path from the trashbin of user :user using the password :password and the trashbin API + * @When user :user tries to delete the file with original path :path from the trashbin of user :ofUser using the password :password and the trashbin API * - * @param string|null $asUser - * @param string|null $path - * @param string|null $user - * @param string|null $password + * @param string $user + * @param string $path + * @param string $ofUser + * @param string $password * * @return void * @throws JsonException * @throws Exception */ - public function userTriesToDeleteFromTrashbinOfUserUsingPassword(?string $asUser, ?string $path, ?string $user, ?string $password):void { - $user = $this->featureContext->getActualUsername($user); - $asUser = $this->featureContext->getActualUsername($asUser); - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $path, $asUser, $password); - foreach ($responseArray as $response) { - $this->featureContext->setResponse($response); - } + public function userTriesToDeleteFromTrashbinOfUserUsingPassword(string $user, string $path, string $ofUser, string $password):void { + $response = $this->deleteItemFromTrashbin($user, $path, $ofUser, $password); + $this->featureContext->setResponse($response); } /** @@ -601,51 +595,54 @@ class TrashbinContext implements Context { * @return void */ public function userTriesToDeleteFileWithOriginalPathFromTrashbinUsingTrashbinAPI(string $user, string $originalPath):void { - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $originalPath); - foreach ($responseArray as $response) { - $this->featureContext->setResponse($response); - } + $response = $this->deleteItemFromTrashbin($user, $originalPath); + $this->featureContext->setResponse($response); } /** - * @param string|null $user - * @param string|null $originalPath - * @param string|null $asUser + * @param string $user + * @param string $originalPath + * @param string|null $ofUser * @param string|null $password * - * @return array + * @return ResponseInterface */ - public function tryToDeleteFileFromTrashbin(?string $user, ?string $originalPath, ?string $asUser = null, ?string $password = null):array { + public function deleteItemFromTrashbin(string $user, string $originalPath, ?string $ofUser = null, ?string $password = null): ResponseInterface { + $ofUser = $ofUser ?? $user; $user = $this->featureContext->getActualUsername($user); - $asUser = $asUser ?? $user; - $listing = $this->listTrashbinFolder($user); - $originalPath = \trim($originalPath, '/'); + $ofUser = $this->featureContext->getActualUsername($ofUser); - $responseArray = []; + $listing = $this->listTrashbinFolder($ofUser); + + $path = ""; + $originalPath = \trim($originalPath, '/'); foreach ($listing as $entry) { // The entry for the trashbin root can have original-location null. // That is reasonable, because the trashbin root is not something that can be restored. $originalLocation = $entry['original-location'] ?? ''; if (\trim($originalLocation, '/') === $originalPath) { - $trashItemHRef = $this->convertTrashbinHref($entry['href']); - $response = $this->featureContext->makeDavRequest( - $asUser, - 'DELETE', - $trashItemHRef, - [], - null, - 'trash-bin', - null, - false, - $password, - [], - $user - ); - $responseArray[] = $response; + $path = $entry['href']; + break; } } - return $responseArray; + if ($path === "") { + throw new Exception( + __METHOD__ + . " could not find the trashbin entry for original path '$originalPath' of user '$user'" + ); + } + + $password = $password ?? $this->featureContext->getPasswordForUser($user); + $fullUrl = $this->featureContext->getBaseUrl() . $path; + + return HttpRequestHelper::sendRequest( + $fullUrl, + $this->featureContext->getStepLineRef(), + "DELETE", + $user, + $password + ); } /** @@ -658,16 +655,8 @@ class TrashbinContext implements Context { * @throws Exception */ public function deleteFileFromTrashbin(string $user, string $originalPath):void { - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $originalPath); - $numItemDeleted = \count($responseArray); - Assert::assertEquals( - 1, - $numItemDeleted, - "Expected to delete exactly one item from the trashbin but $numItemDeleted were deleted" - ); - foreach ($responseArray as $response) { - $this->featureContext->setResponse($response); - } + $response = $this->deleteItemFromTrashbin($user, $originalPath); + $this->featureContext->setResponse($response); $this->featureContext->pushToLastStatusCodesArrays(); } @@ -681,16 +670,8 @@ class TrashbinContext implements Context { * @throws Exception */ public function userHasDeletedTheFolderWithOriginalPathFromTheTrashbin(string $user, string $originalPath):void { - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $originalPath); - $numItemDeleted = \count($responseArray); - Assert::assertEquals( - 1, - $numItemDeleted, - "Expected to delete exactly one item from the trashbin but $numItemDeleted were deleted" - ); - foreach ($responseArray as $response) { - $this->featureContext->theHTTPStatusCodeShouldBe(204, '', $response); - } + $response = $this->deleteItemFromTrashbin($user, $originalPath); + $this->featureContext->theHTTPStatusCodeShouldBe(204, '', $response); } /** @@ -707,17 +688,8 @@ class TrashbinContext implements Context { $paths = $table->getHash(); foreach ($paths as $path) { - $responseArray = $this->tryToDeleteFileFromTrashbin($user, $path["path"]); - $numItemsDeleted = \count($responseArray); - - Assert::assertEquals( - 1, - $numItemsDeleted, - "Expected to delete exactly one item from the trashbin but $numItemsDeleted were deleted" - ); - foreach ($responseArray as $response) { - $this->featureContext->setResponse($response); - } + $response = $this->deleteItemFromTrashbin($user, $path["path"]); + $this->featureContext->setResponse($response); $this->featureContext->pushToLastStatusCodesArrays(); } } diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index d7241be09..be822278b 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -1652,10 +1652,15 @@ trait WebDav { $elementToRequest, "1" ); + + // TODO: make it work for folder entries + // Doesn't work for folder entries + // as the folder entry has trailing '/' in d:href $webdavPath = "/" . $this->getFullDavFilesPath($user) . $expectedElement; $element = $responseXmlObject->xpath( "//d:response/d:href[text() = \"$webdavPath\"]" ); + if ($expectedToBeListed && (!isset($element[0]) || urldecode($element[0]->__toString()) !== urldecode($webdavPath)) ) { diff --git a/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature b/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature index 4bccd7afb..d47099be9 100644 --- a/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavLOCKAuth.feature @@ -42,7 +42,7 @@ Feature: LOCK file/folder | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "401" - @issue-1347 + @issue-1347 @issue-2176 Scenario: send LOCK requests to another user's webDav endpoints as normal user When user "Brian" requests these endpoints with "LOCK" to get property "d:shared" about user "Alice" | endpoint | @@ -54,7 +54,7 @@ Feature: LOCK file/folder | /remote.php/dav/files/%username%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "409" - @issue-1347 + @issue-1347 @issue-2176 Scenario: send LOCK requests to another user's webDav endpoints as normal user using the spaces WebDAV API When user "Brian" requests these endpoints with "LOCK" to get property "d:shared" about user "Alice" | endpoint | diff --git a/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature b/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature index f1a191f82..76b87436e 100644 --- a/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavPOSTAuth.feature @@ -49,7 +49,7 @@ Feature: POST file/folder | /remote.php/dav/files/%username%/textfile1.txt | | /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 "404" + Then the HTTP status code of responses on all endpoints should be "412" @issue-1287 Scenario: send POST requests to another user's webDav endpoints as normal user using the spaces WebDAV API @@ -58,7 +58,7 @@ Feature: POST file/folder | /remote.php/dav/spaces/%spaceid%/textfile0.txt | | /remote.php/dav/spaces/%spaceid%/PARENT | | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "404" + Then the HTTP status code of responses on all endpoints should be "412" Scenario: send POST requests to webDav endpoints using invalid username but correct password diff --git a/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature b/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature index 5d73ae658..5e2967abd 100644 --- a/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavPUTAuth.feature @@ -48,11 +48,11 @@ Feature: PUT file/folder | endpoint | | /remote.php/dav/files/%username%/textfile1.txt | | /remote.php/dav/files/%username%/PARENT | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice" | endpoint | | /remote.php/dav/files/%username%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" Scenario: send PUT requests to another user's webDav endpoints as normal user using the spaces WebDAV API @@ -60,11 +60,11 @@ Feature: PUT file/folder | endpoint | | /remote.php/dav/spaces/%spaceid%/textfile0.txt | | /remote.php/dav/spaces/%spaceid%/PARENT | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" When user "Brian" requests these endpoints with "PUT" including body "doesnotmatter" about user "Alice" | endpoint | | /remote.php/dav/spaces/%spaceid%/PARENT/parent.txt | - Then the HTTP status code of responses on all endpoints should be "403" + Then the HTTP status code of responses on all endpoints should be "404" Scenario: send PUT requests to webDav endpoints using invalid username but correct password diff --git a/tests/acceptance/features/coreApiFavorites/favorites.feature b/tests/acceptance/features/coreApiFavorites/favorites.feature index 4d02c48a0..342a74290 100644 --- a/tests/acceptance/features/coreApiFavorites/favorites.feature +++ b/tests/acceptance/features/coreApiFavorites/favorites.feature @@ -85,14 +85,14 @@ Feature: favorite | new | | spaces | - @smokeTest + @smokeTest @issue-1228 Scenario Outline: get favorited elements of a folder Given using DAV path When user "Alice" favorites element "/FOLDER" using the WebDAV API And user "Alice" favorites element "/textfile0.txt" using the WebDAV API And user "Alice" favorites element "/textfile1.txt" using the WebDAV API Then the HTTP status code should be "207" - And user "Alice" should have favorited the following elements + And user "Alice" should have the following favorited items | /FOLDER | | /textfile0.txt | | /textfile1.txt | @@ -102,7 +102,7 @@ Feature: favorite | new | | spaces | - + @issue-1228 Scenario Outline: get favorited elements of a subfolder Given using DAV path And user "Alice" has created folder "/subfolder" @@ -114,10 +114,10 @@ Feature: favorite And user "Alice" favorites element "/subfolder/textfile2.txt" using the WebDAV API And user "Alice" unfavorites element "/subfolder/textfile1.txt" using the WebDAV API Then the HTTP status code should be "207" - And user "Alice" should have favorited the following elements + And user "Alice" should have the following favorited items | /subfolder/textfile0.txt | | /subfolder/textfile2.txt | - And user "Alice" should not have favorited the following elements + And user "Alice" should not have the following favorited items | /subfolder/textfile1.txt | Examples: | dav-path-version | @@ -125,7 +125,7 @@ Feature: favorite | new | | spaces | - + @issue-1228 Scenario Outline: get favorited elements and limit count of entries Given using DAV path And user "Alice" has favorited element "/textfile0.txt" @@ -146,7 +146,7 @@ Feature: favorite | new | | spaces | - + @issue-1228 Scenario Outline: get favorited elements paginated in subfolder Given using DAV path And user "Alice" has created folder "/subfolder" @@ -175,13 +175,13 @@ Feature: favorite | new | | spaces | - + @issue-1228 Scenario Outline: favoriting a folder does not change the favorite state of elements inside the folder Given using DAV path When user "Alice" favorites element "/PARENT/parent.txt" using the WebDAV API And user "Alice" favorites element "/PARENT" using the WebDAV API Then the HTTP status code should be "207" - And user "Alice" should have favorited the following elements + And user "Alice" should have the following favorited items | /PARENT | | /PARENT/parent.txt | Examples: diff --git a/tests/acceptance/features/coreApiFavorites/favoritesSharingToShares.feature b/tests/acceptance/features/coreApiFavorites/favoritesSharingToShares.feature index 1fffc1572..8e64893be 100644 --- a/tests/acceptance/features/coreApiFavorites/favoritesSharingToShares.feature +++ b/tests/acceptance/features/coreApiFavorites/favoritesSharingToShares.feature @@ -67,7 +67,7 @@ Feature: favorite | old | | new | - + @issue-1228 Scenario Outline: moving a favorite file out of a share keeps favorite state Given using DAV path And user "Brian" has been created with default attributes and without skeleton files diff --git a/tests/acceptance/features/coreApiMain/checksums.feature b/tests/acceptance/features/coreApiMain/checksums.feature index 99b65dc55..7d07a5a6d 100644 --- a/tests/acceptance/features/coreApiMain/checksums.feature +++ b/tests/acceptance/features/coreApiMain/checksums.feature @@ -207,7 +207,7 @@ Feature: checksums | spaces | ## Validation Plugin or Old Endpoint Specific - @issue-1343 + @issue-1343 @issue-2323 Scenario Outline: uploading an old method chunked file with checksum should fail using new DAV path Given using DAV path When user "Alice" uploads chunk file "1" of "3" with "AAAAA" to "/myChecksumFile.txt" with checksum "MD5:45a72715acdd5019c5be30bdbb75233e" using the WebDAV API diff --git a/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature b/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature index e3e5f5c09..cec76781b 100644 --- a/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature +++ b/tests/acceptance/features/coreApiTrashbin/trashbinDelete.feature @@ -72,7 +72,7 @@ Feature: files and folders can be deleted from the trashbin | new | | spaces | - + @issue-3544 @issue-9791 Scenario Outline: user tries to delete another user's trashbin Given using DAV path And user "Brian" has been created with default attributes and without skeleton files diff --git a/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature b/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature index 916752959..a8c9b5d1f 100644 --- a/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature +++ b/tests/acceptance/features/coreApiTrashbin/trashbinSharingToShares.feature @@ -30,8 +30,8 @@ Feature: using trashbin together with sharing | new | | spaces | - @issue-1224 @issue-7555 - Scenario Outline: deleting a file in a received folder moves it to trashbin of both users + @issue-1124 @issue-7555 + Scenario Outline: sharee deleting a file in a received folder after renaming the shared folder moves it to trashbin of both users Given using DAV path And user "Brian" has been created with default attributes and without skeleton files And user "Alice" has created folder "/shared" diff --git a/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature b/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature index 9124f8970..7c2236ee9 100644 --- a/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature +++ b/tests/acceptance/features/coreApiWebdavMove1/moveFolder.feature @@ -21,7 +21,7 @@ Feature: move (rename) folder | new | | spaces | - + @issue-3099 Scenario Outline: renaming a folder to a backslash should return an error Given using DAV path And user "Alice" has created folder "/testshare" @@ -35,7 +35,7 @@ Feature: move (rename) folder | new | | spaces | - + @issue-3099 Scenario Outline: renaming a folder beginning with a backslash should return an error Given using DAV path And user "Alice" has created folder "/testshare" @@ -49,7 +49,7 @@ Feature: move (rename) folder | new | | spaces | - + @issue-3099 Scenario Outline: renaming a folder including a backslash encoded should return an error Given using DAV path And user "Alice" has created folder "/testshare" diff --git a/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature b/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature index 1f7cbdb0e..a35caac07 100644 --- a/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature +++ b/tests/acceptance/features/coreApiWebdavMove2/moveFile.feature @@ -130,7 +130,7 @@ Feature: move (rename) file | new | | spaces | - @issue-1295 + @issue-1295 @issue-2177 @issue-3099 Scenario Outline: rename a file into an invalid filename Given using DAV path And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt" @@ -159,19 +159,16 @@ Feature: move (rename) file | new | | spaces | - @issue-1295 + @issue-1295 @issue-2177 Scenario Outline: renaming a file to a path with extension .part should not be possible Given using DAV path And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "fileToRename.txt" When user "Alice" moves file "/fileToRename.txt" to "/welcome.part" using the WebDAV API - Then the HTTP status code should be "400" - And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath" - And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use." + Then the HTTP status code should be "201" And user "Alice" should see the following elements - | /fileToRename.txt | + | /welcome.part | But user "Alice" should not see the following elements - | /fileToRename.part | + | /fileToRename.txt | Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/coreApiWebdavOperations/refuseAccess.feature b/tests/acceptance/features/coreApiWebdavOperations/refuseAccess.feature index 2f33e9029..c2240c465 100644 --- a/tests/acceptance/features/coreApiWebdavOperations/refuseAccess.feature +++ b/tests/acceptance/features/coreApiWebdavOperations/refuseAccess.feature @@ -6,7 +6,7 @@ Feature: refuse access Background: Given using OCS API version "1" - @smokeTest + @smokeTest @issue-2285 Scenario Outline: unauthenticated call # cannot perform with spaces WebDAV due to the absence of user Given using DAV path @@ -21,7 +21,7 @@ Feature: refuse access | old | | new | - + @issue-2285 Scenario Outline: disabled user cannot use webdav Given using DAV path And user "Alice" has been created with default attributes and without skeleton files diff --git a/tests/acceptance/features/coreApiWebdavOperations/search.feature b/tests/acceptance/features/coreApiWebdavOperations/search.feature index ca1fd9c6b..dbfad65a4 100644 --- a/tests/acceptance/features/coreApiWebdavOperations/search.feature +++ b/tests/acceptance/features/coreApiWebdavOperations/search.feature @@ -152,7 +152,7 @@ Feature: Search | new | | spaces | - @issue-4712 + @issue-4712 @issue-9780 @issue-9781 @issue-9783 Scenario Outline: report extra properties in search entries for a file Given using DAV path When user "Alice" searches for "*upload*" using the WebDAV API requesting these properties: @@ -181,7 +181,7 @@ Feature: Search | new | | spaces | - @issue-4712 + @issue-4712 @issue-9780 @issue-9781 @issue-9783 Scenario Outline: report extra properties in search entries for a folder Given using DAV path When user "Alice" searches for "*upload*" using the WebDAV API requesting these properties: diff --git a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature index 2ba1ac2a5..3c6eda5c9 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature @@ -92,18 +92,14 @@ Feature: copy file | old | | new | - @issue-1345 + @issue-1345 @issue-2177 Scenario Outline: copying file to a path with extension .part should not be possible Given using DAV path When user "Alice" copies file "/textfile1.txt" to "/textfile1.part" using the WebDAV API - Then the HTTP status code should be "400" - And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath" - And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use." + Then the HTTP status code should be "201" And user "Alice" should see the following elements - | /textfile1.txt | - But user "Alice" should not see the following elements | /textfile1.part | + | /textfile1.txt | Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature index dedcdcb61..68d6c3ab2 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/createFileFolder.feature @@ -80,16 +80,12 @@ Feature: create files and folder | new | | spaces | - @issue-1345 + @issue-1345 @issue-2177 Scenario Outline: creating a directory which contains .part should not be possible Given using DAV path When user "Alice" creates folder "/folder.with.ext.part" using the WebDAV API - Then the HTTP status code should be "400" - And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath" - And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And user "Alice" should not see the following elements - | /folder.with.ext.part | + Then the HTTP status code should be "201" + And as "Alice" folder "folder.with.ext.part" should exist Examples: | dav-path-version | | old | diff --git a/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature b/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature index 3237acaba..82636c426 100644 --- a/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature +++ b/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature @@ -137,15 +137,12 @@ Feature: upload file | new | | spaces | - @issue-1345 + @issue-1345 @issue-2177 Scenario Outline: uploading file to path with extension .part should not be possible Given using DAV path When user "Alice" uploads file "filesForUpload/textfile.txt" to "/textfile.part" using the WebDAV API - Then the HTTP status code should be "400" - And the DAV exception should be "OCA\DAV\Connector\Sabre\Exception\InvalidPath" - And the DAV message should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And the DAV reason should be "Can`t upload files with extension .part because these extensions are reserved for internal use." - And user "Alice" should not see the following elements + Then the HTTP status code should be "201" + And user "Alice" should see the following elements | /textfile.part | Examples: | dav-path-version |