diff --git a/tests/acceptance/TestHelpers/GraphHelper.php b/tests/acceptance/TestHelpers/GraphHelper.php index c0f8df597..5b2b056a2 100644 --- a/tests/acceptance/TestHelpers/GraphHelper.php +++ b/tests/acceptance/TestHelpers/GraphHelper.php @@ -45,6 +45,8 @@ class GraphHelper { 'Space Editor Without Versions' => '3284f2d5-0070-4ad8-ac40-c247f7c1fb27', ]; + public const SHARES_SPACE_ID = 'a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668'; + /** * @return string[] */ diff --git a/tests/acceptance/TestHelpers/WebDavHelper.php b/tests/acceptance/TestHelpers/WebDavHelper.php index 77bd99b47..0676b941b 100644 --- a/tests/acceptance/TestHelpers/WebDavHelper.php +++ b/tests/acceptance/TestHelpers/WebDavHelper.php @@ -504,35 +504,6 @@ class WebDavHelper { return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); } - /** - * - * @param string $baseUrl - * @param string $user - * @param string $password - * @param string $xRequestId - * - * @return string - * @throws GuzzleException - * @throws Exception - */ - public static function getSharesSpaceIdForUser(string $baseUrl, string $user, string $password, string $xRequestId): string { - if (\array_key_exists($user, self::$spacesIdRef) && \array_key_exists("virtual", self::$spacesIdRef[$user])) { - return self::$spacesIdRef[$user]["virtual"]; - } - - $response = GraphHelper::getMySpaces($baseUrl, $user, $password, '', $xRequestId); - $body = HttpRequestHelper::getJsonDecodedResponseBodyContent($response); - - $spaceId = null; - foreach ($body->value as $spaces) { - if ($spaces->driveType === "virtual") { - $spaceId = $spaces->id; - break; - } - } - return $spaceId; - } - /** * fetches personal space id for provided user * @@ -549,22 +520,25 @@ class WebDavHelper { if (\array_key_exists($user, self::$spacesIdRef) && \array_key_exists("personal", self::$spacesIdRef[$user])) { return self::$spacesIdRef[$user]["personal"]; } - $trimmedBaseUrl = \trim($baseUrl, "/"); - $drivesPath = '/graph/v1.0/me/drives'; - $fullUrl = $trimmedBaseUrl . $drivesPath; - $response = HttpRequestHelper::get( - $fullUrl, - $xRequestId, - $user, - $password - ); - $bodyContents = $response->getBody()->getContents(); - $json = \json_decode($bodyContents); + $personalSpaceId = ''; - if ($json === null) { + if (!OcisHelper::isTestingOnReva()) { + $response = GraphHelper::getMySpaces($baseUrl, $user, $password, '', $xRequestId); + Assert::assertEquals(200, $response->getStatusCode(), "Cannot list drives for user '$user'"); + + $drives = HttpRequestHelper::getJsonDecodedResponseBodyContent($response); + foreach ($drives->value as $drive) { + if ($drive->driveType === "personal") { + $personalSpaceId = $drive->id; + break; + } + } + } + + if (!$personalSpaceId) { // the graph endpoint did not give a useful answer // try getting the information from the webdav endpoint - $fullUrl = "$trimmedBaseUrl/" . self::getDavPath(self::DAV_VERSION_NEW, $user); + $fullUrl = "$baseUrl/" . self::getDavPath(self::DAV_VERSION_NEW, $user); $response = HttpRequestHelper::sendRequest( $fullUrl, $xRequestId, @@ -572,73 +546,23 @@ class WebDavHelper { $user, $password ); - // we expect to get a multipart XML response with status 207 - $status = $response->getStatusCode(); - if ($status === 401) { - throw new SpaceNotFoundException(__METHOD__ . " Personal space not found for user " . $user); - } elseif ($status !== 207) { - throw new Exception( - __METHOD__ . " webdav propfind for user $user failed with status $status - so the personal space id cannot be discovered" - ); - } + Assert::assertEquals(207, $response->getStatusCode(), "PROPFIND for user '$user' failed so the personal space id cannot be discovered"); + $responseXmlObject = HttpRequestHelper::getResponseXml( $response, __METHOD__ ); - $xmlPart = $responseXmlObject->xpath("/d:multistatus/d:response[1]/d:propstat/d:prop/oc:id"); - if ($xmlPart === false) { - throw new Exception( - __METHOD__ . " oc:id not found in webdav propfind for user $user - so the personal space id cannot be discovered" - ); - } - $ocIdRawString = $xmlPart[0]->__toString(); - $separator = "!"; - if (\strpos($ocIdRawString, $separator) !== false) { - // The string is not base64-encoded, because the exclamation mark is not in the base64 alphabet. - // We expect to have a string with 2 parts separated by the exclamation mark. - // This is the format introduced in 2022-02 - // oc:id should be something like: - // "7464caf6-1799-103c-9046-c7b74deb5f63!7464caf6-1799-103c-9046-c7b74deb5f63" - // There is no encoding to decode. - $decodedId = $ocIdRawString; - } else { - // fall-back to assuming that the oc:id is base64-encoded - // That is the format used before and up to 2022-02 - // This can be removed after both the edge and master branches of cs3org/reva are using the new format. - // oc:id should be some base64 encoded string like: - // "NzQ2NGNhZjYtMTc5OS0xMDNjLTkwNDYtYzdiNzRkZWI1ZjYzOjc0NjRjYWY2LTE3OTktMTAzYy05MDQ2LWM3Yjc0ZGViNWY2Mw==" - // That should decode to something like: - // "7464caf6-1799-103c-9046-c7b74deb5f63:7464caf6-1799-103c-9046-c7b74deb5f63" - $decodedId = base64_decode($ocIdRawString); - $separator = ":"; - } - $ocIdParts = \explode($separator, $decodedId); - if (\count($ocIdParts) !== 2) { - throw new Exception( - __METHOD__ . " the oc:id $decodedId for user $user does not have 2 parts separated by '$separator', so the personal space id cannot be discovered" - ); - } - $personalSpaceId = $ocIdParts[0]; - } else { - foreach ($json->value as $spaces) { - if ($spaces->driveType === "personal") { - $personalSpaceId = $spaces->id; - break; - } - } - } - if ($personalSpaceId) { - // If env var LOG_PERSONAL_SPACE_ID is defined, then output the details of the personal space id. - // This is a useful debugging tool to have confidence that the personal space id is found correctly. - if (\getenv('LOG_PERSONAL_SPACE_ID') !== false) { - echo __METHOD__ . " personal space id of user $user is $personalSpaceId\n"; - } - self::$spacesIdRef[$user] = []; - self::$spacesIdRef[$user]["personal"] = $personalSpaceId; - return $personalSpaceId; - } else { - throw new SpaceNotFoundException(__METHOD__ . " Personal space not found for user " . $user); + $xmlPart = $responseXmlObject->xpath("/d:multistatus/d:response[1]/d:propstat/d:prop/oc:spaceid"); + Assert::assertNotEmpty($xmlPart, "The 'oc:spaceid' for user '$user' was not found in the PROPFIND response"); + + $personalSpaceId = $xmlPart[0]->__toString(); } + + Assert::assertNotEmpty($personalSpaceId, "The personal space id for user '$user' was not found"); + + self::$spacesIdRef[$user] = []; + self::$spacesIdRef[$user]["personal"] = $personalSpaceId; + return $personalSpaceId; } /** @@ -654,21 +578,16 @@ class WebDavHelper { * @throws Exception|GuzzleException */ public static function getPersonalSpaceIdForUserOrFakeIfNotFound(string $baseUrl, string $user, string $password, string $xRequestId):string { - try { - $spaceId = self::getPersonalSpaceIdForUser( - $baseUrl, - $user, - $password, - $xRequestId, - ); - } catch (SpaceNotFoundException $e) { - // if the fetch fails, and the user is not found, then a fake space id is prepared - // this is useful for testing when the personal space is of a non-existing user - $fakeSpaceId = self::generateUUIDv4(); - self::$spacesIdRef[$user]["personal"] = $fakeSpaceId; - $spaceId = $fakeSpaceId; + if (\str_starts_with($user, "non-exist") || \str_starts_with($user, "nonexist")) { + return self::generateUUIDv4(); } - return $spaceId; + + return self::getPersonalSpaceIdForUser( + $baseUrl, + $user, + $password, + $xRequestId, + ); } /** @@ -735,12 +654,7 @@ class WebDavHelper { if ($spaceId === null && $davPathVersionToUse === self::DAV_VERSION_SPACES && !\in_array($type, ["public-files", "versions"])) { $path = \ltrim($path, "/"); if (\str_starts_with($path, "Shares/")) { - $spaceId = self::getSharesSpaceIdForUser( - $baseUrl, - $user, - $password, - $xRequestId - ); + $spaceId = GraphHelper::SHARES_SPACE_ID; $path = "/" . preg_replace("/^Shares\//", "", $path); } else { $spaceId = self::getPersonalSpaceIdForUserOrFakeIfNotFound( diff --git a/tests/acceptance/bootstrap/AuthContext.php b/tests/acceptance/bootstrap/AuthContext.php index 24b8f8c22..72346012c 100644 --- a/tests/acceptance/bootstrap/AuthContext.php +++ b/tests/acceptance/bootstrap/AuthContext.php @@ -24,7 +24,6 @@ use Behat\Gherkin\Node\TableNode; use Behat\Behat\Context\Context; use Psr\Http\Message\ResponseInterface; use TestHelpers\HttpRequestHelper; -use TestHelpers\SetupHelper; use TestHelpers\BehatHelper; use TestHelpers\WebDavHelper; @@ -596,12 +595,12 @@ class AuthContext implements Context { $headers = []; if ($method === 'MOVE' || $method === 'COPY') { $baseUrl = $this->featureContext->getBaseUrl(); - $suffix = ""; + $suffix = $user; if ($this->featureContext->getDavPathVersion() === WebDavHelper::DAV_VERSION_SPACES) { - $suffix = $this->featureContext->spacesContext->getSpaceIdByName($user, "Personal"); + $suffix = $this->featureContext->getPersonalSpaceIdForUser($user); } - $davPath = WebDavHelper::getDavPath($this->featureContext->getDavPathVersion(), $user); - $headers['Destination'] = "$baseUrl/$davPath/$suffix/moved"; + $davPath = WebDavHelper::getDavPath($this->featureContext->getDavPathVersion(), $suffix); + $headers['Destination'] = "$baseUrl/$davPath/moved"; } foreach ($table->getHash() as $row) { diff --git a/tests/acceptance/bootstrap/FeatureContext.php b/tests/acceptance/bootstrap/FeatureContext.php index 5e6a7912c..80b345a3c 100644 --- a/tests/acceptance/bootstrap/FeatureContext.php +++ b/tests/acceptance/bootstrap/FeatureContext.php @@ -207,7 +207,6 @@ class FeatureContext extends BehatVariablesContext { $this->autoSyncSettings[$user] = $value; } - public const SHARES_SPACE_ID = 'a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668'; private bool $useSharingNG = false; /** diff --git a/tests/acceptance/bootstrap/SharingNgContext.php b/tests/acceptance/bootstrap/SharingNgContext.php index 8d49ba395..96a0842fc 100644 --- a/tests/acceptance/bootstrap/SharingNgContext.php +++ b/tests/acceptance/bootstrap/SharingNgContext.php @@ -1124,7 +1124,7 @@ class SharingNgContext implements Context { * @throws JsonException */ public function hideOrUnhideSharedResource(string $sharee, string $shareID, bool $hide = true): ResponseInterface { - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $itemId = $shareSpaceId . '!' . $shareID; $body['@UI.Hidden'] = $hide; return GraphHelper::hideOrUnhideShare( @@ -1138,36 +1138,6 @@ class SharingNgContext implements Context { ); } - /** - * @Then /^for user "([^"]*)" the space Shares should (not|)\s?contain these (files|entries):$/ - * - * @param string $user - * @param string $shouldOrNot - * @param TableNode $table - * - * @return void - * @throws Exception - */ - public function forUserTheSpaceSharesShouldContainTheseEntries(string $user, string $shouldOrNot, TableNode $table): void { - $should = $shouldOrNot !== 'not'; - $rows = $table->getRows(); - $response = GraphHelper::getSharesSharedWithMe( - $this->featureContext->getBaseUrl(), - $this->featureContext->getStepLineRef(), - $user, - $this->featureContext->getPasswordForUser($user) - ); - $contents = \json_decode($response->getBody()->getContents(), true); - - $fileFound = empty(array_diff(array_map(fn ($row) => trim($row[0], '/'), $rows), array_column($contents['value'], 'name'))); - - $assertMessage = $should - ? "Response does not contain the entry." - : "Response does contain the entry but should not."; - - Assert::assertSame($should, $fileFound, $assertMessage); - } - /** * @Given user :user has disabled sync of last shared resource * @@ -1178,7 +1148,7 @@ class SharingNgContext implements Context { */ public function userHasDisabledSyncOfLastSharedResource(string $user):void { $shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID(); - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $itemId = $shareSpaceId . '!' . $shareItemId; $response = GraphHelper::disableShareSync( $this->featureContext->getBaseUrl(), @@ -1202,7 +1172,7 @@ class SharingNgContext implements Context { */ public function userDisablesSyncOfShareUsingTheGraphApi(string $user):void { $shareItemId = $this->featureContext->shareNgGetLastCreatedUserGroupShareID(); - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $itemId = $shareSpaceId . '!' . $shareItemId; $response = GraphHelper::disableShareSync( $this->featureContext->getBaseUrl(), @@ -1277,7 +1247,7 @@ class SharingNgContext implements Context { public function userEnablesSyncOfShareUsingTheGraphApi(string $user, string $share, string $offeredBy, string $space):void { $share = ltrim($share, '/'); $itemId = $this->spacesContext->getResourceId($offeredBy, $space, $share); - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $response = GraphHelper::enableShareSync( $this->featureContext->getBaseUrl(), $this->featureContext->getStepLineRef(), @@ -1302,7 +1272,7 @@ class SharingNgContext implements Context { * @throws Exception|GuzzleException */ public function userTriesToEnableShareSyncOfResourceUsingTheGraphApi(string $user, string $resource):void { - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $itemId = ($resource === 'nonexistent') ? WebDavHelper::generateUUIDv4() : $resource; $response = GraphHelper::enableShareSync( @@ -1326,7 +1296,7 @@ class SharingNgContext implements Context { * @throws Exception|GuzzleException */ public function userTriesToDisableShareSyncOfResourceUsingTheGraphApi(string $user, string $resource):void { - $shareSpaceId = FeatureContext::SHARES_SPACE_ID; + $shareSpaceId = GraphHelper::SHARES_SPACE_ID; $shareID = ($resource === 'nonexistent') ? WebDavHelper::generateUUIDv4() : $resource; $itemId = $shareSpaceId . '!' . $shareID; $response = GraphHelper::disableShareSync( @@ -1766,13 +1736,22 @@ class SharingNgContext implements Context { * @param string $share * @param string $sharee * @param string $sharer + * @param string $space + * @param bool $shouldExist * * @return void * @throws GuzzleException * @throws JsonException * @throws Exception */ - public function checkIfShareExists(string $share, string $sharee, string $sharer): void { + public function checkIfShareExists(string $share, string $sharee, string $sharer, string $space, bool $shouldExist = true): void { + $share = \ltrim($share, "/"); + if (\strtolower($space) === "personal") { + $remoteDriveAlias = "personal/" . \strtolower($sharer); + } else { + $remoteDriveAlias = "project/" . \strtolower($space); + } + // check share mountpoint $response = GraphHelper::getMySpaces( $this->featureContext->getBaseUrl(), @@ -1784,11 +1763,11 @@ class SharingNgContext implements Context { $driveList = HttpRequestHelper::getJsonDecodedResponseBodyContent($response)->value; $foundShareMountpoint = false; foreach ($driveList as $drive) { - if ($drive->driveType === "mountpoint" && $drive->name === $share && $drive->root->remoteItem->driveAlias === "personal/" . \strtolower($sharer)) { + if ($drive->driveType === "mountpoint" && $drive->name === $share && $drive->root->remoteItem->driveAlias === $remoteDriveAlias) { $foundShareMountpoint = true; } } - Assert::assertTrue($foundShareMountpoint, "Share mountpoint '$share' was not found in the drives list."); + Assert::assertSame($shouldExist, $foundShareMountpoint, "Share mountpoint '$share' was not found in the drives list."); // check share in shared-with-me list $response = GraphHelper::getSharesSharedWithMe( @@ -1800,24 +1779,33 @@ class SharingNgContext implements Context { $sharedWithMeList = HttpRequestHelper::getJsonDecodedResponseBodyContent($response)->value; $foundShareInSharedWithMe = false; foreach ($sharedWithMeList as $item) { - if ($item->name === $share && $item->createdBy->user->displayName === $this->featureContext->getDisplayNameForUser($sharer)) { - $foundShareInSharedWithMe = true; + if ($item->name === $share) { + foreach ($item->remoteItem->permissions as $permission) { + $shareCreator = $permission->invitation->invitedBy->user->displayName; + if ($shareCreator === $this->featureContext->getDisplayNameForUser($sharer)) { + $foundShareInSharedWithMe = true; + break; + } + } + break; } } - Assert::assertTrue($foundShareInSharedWithMe, "Share '$share' was not found in the shared-with-me list"); + Assert::assertSame($shouldExist, $foundShareInSharedWithMe, "Share '$share' was not found in the shared-with-me list"); } /** - * @Then user :sharee should have a share :share shared by user :sharer + * @Then /^user "([^"]*)" (should|should not) have a share "([^"]*)" shared by user "([^"]*)" from space "([^"]*)"$/ * * @param string $sharee + * @param string $shouldOrNot * @param string $share * @param string $sharer + * @param string $space * * @return void */ - public function userShouldHaveShare(string $sharee, string $share, string $sharer): void { - $this->checkIfShareExists($share, $sharee, $sharer); + public function userShouldHaveShareSharedByUserFromSpace(string $sharee, string $shouldOrNot, string $share, string $sharer, string $space): void { + $this->checkIfShareExists($share, $sharee, $sharer, $space, $shouldOrNot === "should"); } /** diff --git a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature b/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature index 7c6379e52..2545d50a1 100644 --- a/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature +++ b/tests/acceptance/features/apiSharingNgShareInvitation/shareInvitations.feature @@ -22,8 +22,7 @@ Feature: Send a sharing invitations | shareType | user | | permissionsRole | | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | | + And user "Brian" should have a share "" shared by user "Alice" from space "Personal" And the JSON data of the response should match """ { @@ -112,10 +111,8 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | | - And for user "Carol" the space Shares should contain these entries: - | | + And user "Brian" should have a share "" shared by user "Alice" from space "Personal" + And user "Carol" should have a share "" shared by user "Alice" from space "Personal" And the JSON data of the response should match """ { @@ -1903,8 +1900,7 @@ Feature: Send a sharing invitations | shareType | user | | permissionsRole | Viewer | Then the HTTP status code should be "404" - And for user "Brian" the space Shares should not contain these entries: - | textfile1.txt | + And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" And the JSON data of the response should match """ { @@ -1949,10 +1945,8 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | Viewer | Then the HTTP status code should be "404" - And for user "Brian" the space Shares should not contain these entries: - | textfile1.txt | - And for user "Carol" the space Shares should not contain these entries: - | textfile1.txt | + And user "Brian" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" + And user "Carol" should not have a share "textfile1.txt" shared by user "Alice" from space "Personal" And the JSON data of the response should match """ { @@ -1994,8 +1988,7 @@ Feature: Send a sharing invitations | shareType | user | | permissionsRole | | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | | + And user "Brian" should have a share "" shared by user "Alice" from space "NewSpace" And the JSON data of the response should match """ { @@ -2082,10 +2075,8 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | | - And for user "Carol" the space Shares should contain these entries: - | | + And user "Brian" should have a share "" shared by user "Alice" from space "NewSpace" + And user "Carol" should have a share "" shared by user "Alice" from space "NewSpace" And the JSON data of the response should match """ { @@ -2244,10 +2235,10 @@ Feature: Send a sharing invitations } """ Examples: - | permissions-role | error-message | - | Space Viewer | role not applicable to this resource | - | Space Editor | role not applicable to this resource | - | Manager | role not applicable to this resource | + | permissions-role | error-message | + | Space Viewer | role not applicable to this resource | + | Space Editor | role not applicable to this resource | + | Manager | role not applicable to this resource | Scenario Outline: try to send share invitation with different re-sharing permissions @@ -3119,8 +3110,7 @@ Feature: Send a sharing invitations | shareType | user | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | textfile.txt | + And user "Brian" should have a share "textfile.txt" shared by user "Alice" from space "Personal" When user "Alice" sends the following resource share invitation using the Graph API: | resource | textfile.txt | | space | Personal | @@ -3128,8 +3118,7 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Carol" the space Shares should contain these entries: - | textfile.txt | + And user "Carol" should have a share "textfile.txt" shared by user "Alice" from space "Personal" Scenario: share a file to group containing special characters in name (Personal space) @@ -3145,8 +3134,7 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | textfile.txt | + And user "Brian" should have a share "textfile.txt" shared by user "Alice" from space "Personal" Scenario: share a file to user and group having same name (Project space) @@ -3166,8 +3154,7 @@ Feature: Send a sharing invitations | shareType | user | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | textfile.txt | + And user "Brian" should have a share "textfile.txt" shared by user "Alice" from space "NewSpace" When user "Alice" sends the following resource share invitation using the Graph API: | resource | textfile.txt | | space | NewSpace | @@ -3175,8 +3162,7 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Carol" the space Shares should contain these entries: - | textfile.txt | + And user "Carol" should have a share "textfile.txt" shared by user "Alice" from space "NewSpace" Scenario: share a file to group containing special characters in name (Project space) @@ -3195,5 +3181,4 @@ Feature: Send a sharing invitations | shareType | group | | permissionsRole | Viewer | Then the HTTP status code should be "200" - And for user "Brian" the space Shares should contain these entries: - | textfile.txt | + And user "Brian" should have a share "textfile.txt" shared by user "Alice" from space "NewSpace" diff --git a/tests/acceptance/features/apiSpacesShares/copySpaces.feature b/tests/acceptance/features/apiSpacesShares/copySpaces.feature index 314109a11..3489e71b6 100644 --- a/tests/acceptance/features/apiSpacesShares/copySpaces.feature +++ b/tests/acceptance/features/apiSpacesShares/copySpaces.feature @@ -714,7 +714,7 @@ Feature: copy file And as "Brian" folder "BRIAN-Folder/sample-folder" should exist But as "Alice" file "Shares/BRIAN-Folder" should not exist And as "Alice" file "Shares/textfile1.txt" should not exist - And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" + And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal" @issue-7208 Scenario: copy a folder over the top of an existing file received as a user share @@ -734,7 +734,7 @@ Feature: copy file And for user "Alice" the content of the file "sharedfile1.txt" of the space "Shares" should be "file to share" And for user "Brian" the content of the file "sharedfile1.txt" of the space "Personal" should be "file to share" But as "Alice" folder "Shares/FOLDER/sample-folder" should not exist - And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" + And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" from space "Personal" Scenario: copy a folder into another folder at different level which is received as a user share diff --git a/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature b/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature index b80a1622a..70711b9e9 100644 --- a/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature +++ b/tests/acceptance/features/coreApiAuth/webDavMKCOLAuth.feature @@ -71,7 +71,7 @@ Feature: create folder using MKCOL | /dav/spaces/%spaceid%/PARENT/parent.txt | Then the HTTP status code of responses on all endpoints should be "404" - @issue-5049 @issue-1347 @issue-1292 + @issue-5049 @issue-1347 @issue-1292 Scenario: send MKCOL requests to non-existent user's webDav endpoints as normal user using the spaces WebDAV API Given user "Brian" has been created with default attributes When user "Brian" requests these endpoints with "MKCOL" including body "" about user "non-existent-user" diff --git a/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature b/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature index 6205d073a..8bcee748f 100644 --- a/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature +++ b/tests/acceptance/features/coreApiTrashbin/trashbinFilesFolders.feature @@ -218,7 +218,7 @@ Feature: files and folders exist in the trashbin after being deleted @issue-3561 Scenario Outline: listing non-existent user's trashbin is prohibited Given using DAV path - When user "Alice" tries to list the trashbin content for user "testtrashbinnotauser" + When user "Alice" tries to list the trashbin content for user "nonexistent" Then the HTTP status code should be "404" Examples: | dav-path-version | diff --git a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature index 2cbac3fe0..6295362f1 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/copyFile.feature @@ -233,7 +233,7 @@ Feature: copy file Then the HTTP status code should be "400" And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist And as "Alice" file "/Shares/BRIAN-Folder" should not exist - And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" + And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal" And as "Brian" folder "BRIAN-Folder" should exist Examples: | dav-path-version | @@ -257,7 +257,7 @@ Feature: copy file When user "Alice" copies file "copy.txt" to "Shares/lorem.txt" using the WebDAV API Then the HTTP status code should be "204" And the content of file "Shares/lorem.txt" for user "Alice" should be "file to copy" - And user "Alice" should have a share "lorem.txt" shared by user "Brian" + And user "Alice" should have a share "lorem.txt" shared by user "Brian" from space "Personal" And the content of file "lorem.txt" for user "Brian" should be "file to copy" Examples: | dav-path-version | @@ -282,7 +282,7 @@ Feature: copy file Then the HTTP status code should be "400" And the content of file "Shares/sharedfile1.txt" for user "Alice" should be "file to share" And as "Alice" folder "/Shares/sharedfile1.txt" should not exist - And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" + And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" from space "Personal" And the content of file "sharedfile1.txt" for user "Brian" should be "file to share" Examples: | dav-path-version | @@ -308,7 +308,7 @@ Feature: copy file Then the HTTP status code should be "400" And as "Alice" folder "Shares/BRIAN-Folder/brian-folder" should exist And as "Alice" folder "Shares/BRIAN-Folder/alice-folder" should not exist - And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" + And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal" And as "Brian" folder "BRIAN-Folder" should exist Examples: | dav-path-version | @@ -460,7 +460,7 @@ Feature: copy file Then the HTTP status code should be "400" And as "Alice" folder "/Shares/BRIAN-Folder/sample-folder" should exist And as "Alice" file "/Shares/BRIAN-Folder" should not exist - And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" + And user "Alice" should have a share "BRIAN-Folder" shared by user "Brian" from space "Personal" And as "Brian" folder "BRIAN-Folder/sample-folder" should exist Examples: | dav-path-version | @@ -488,7 +488,7 @@ Feature: copy file Then the HTTP status code should be "400" And as "Alice" file "/Shares/sharedfile1.txt" should exist And as "Alice" folder "/Shares/sharedfile1.txt" should not exist - And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" + And user "Alice" should have a share "sharedfile1.txt" shared by user "Brian" from space "Personal" And as "Brian" file "sharedfile1.txt" should exist Examples: | dav-path-version | diff --git a/tests/acceptance/features/coreApiWebdavProperties/setFileProperties.feature b/tests/acceptance/features/coreApiWebdavProperties/setFileProperties.feature index 2ee19a053..dc994dfe7 100644 --- a/tests/acceptance/features/coreApiWebdavProperties/setFileProperties.feature +++ b/tests/acceptance/features/coreApiWebdavProperties/setFileProperties.feature @@ -61,7 +61,7 @@ Feature: set file properties | new | | spaces | - @issue-1297 + @skipOnReva @issue-1297 Scenario Outline: setting custom DAV property on a shared file as an owner and reading as a recipient Given using DAV path And user "Brian" has been created with default attributes diff --git a/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature b/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature index 0f84a4529..60c5661bf 100644 --- a/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature +++ b/tests/acceptance/features/coreApiWebdavUpload/uploadFile.feature @@ -372,7 +372,7 @@ Feature: upload file And for user "Brian" the content of the file "/textfile.txt" of the space "new-space" should be "" And for user "Alice" the content of the file "/textfile.txt" of the space "new-space" should be "" - @issue-8699 @issue-10331 + @skipOnReva @issue-8699 @issue-10331 Scenario: user updates a file inside a link shared space with empty content Given using SharingNG And user "Brian" has been created with default attributes