[test-only] ApiTest. create tag (#5391)

* create tag

* split method

* fix after review
This commit is contained in:
Viktor Scharf
2023-01-17 12:41:56 +01:00
committed by GitHub
parent a2e26534ae
commit 7c9452768e
10 changed files with 333 additions and 2440 deletions
@@ -1651,7 +1651,7 @@ class SpacesContext implements Context {
*
* @param string $user
* @param string $fullUrl
* @param string $headers
* @param array $headers
*
* @return ResponseInterface
* @throws GuzzleException
@@ -1960,7 +1960,7 @@ class SpacesContext implements Context {
string $role
): void {
$response = $this->sendRequestForShareOfEntityInsideOfSpace($user, $entity, $spaceName, $userRecipient, $role);
Assert:assertEquals(
Assert::assertEquals(
$response->getStatusCode(),
200,
"Expected response status code should be 200"
@@ -2984,23 +2984,25 @@ class SpacesContext implements Context {
/**
* @When /^user "([^"]*)" sends PROPFIND request to space "([^"]*)" using the WebDAV API$/
* @When /^user "([^"]*)" sends PROPFIND request from the space "([^"]*)" to the resource "([^"]*)" using the WebDAV API$/
*
* @param string $user
* @param string $spaceName
* @param ?string $resource
*
* @throws GuzzleException
*
* @return void
*/
public function userSendsPropfindRequestToSpace(string $user, string $spaceName): void {
public function userSendsPropfindRequestToSpace(string $user, string $spaceName, ?string $resource = ""): void {
$this->setSpaceIDByName($user, $spaceName);
$properties = ['oc:permissions','oc:fileid','oc:share-types','oc:privatelink','d:resourcetype','oc:size','oc:name','d:getcontenttype'];
$properties = ['oc:permissions','oc:fileid','oc:share-types','oc:privatelink','d:resourcetype','oc:size','oc:name','d:getcontenttype', 'oc:tags'];
$this->featureContext->setResponse(
WebDavHelper::propfind(
$this->featureContext->getBaseUrl(),
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
"",
$resource,
$properties,
"",
"0",