test: combine spaces and fix user deletion

This commit is contained in:
Sawjan Gurung authored and Saw-jan committed 2025-06-04 16:27:58 +05:45
1 parent 3338c95767
commit f37088906c
9 files changed
+128 -135

No files matched your search

@@ -1734,8 +1734,6 @@ class FeatureContext extends BehatVariablesContext {
return $this->getAdminPassword();
} elseif (\array_key_exists($username, $this->createdUsers)) {
return (string)$this->createdUsers[$username]['password'];
} elseif (\array_key_exists($username, $this->createdRemoteUsers)) {
return (string)$this->createdRemoteUsers[$username]['password'];
}
// The user has not been created yet, see if there is a replacement
@@ -1810,12 +1808,6 @@ class FeatureContext extends BehatVariablesContext {
}
return $userName;
}
if (\array_key_exists($username, $this->createdRemoteUsers)) {
if (isset($this->createdRemoteUsers[$username]['displayname'])) {
return (string)$this->createdRemoteUsers[$username]['displayname'];
}
return $userName;
}
// The user has not been created yet, see if there is a replacement
// defined for the user.
@@ -1871,9 +1863,6 @@ class FeatureContext extends BehatVariablesContext {
if (\array_key_exists($username, $this->createdUsers)) {
return (string)$this->createdUsers[$username]['email'];
}
if (\array_key_exists($username, $this->createdRemoteUsers)) {
return (string)$this->createdRemoteUsers[$username]['email'];
}
// The user has not been created yet, see if there is a replacement
// defined for the user.
@@ -2917,8 +2906,6 @@ class FeatureContext extends BehatVariablesContext {
* @throws Exception
*/
public static function checkScenario(AfterScenarioScope $scope): void {
var_dump("Before running...");
var_dump($this->personalSpaces);
if (($scope->getTestResult()->getResultCode() !== 0)
&& (!self::isExpectedToFail(self::getScenarioLine($scope)))
) {
+37 -17
View File
@@ -92,18 +92,27 @@ class GraphContext implements Context {
*
* @param string $byUser
* @param string $user
* @param string $userName
* @param string $newUsername
*
* @return void
* @throws GuzzleException
* @throws Exception
*/
public function theUserChangesTheUserNameOfUserToUsingTheGraphApi(string $byUser, string $user, string $userName): void {
$response = $this->editUserUsingTheGraphApi($byUser, $user, $userName);
public function theUserChangesTheUserNameOfUserToUsingTheGraphApi(
string $byUser,
string $user,
string $newUsername
): void {
$response = $this->editUserUsingTheGraphApi($byUser, $user, $newUsername);
$this->featureContext->setResponse($response);
// need to add user to list to delete him after test
if (!empty($userName) && $this->featureContext->getAttributeOfCreatedUser($userName, 'id')) {
$this->featureContext->addUserToCreatedUsersList($userName, $this->featureContext->getUserPassword($user));
// save the updated user
if (!empty($newUsername) && $response->getStatusCode() === 200) {
$this->featureContext->rememberThatUserIsNotExpectedToExist($user);
$this->featureContext->addUserToCreatedUsersList(
$newUsername,
$this->featureContext->getUserPassword($user)
);
}
}
@@ -274,13 +283,17 @@ class GraphContext implements Context {
*/
public function adminDeletesUserUsingTheGraphApi(string $user, ?string $byUser = null): ResponseInterface {
$credentials = $this->getAdminOrUserCredentials($byUser);
return GraphHelper::deleteUser(
$response = GraphHelper::deleteUser(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$user
);
if ($response->getStatusCode() === 204) {
$this->featureContext->rememberThatUserIsNotExpectedToExist($user);
}
return $response;
}
/**
@@ -310,21 +323,30 @@ class GraphContext implements Context {
/**
* sends a request to delete a user with the help of userID using the Graph API
*
* @param string $userId
* @param string $user
* @param string $byUser
*
* @return ResponseInterface
* @throws GuzzleException
*/
public function deleteUserByUserIdUsingTheGraphApi(string $userId, string $byUser): ResponseInterface {
public function deleteUserByUserId(string $user, string $byUser): ResponseInterface {
if ($user === "nonexistent") {
$userId = WebDavHelper::generateUUIDv4();
} else {
$userId = $this->featureContext->getUserIdByUserName($user);
}
$credentials = $this->getAdminOrUserCredentials($byUser);
return GraphHelper::deleteUserByUserId(
$response = GraphHelper::deleteUserByUserId(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials["username"],
$credentials["password"],
$userId
);
if ($response->getStatusCode() === 204) {
$this->featureContext->rememberThatUserIsNotExpectedToExist($user);
}
return $response;
}
/**
@@ -338,8 +360,7 @@ class GraphContext implements Context {
* @throws GuzzleException
*/
public function theUserDeletesAUserUsingTheGraphAPI(string $byUser, string $user): void {
$userId = $this->featureContext->getUserIdByUserName($user);
$this->featureContext->setResponse($this->deleteUserByUserIdUsingTheGraphApi($userId, $byUser));
$this->featureContext->setResponse($this->deleteUserByUserId($user, $byUser));
}
/**
@@ -352,8 +373,7 @@ class GraphContext implements Context {
* @throws Exception
*/
public function theUserTriesToDeleteNonExistingUser(string $byUser): void {
$userId = WebDavHelper::generateUUIDv4();
$this->featureContext->setResponse($this->deleteUserByUserIdUsingTheGraphApi($userId, $byUser));
$this->featureContext->setResponse($this->deleteUserByUserId("nonexistent", $byUser));
}
/**
@@ -667,11 +687,12 @@ class GraphContext implements Context {
$rows["email"],
$rows["displayName"]
);
$this->featureContext->setResponse($response);
// add created user to list except for the user with an empty name
// because request /graph/v1.0/users/emptyUserName exits with 200
// and we cannot check that the user with empty name doesn't exist
if (!empty($rows["userName"])) {
if (!empty($rows["userName"]) && $response->getStatusCode() === 201) {
$this->featureContext->addUserToCreatedUsersList(
$rows["userName"],
$rows["password"],
@@ -679,7 +700,6 @@ class GraphContext implements Context {
$rows["email"]
);
}
$this->featureContext->setResponse($response);
}
/**
@@ -2852,7 +2872,7 @@ class GraphContext implements Context {
* @return void
*/
public function userListsTheActivitiesOfSpaceUsingTheGraphApi(string $user, string $spaceName): void {
$spaceId = ($this->spacesContext->getSpaceByName($user, $spaceName))->id;
$spaceId = ($this->spacesContext->getSpaceByName($user, $spaceName))["id"];
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
+28 -68
View File
@@ -41,12 +41,6 @@ trait Provisioning {
* key is the lowercase username, value is an array of user attributes
*/
private array $createdUsers = [];
/**
* list of users that were created on the remote server during test runs
* key is the lowercase username, value is an array of user attributes
*/
private array $createdRemoteUsers = [];
private array $startingGroups = [];
private array $createdRemoteGroups = [];
private array $createdGroups = [];
@@ -86,14 +80,7 @@ trait Provisioning {
/**
* @return array
*/
public function getAllCreatedUsers():array {
return array_merge($this->createdUsers, $this->createdRemoteUsers);
}
/**
* @return array
*/
public function getCreatedGroups():array {
public function getCreatedGroups(): array {
return $this->createdGroups;
}
@@ -107,7 +94,7 @@ trait Provisioning {
*/
public function getUserDisplayName(string $username):string {
$normalizedUsername = $this->normalizeUsername($username);
$users = $this->getAllCreatedUsers();
$users = $this->getCreatedUsers();
if (isset($users[$normalizedUsername]['displayname'])) {
$displayName = (string) $users[$normalizedUsername]['displayname'];
if ($displayName !== '') {
@@ -125,7 +112,7 @@ trait Provisioning {
* @throws Exception
*/
public function getAttributeOfCreatedUser(string $user, string $attribute) {
$usersList = $this->getAllCreatedUsers();
$usersList = $this->getCreatedUsers();
$normalizedUsername = $this->normalizeUsername($user);
if (\array_key_exists($normalizedUsername, $usersList)) {
if (\array_key_exists($attribute, $usersList[$normalizedUsername])) {
@@ -175,8 +162,6 @@ trait Provisioning {
$password = $this->getAdminPassword();
} elseif (\array_key_exists($normalizedUsername, $this->createdUsers)) {
$password = $this->createdUsers[$normalizedUsername]['password'];
} elseif (\array_key_exists($normalizedUsername, $this->createdRemoteUsers)) {
$password = $this->createdRemoteUsers[$normalizedUsername]['password'];
} else {
throw new Exception(
"user '$username' was not created by this test run"
@@ -754,7 +739,6 @@ trait Provisioning {
$this->userExists($user),
"User '$user' should not exist but does exist"
);
$this->rememberThatUserIsNotExpectedToExist($user);
}
/**
@@ -841,7 +825,6 @@ trait Provisioning {
$this->userExists($user),
"User '$user' should not exist but does exist"
);
$this->rememberThatUserIsNotExpectedToExist($user);
}
/**
@@ -963,8 +946,8 @@ trait Provisioning {
* makes it possible to use this list in other test steps
* or to delete them at the end of the test
*
* @param string|null $user
* @param string|null $password
* @param string $user
* @param string $password
* @param string|null $displayName
* @param string|null $email
* @param string|null $userId only set for the users created using the Graph API
@@ -974,8 +957,8 @@ trait Provisioning {
* @throws JsonException
*/
public function addUserToCreatedUsersList(
?string $user,
?string $password,
string $user,
string $password,
?string $displayName = null,
?string $email = null,
?string $userId = null,
@@ -983,30 +966,17 @@ trait Provisioning {
):void {
$user = $this->getActualUsername($user);
$normalizedUsername = $this->normalizeUsername($user);
$userData = [
"password" => $password,
"displayname" => $displayName,
"email" => $email,
"shouldExist" => $shouldExist,
"actualUsername" => $user,
"id" => $userId
];
if ($this->currentServer === 'LOCAL') {
// Only remember this user creation if it was expected to have been successful
// or the user has not been processed before. Some tests create a user the
// first time (successfully) and then purposely try to create the user again.
// The 2nd user creation is expected to fail, and in that case we want to
// still remember the details of the first user creation.
if ($shouldExist || !\array_key_exists($normalizedUsername, $this->createdUsers)) {
$this->createdUsers[$normalizedUsername] = $userData;
}
} elseif ($this->currentServer === 'REMOTE') {
// See comment above about the LOCAL case. The logic is the same for the remote case.
if ($shouldExist || !\array_key_exists($normalizedUsername, $this->createdRemoteUsers)) {
$this->createdRemoteUsers[$normalizedUsername] = $userData;
$this->createdUsers[$normalizedUsername] = $userData;
}
if ($shouldExist || !\array_key_exists($normalizedUsername, $this->createdUsers)) {
$this->createdUsers[$normalizedUsername] = [
"password" => $password,
"displayname" => $displayName,
"email" => $email,
"shouldExist" => $shouldExist,
"actualUsername" => $user,
"id" => $userId,
"serverType" => $this->currentServer
];
}
}
@@ -1024,14 +994,8 @@ trait Provisioning {
string $password
):void {
$normalizedUsername = $this->normalizeUsername($user);
if ($this->currentServer === 'LOCAL') {
if (\array_key_exists($normalizedUsername, $this->createdUsers)) {
$this->createdUsers[$normalizedUsername]['password'] = $password;
}
} elseif ($this->currentServer === 'REMOTE') {
if (\array_key_exists($normalizedUsername, $this->createdRemoteUsers)) {
$this->createdRemoteUsers[$user]['password'] = $password;
}
if (\array_key_exists($normalizedUsername, $this->createdUsers)) {
$this->createdUsers[$normalizedUsername]['password'] = $password;
}
}
@@ -1770,6 +1734,9 @@ trait Provisioning {
// users can be deleted using the username in the GraphApi too
$response = $this->graphContext->adminDeletesUserUsingTheGraphApi($user);
}
if ($response->getStatusCode() === 204) {
$this->rememberThatUserIsNotExpectedToExist($user);
}
return $response;
}
@@ -1976,8 +1943,13 @@ trait Provisioning {
*/
public function cleanupDatabaseUsers():void {
$previousServer = $this->currentServer;
$this->usingServer('LOCAL');
foreach ($this->createdUsers as $userData) {
// do not try to delete if user doesn't exist
if (!$userData["shouldExist"]) {
continue;
}
$this->usingServer($userData["serverType"]);
$user = $userData['actualUsername'];
$response = $this->deleteUser($user);
$this->theHTTPStatusCodeShouldBe(204, "Failed to delete user '$user'", $response);
@@ -1985,18 +1957,6 @@ trait Provisioning {
$this->userExists($user),
"User '$user' should not exist but does exist"
);
$this->rememberThatUserIsNotExpectedToExist($user);
}
$this->usingServer('REMOTE');
foreach ($this->createdRemoteUsers as $userData) {
$user = $userData['actualUsername'];
$response = $this->deleteUser($user);
$this->theHTTPStatusCodeShouldBe(204, "Failed to delete user '$user'", $response);
Assert::assertFalse(
$this->userExists($user),
"User '$user' should not exist but does exist"
);
$this->rememberThatUserIsNotExpectedToExist($user);
}
$this->usingServer($previousServer);
}
+39 -13
View File
@@ -85,6 +85,7 @@ class SpacesContext implements Context {
$this->createdSpaces[$spaceName] = $space;
$this->createdSpaces[$spaceName]->spaceCreator = $spaceCreator;
$this->createdSpaces[$spaceName]->fileId = $space->id . '!' . $space->owner->user->id;
$this->createdSpaces[$spaceName]->serverType = $this->featureContext->getCurrentServer();
}
/**
@@ -109,6 +110,13 @@ class SpacesContext implements Context {
private array $personalSpaces = [];
/**
* @return array
*/
public function getPersonalSpaces(): array {
return $this->personalSpaces;
}
/**
* @param string $user
*
@@ -131,6 +139,7 @@ class SpacesContext implements Context {
public function addPersonalSpaceForUser(string $user, object $space): void {
$spaceName = $this->featureContext->getUserDisplayName($user);
$this->personalSpaces[$spaceName] = $space;
$this->personalSpaces[$spaceName]->serverType = $this->featureContext->getCurrentServer();
}
/**
@@ -186,43 +195,60 @@ class SpacesContext implements Context {
* @throws GuzzleException
*/
public function getSpaceByName(string $user, string $spaceName): array {
$password = $this->featureContext->getPasswordForUser($user);
$createdSpaces = $this->getCreatedSpaces();
$personalSpace = $this->getPersonalSpaceForUser($user);
$allSpaces = \array_merge($createdSpaces, [$personalSpace]);
$personalSpaces = $this->getPersonalSpaces();
$allSpaces = \array_merge($createdSpaces, $personalSpaces);
$storeSpaceFn = 'addToCreatedSpace';
if ($spaceName === "Personal") {
$spaceName = $this->featureContext->getUserDisplayName($user);
$storeSpaceFn = 'addPersonalSpaceForUser';
}
if (isset($allSpaces[$spaceName])) {
return (array) $allSpaces[$spaceName];
if (isset($allSpaces[$spaceName])
&& $allSpaces[$spaceName]->serverType === $this->featureContext->getCurrentServer()
) {
return json_decode(json_encode($allSpaces[$spaceName]), true);
}
// Sometimes listing available spaces might not return newly created/shared spaces.
// So we try again until we find the space or we reach the max number of retries (i.e. 10)
$retried = 0;
do {
$response = GraphHelper::getAllSpaces(
// list 'me/drives' as given user
$response = GraphHelper::getMySpaces(
$this->featureContext->getBaseUrl(),
$user,
$this->featureContext->getPasswordForUser($user),
$password,
"",
$this->featureContext->getStepLineRef()
);
// NOTE: user can be created with empty password
// so if that's the case, the user won't be able request using empty password
// and user won't have personal space.
if ($response->getStatusCode() === 401 && !$password) {
return [];
}
$this->featureContext->theHttpStatusCodeShouldBe(
200,
"Failed to fetch me/drives for user '$user'",
$response
);
$spaces = $this->featureContext->getJsonDecodedResponseBodyContent($response)->value;
$found = false;
$foundSpace = [];
foreach ($spaces as $space) {
if ($space->name === "Shares") {
if ($space->name === "Shares" && !\array_key_exists("Shares", $allSpaces)) {
$this->addPersonalSpaceForUser("Shares", $space);
}
if ($space->name === $spaceName) {
$found = true;
$foundSpace = $space;
$this->$storeSpaceFn($user, $space);
if ($space->driveType === "project") {
$this->addToCreatedSpace($user, $space);
} else {
$this->addPersonalSpaceForUser($user, $space);
}
break;
}
}
@@ -236,7 +262,8 @@ class SpacesContext implements Context {
}
} while ($tryAgain);
return (array) $foundSpace;
Assert::assertTrue($found, "Space '$spaceName' not found for user '$user'");
return json_decode(json_encode($foundSpace), true);
}
/**
@@ -646,7 +673,6 @@ class SpacesContext implements Context {
*/
public function theUserLooksUpTheSingleSpaceUsingTheGraphApiByUsingItsId(string $user, string $spaceName, string $ownerUser = ''): void {
$space = $this->getSpaceByName(($ownerUser !== "") ? $ownerUser : $user, $spaceName);
Assert::assertIsArray($space);
Assert::assertNotEmpty($space["id"]);
Assert::assertNotEmpty($space["root"]["webDavUrl"]);
$this->featureContext->setResponse(
@@ -1690,7 +1716,7 @@ class SpacesContext implements Context {
$response
);
$space = $this->featureContext->getJsonDecodedResponseBodyContent($response);
$this->addToCreatedSpace($user, $response);
$this->addToCreatedSpace($user, $space);
}
/**
@@ -13,7 +13,7 @@ Feature: download multiple resources bundled into an archive
@issue-4637
Scenario Outline: download a single file
Given user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
When user "Alice" downloads the <archive-type> archive of "/home/textfile0.txt" using the resource path and setting these headers:
When user "Alice" downloads the <archive-type> archive of "textfile0.txt" using the resource path and setting these headers:
| header | value |
| User-Agent | <user-agent> |
Then the HTTP status code should be "200"
@@ -30,7 +30,7 @@ Feature: download multiple resources bundled into an archive
Given user "Alice" has created folder "my_data"
And user "Alice" has uploaded file with content "some data" to "/my_data/textfile0.txt"
And user "Alice" has uploaded file with content "more data" to "/my_data/an_other_file.txt"
When user "Alice" downloads the <archive-type> archive of "/home/my_data" using the resource path and setting these headers:
When user "Alice" downloads the <archive-type> archive of "my_data" using the resource path and setting these headers:
| header | value |
| User-Agent | <user-agent> |
Then the HTTP status code should be "200"
@@ -52,10 +52,10 @@ Feature: download multiple resources bundled into an archive
And user "Alice" has created folder "more_data"
And user "Alice" has uploaded file with content "more data" to "/more_data/an_other_file.txt"
When user "Alice" downloads the archive of these items using the resource paths
| /home/textfile0.txt |
| /home/textfile1.txt |
| /home/my_data |
| /home/more_data |
| textfile0.txt |
| textfile1.txt |
| my_data |
| more_data |
Then the HTTP status code should be "200"
And the downloaded tar archive should contain these files:
| name | content |
@@ -107,10 +107,10 @@ Feature: download multiple resources bundled into an archive
| permissionsRole | Viewer |
And user "Brian" has a share "more_data" synced
When user "Brian" downloads the archive of these items using the resource path
| /home/Shares/textfile0.txt |
| /home/Shares/textfile1.txt |
| /home/Shares/my_data |
| /home/Shares/more_data |
| Shares/textfile0.txt |
| Shares/textfile1.txt |
| Shares/my_data |
| Shares/more_data |
Then the HTTP status code should be "200"
And the downloaded tar archive should contain these files:
| name | content |
@@ -156,7 +156,7 @@ Feature: download multiple resources bundled into an archive
| shareType | user |
| permissionsRole | Viewer |
And user "Brian" has a share "more_data" synced
When user "Brian" downloads the <archive-type> archive of "/home/Shares" using the resource path and setting these headers:
When user "Brian" downloads the <archive-type> archive of "Shares" using the resource path and setting these headers:
| header | value |
| User-Agent | <user-agent> |
Then the HTTP status code should be "200"
@@ -37,7 +37,7 @@ Feature: edit user
Examples:
| action description | user | http-status-code | new-user |
| change to a valid user name | Lionel | 200 | Lionel |
| user name characters | a*!_+-& | 200 | a*!_+-& |
| user name characters | a*!_-& | 200 | a*!_-& |
| change to existing user name | Brian | 409 | Carol |
| empty user name | | 400 | Carol |
@@ -11,7 +11,7 @@ Feature: lock files
Scenario Outline: lock a file
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
When user "Alice" locks file "textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
Then the HTTP status code should be "200"
@@ -32,7 +32,7 @@ Feature: lock files
Scenario Outline: lock a file with a timeout
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
When user "Alice" locks file "textfile.txt" using the WebDAV API setting the following properties
| lockscope | exclusive |
| timeout | Second-5000 |
@@ -54,7 +54,7 @@ Feature: lock files
Scenario: lock a file using file-id
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
When user "Alice" locks file "textfile.txt" using file-id "<<FILEID>>" using the WebDAV API setting the following properties
| lockscope | exclusive |
@@ -72,7 +72,7 @@ Feature: lock files
Scenario Outline: user cannot lock file twice
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And user "Alice" has locked file "textfile.txt" setting the following properties
| lockscope | exclusive |
When user "Alice" tries to lock file "textfile.txt" using the WebDAV API setting the following properties
@@ -163,7 +163,7 @@ Feature: lock files
@issue-7599
Scenario Outline: lock a file in the shares
Given using <dav-path-version> DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
| space | Personal |
@@ -189,7 +189,7 @@ Feature: lock files
Scenario: lock a file in the shares using file-id
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
@@ -213,7 +213,7 @@ Feature: lock files
Scenario Outline: viewer cannot lock a file in the shares using file-id
Given using spaces DAV path
And the administrator has enabled the permissions role "Secure Viewer"
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
@@ -233,7 +233,7 @@ Feature: lock files
Scenario: sharee cannot lock a resource exclusively locked by a sharer
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
@@ -258,7 +258,7 @@ Feature: lock files
Scenario: sharer cannot lock a resource exclusively locked by a sharee
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
@@ -249,7 +249,7 @@ Feature: unlock locked items
Scenario: unlock a file using file-id
Given using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has locked file "textfile.txt" using file-id "<<FILEID>>" setting the following properties
| lockscope | exclusive |
@@ -278,7 +278,7 @@ Feature: unlock locked items
Scenario: unlock a file in the shares using file-id
Given user "Brian" has been created with default attributes
And using spaces DAV path
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "textfile.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "textfile.txt"
And we save it into "FILEID"
And user "Alice" has sent the following resource share invitation:
| resource | textfile.txt |
@@ -57,7 +57,7 @@ Feature: Tag
Scenario: user creates tags for resources in the personal space
Given user "Alice" has created a folder "folderMain" in space "Alice Hansen"
And user "Alice" has uploaded a file inside space "Alice Hansen" with content "some content" to "file.txt"
And user "Alice" has uploaded a file inside space "Personal" with content "some content" to "file.txt"
When user "Alice" creates the following tags for folder "folderMain" of space "Alice Hansen":
| my tag |
| important |