tidy up acceptance tests
This commit is contained in:
@@ -118,7 +118,7 @@ Feature: Change data of space
|
||||
"properties": {
|
||||
"total" : {
|
||||
"type": "number",
|
||||
"enum": [<expectedQuataValue>]
|
||||
"enum": [<expectedQuotaValue>]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ Feature: Change data of space
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| user | code | expectedQuataValue |
|
||||
| user | code | expectedQuotaValue |
|
||||
| Alice | 200 | 100 |
|
||||
| Brian | 403 | 20 |
|
||||
| Bob | 403 | 20 |
|
||||
|
||||
@@ -14,8 +14,8 @@ Feature: Notification
|
||||
|
||||
|
||||
Scenario: user gets a notification of space sharing
|
||||
Given user "Alice" has created a space "notificaton checking" with the default quota using the GraphApi
|
||||
And user "Alice" has shared a space "notificaton checking" with settings:
|
||||
Given user "Alice" has created a space "notification checking" with the default quota using the GraphApi
|
||||
And user "Alice" has shared a space "notification checking" with settings:
|
||||
| shareWith | Brian |
|
||||
| role | editor |
|
||||
When user "Brian" lists all notifications
|
||||
@@ -44,7 +44,7 @@ Feature: Notification
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"enum": ["Alice Hansen added you to Space notificaton checking"]
|
||||
"enum": ["Alice Hansen added you to Space notification checking"]
|
||||
},
|
||||
"messageRich": {
|
||||
"type": "string",
|
||||
@@ -70,7 +70,7 @@ Feature: Notification
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"enum": ["notificaton checking"]
|
||||
"enum": ["notification checking"]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -104,7 +104,7 @@ Feature: Notification
|
||||
},
|
||||
"object_id": {
|
||||
"type": "string"
|
||||
|
||||
|
||||
},
|
||||
"object_type": {
|
||||
"type": "string",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@api @skipOnOcV10
|
||||
Feature: Resharing
|
||||
As a user
|
||||
As a user
|
||||
I want to reshare resources
|
||||
So that other users can have access to them
|
||||
|
||||
@@ -101,7 +101,7 @@ Feature: Resharing
|
||||
| Damian | 31 | 404 |
|
||||
|
||||
|
||||
Scenario Outline: Rrsharing files with different permissions
|
||||
Scenario Outline: Resharing files with different permissions
|
||||
Given user "Alice" has uploaded file with content "Random data" to "/file.txt"
|
||||
And user "Alice" has shared file "/file.txt" with user "Brian" with permissions "<shareepermissions>"
|
||||
And user "Brian" has accepted share "/file.txt" offered by user "Alice"
|
||||
|
||||
@@ -418,7 +418,7 @@ Feature: copy file
|
||||
| viewer | should not | 403 |
|
||||
|
||||
|
||||
Scenario Outline: user copies a folder from personal space to share space with different permmissions
|
||||
Scenario Outline: user copies a folder from personal space to share space with different permissions
|
||||
Given user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
|
||||
@@ -193,7 +193,7 @@ Feature: check etag propagation after different file alterations
|
||||
| Brian | /dst | Shares |
|
||||
|
||||
|
||||
Scenario: share reciever moving a folder from one folder to an other changes the etags of both folders for all collaborators
|
||||
Scenario: share receiver moving a folder from one folder to an other changes the etags of both folders for all collaborators
|
||||
Given user "Alice" has created folder "/dst"
|
||||
And user "Alice" has created folder "/upload/toMove"
|
||||
And user "Alice" has shared folder "/upload" with user "Brian"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@api @skipOnOcV10
|
||||
Feature: favorite
|
||||
As a user
|
||||
I want to favouite resources
|
||||
I want to favorite resources
|
||||
So that I can access them quickly
|
||||
|
||||
Background:
|
||||
|
||||
@@ -2941,7 +2941,7 @@ class FeatureContext extends BehatVariablesContext {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a string that can be used to check a url of comments with
|
||||
* returns a string that can be used to check a URL of comments with
|
||||
* regular expression (without delimiter)
|
||||
*
|
||||
* @return string
|
||||
|
||||
@@ -385,7 +385,7 @@ class FilesVersionsContext implements Context {
|
||||
|
||||
/**
|
||||
* returns the result parsed into an SimpleXMLElement
|
||||
* with an registered namespace with 'd' as prefix and 'DAV:' as namespace
|
||||
* with a registered namespace with 'd' as prefix and 'DAV:' as namespace
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileId
|
||||
|
||||
@@ -1373,7 +1373,7 @@ class GraphContext implements Context {
|
||||
* @return void
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function userRetrievesHisorHerInformationOfUserUsingGraphApi(
|
||||
public function userRetrievesHisOrHerInformationOfUserUsingGraphApi(
|
||||
string $user
|
||||
):void {
|
||||
$response = $this->retrieveUserInformationUsingGraphApi($user);
|
||||
|
||||
@@ -935,7 +935,7 @@ class OCSContext implements Context {
|
||||
if (\is_object($jsonResponse) && $jsonResponse->ocs->meta->statuscode) {
|
||||
return (string) $jsonResponse->ocs->meta->statuscode;
|
||||
}
|
||||
// go to xml response when json response is null (it means not formated and get status code)
|
||||
// go to xml response when json response is null (it means not formatted and get status code)
|
||||
$responseXml = $this->featureContext->getResponseXml($response, __METHOD__);
|
||||
if (isset($responseXml->meta[0], $responseXml->meta[0]->statuscode)) {
|
||||
return (string) $responseXml->meta[0]->statuscode;
|
||||
|
||||
@@ -686,7 +686,7 @@ trait Provisioning {
|
||||
$userId = \str_replace('+', '\+', $setting["userid"]);
|
||||
$newDN = 'uid=' . $userId . ',ou=' . $ou . ',' . $this->ldapBaseDN;
|
||||
|
||||
//pick a high number as uidnumber to make sure there are no conflicts with existing uidnumbers
|
||||
//pick a high uidnumber to make sure there are no conflicts with existing uidnumbers
|
||||
$uidNumber = \count($this->ldapCreatedUsers) + 30000;
|
||||
$entry = [];
|
||||
$entry['cn'] = $userId;
|
||||
@@ -936,7 +936,7 @@ trait Provisioning {
|
||||
$body,
|
||||
);
|
||||
} else {
|
||||
// Create a OCS request for creating the user. The request is not sent to the server yet.
|
||||
// Create an OCS request for creating the user. The request is not sent to the server yet.
|
||||
$request = OcsApiHelper::createOcsRequest(
|
||||
$this->getBaseUrl(),
|
||||
'POST',
|
||||
|
||||
@@ -38,7 +38,7 @@ class RoleAssignmentContext implements Context {
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private string $setttingsUrl = '/api/v0/settings/';
|
||||
private string $settingsUrl = '/api/v0/settings/';
|
||||
|
||||
/**
|
||||
* This will run before EVERY scenario.
|
||||
@@ -70,7 +70,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getAllExistingRoles(string $user): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "roles-list";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "roles-list";
|
||||
$this->featureContext->setResponse(
|
||||
$this->spacesContext->sendPostRequestToUrl($fullUrl, $user, $this->featureContext->getPasswordForUser($user), "{}")
|
||||
);
|
||||
@@ -87,7 +87,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function sendRequestToAssignRoleToUser(string $user, string $userId, string $roleId): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "assignments-add";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "assignments-add";
|
||||
$body = json_encode(["account_uuid" => $userId, "role_id" => $roleId], JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->featureContext->setResponse(
|
||||
@@ -105,7 +105,7 @@ class RoleAssignmentContext implements Context {
|
||||
* @throws Exception
|
||||
*/
|
||||
public function sendRequestAssignmentsList(string $user, string $userId): void {
|
||||
$fullUrl = $this->baseUrl . $this->setttingsUrl . "assignments-list";
|
||||
$fullUrl = $this->baseUrl . $this->settingsUrl . "assignments-list";
|
||||
$body = json_encode(["account_uuid" => $userId], JSON_THROW_ON_ERROR);
|
||||
|
||||
$this->featureContext->setResponse(
|
||||
|
||||
@@ -331,7 +331,7 @@ trait Sharing {
|
||||
/**
|
||||
* @param string $user
|
||||
* @param TableNode|null $body
|
||||
* TableNode $body should not have any heading and can have following rows |
|
||||
* TableNode $body should not have any heading and can have the following rows |
|
||||
* | path | The folder or file path to be shared |
|
||||
* | name | A (human-readable) name for the share, |
|
||||
* | | which can be up to 64 characters in length. |
|
||||
@@ -355,7 +355,7 @@ trait Sharing {
|
||||
* | | (default: 31, for public shares: 1) |
|
||||
* | | Pass either the (total) number, |
|
||||
* | | or the keyword, |
|
||||
* | | or an comma separated list of keywords |
|
||||
* | | or a comma separated list of keywords |
|
||||
* | shareWith | The user or group id with which the file should |
|
||||
* | | be shared. |
|
||||
* | shareType | The type of the share. This can be one of: |
|
||||
@@ -3133,7 +3133,7 @@ trait Sharing {
|
||||
* Returns shares of a file or folder as a SimpleXMLElement
|
||||
*
|
||||
* Note: the "single" SimpleXMLElement may contain one or more actual
|
||||
* shares (to users, groups or public links etc). If you access an item directly,
|
||||
* shares (to users, groups or public links etc.). If you access an item directly,
|
||||
* for example, getShares()->id, then the value of "id" for the first element
|
||||
* will be returned. To access all the elements, you can loop through the
|
||||
* returned SimpleXMLElement with "foreach" - it will act like a PHP array
|
||||
|
||||
@@ -1066,7 +1066,7 @@ class SpacesContext implements Context {
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public function usershouldNotHaveSpace(
|
||||
public function userShouldNotHaveSpace(
|
||||
string $user,
|
||||
string $spaceName
|
||||
): void {
|
||||
@@ -1803,7 +1803,7 @@ class SpacesContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a url for destination with spacename
|
||||
* returns a URL for destination with spacename
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $fileDestination
|
||||
|
||||
@@ -178,7 +178,7 @@ class SpacesTUSContext implements Context {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $spaceName
|
||||
*
|
||||
* @return void
|
||||
|
||||
@@ -288,7 +288,7 @@ class TUSContext implements Context {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
|
||||
@@ -2315,7 +2315,7 @@ trait WebDav {
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the chunking version from human readable format
|
||||
* sets the chunking version from human-readable format
|
||||
*
|
||||
* @param string $version (no|v1|v2|new|old)
|
||||
*
|
||||
@@ -3044,7 +3044,7 @@ trait WebDav {
|
||||
* @param string $user
|
||||
* @param string $source
|
||||
* @param string $destination
|
||||
* @param string $mtime Time in human readable format is taken as input which is converted into milliseconds that is used by API
|
||||
* @param string $mtime Time in human-readable format is taken as input which is converted into milliseconds that is used by API
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
|
||||
@@ -836,7 +836,7 @@ class WebDavPropertiesContext implements Context {
|
||||
// expected href should be like: "remote.php/webdav/strängé folder/file.txt"
|
||||
$explodeDecoded = \explode('/', $decodedValue);
|
||||
// get the first item of the expected href.
|
||||
// i.e remote.php from "remote.php/webdav/strängé folder/file.txt"
|
||||
// i.e. remote.php from "remote.php/webdav/strängé folder/file.txt"
|
||||
// or dav from "dav/spaces/%spaceid%/C++ file.cpp"
|
||||
$explodeExpected = \explode('/', $expectedHref);
|
||||
$remotePhpIndex = \array_search($explodeExpected[0], $explodeDecoded);
|
||||
|
||||
@@ -168,7 +168,7 @@ Feature: sharing
|
||||
| new |
|
||||
|
||||
@skipOnGraph
|
||||
Scenario Outline: Uploading to a user shared folder with read/write permission when the sharer has unsufficient quota does not work
|
||||
Scenario Outline: Uploading to a user shared folder with read/write permission when the sharer has insufficient quota does not work
|
||||
Given using <dav-path> DAV path
|
||||
And user "Brian" has been created with default attributes and small skeleton files
|
||||
And user "Alice" has created folder "FOLDER"
|
||||
@@ -188,7 +188,7 @@ Feature: sharing
|
||||
| new |
|
||||
|
||||
|
||||
Scenario Outline: Uploading to a group shared folder with read/write permission when the sharer has unsufficient quota does not work
|
||||
Scenario Outline: Uploading to a group shared folder with read/write permission when the sharer has insufficient quota does not work
|
||||
Given using <dav-path> DAV path
|
||||
And user "Brian" has been created with default attributes and without skeleton files
|
||||
And group "grp1" has been created
|
||||
|
||||
@@ -156,7 +156,7 @@ Feature: Search
|
||||
| spaces |
|
||||
|
||||
|
||||
Scenario Outline: limit returned search entries to more entires than there are
|
||||
Scenario Outline: limit returned search entries to more entries than there are
|
||||
Given using <dav_version> DAV path
|
||||
When user "Alice" searches for "upload" and limits the results to "100" items using the WebDAV API
|
||||
Then the HTTP status code should be "207"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Feature: set file properties
|
||||
As a user
|
||||
I want to be able to set meta-information about files
|
||||
So that I can reccord file meta-information (detailed requirement TBD)
|
||||
So that I can record file meta-information (detailed requirement TBD)
|
||||
|
||||
Background:
|
||||
Given using OCS API version "1"
|
||||
|
||||
Reference in New Issue
Block a user