Implement undefined steps

This commit is contained in:
sagargurung1001@gmail.com
2022-09-15 09:36:01 +05:45
parent 4f06d9650b
commit e826cf9e13

View File

@@ -3126,6 +3126,30 @@ class SpacesContext implements Context {
$this->webDavPropertiesContext->userGetsPropertiesOfFolder($user, $resourceName, $propertiesTable);
}
/**
* @Then /^as user "([^"]*)" (?:file|folder|entry|resource) "([^"]*)" inside space "([^"]*)" should contain a property "([^"]*)" with value "([^"]*)"$/
*
* @param string $user
* @param string $resourceName
* @param string $spaceName
* @param string $property
* @param string $value
*
* @return void
*
* @throws Exception|GuzzleException
*/
public function userGetsTheFollowingPropertiesOfFileInsideSpaceWithValueUsingTheWebdavApi(
string $user,
string $resourceName,
string $spaceName,
string $property,
string $value
):void {
$this->setSpaceIDByName($user, $spaceName);
$this->webDavPropertiesContext->asUserFolderShouldContainAPropertyWithValue($user, $resourceName, $property, $value);
}
/**
* @Then /^as user "([^"]*)" (?:file|folder|entry) "([^"]*)" inside space "([^"]*)" (should|should not) be favorited$/
*
@@ -3203,7 +3227,7 @@ class SpacesContext implements Context {
// get a response after a Report request (called in the core)
$responseArray = json_decode(json_encode($this->featureContext->getResponseXml()->xpath("//d:response/d:href")), true, 512, JSON_THROW_ON_ERROR);
Assert::assertNotEmpty($responseArray, "search result is empty");
// for mountpoint, id looks a little different than for project space
if (str_contains($spaceName, 'mountpoint')) {
$splitSpaceName = explode("/", $spaceName);
@@ -3214,7 +3238,7 @@ class SpacesContext implements Context {
$space = $this->getSpaceByName($user, $spaceName);
$topWebDavPath = "/remote.php/dav/spaces/" . $space['id'];
}
$spaceFound = false;
foreach ($responseArray as $value) {
if ($topWebDavPath === $value[0]) {