fex style

This commit is contained in:
Swikriti Tripathi
2022-12-15 16:18:18 +05:45
committed by Phil Davis
parent 7dbfcf63e0
commit d058278f44
2 changed files with 24 additions and 31 deletions

View File

@@ -80,7 +80,7 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiCors/cors.feature:68](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiCors/cors.feature#L68)
#### [Public cannot download folder via the public link of the folder inside the project space](https://github.com/owncloud/ocis/issues/5229)
- [apiSpacesShares/publicLinkDownload.feature:31](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/publicLinkDownload.feature#L31)
- [apiSpacesShares/publicLinkDownload.feature:30](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpacesShares/publicLinkDownload.feature#L30)
#### [A User can get information of another user with Graph API](https://github.com/owncloud/ocis/issues/5125)
- [apiGraph/getUser.feature:23](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiGraph/getUser.feature#L23)

View File

@@ -74,11 +74,6 @@ class SpacesContext implements Context {
*/
private FilesVersionsContext $filesVersionsContext;
/**
* @var ArchiverContext
*/
private ArchiverContext $archiverContext;
/**
* @var string
*/
@@ -463,7 +458,6 @@ class SpacesContext implements Context {
$this->favoritesContext = $environment->getContext('FavoritesContext');
$this->checksumContext = $environment->getContext('ChecksumContext');
$this->filesVersionsContext = $environment->getContext('FilesVersionsContext');
$this->archiverContext = $environment->getContext('ArchiverContext');
// Run the BeforeScenario function in OCSContext to set it up correctly
$this->ocsContext->before($scope);
$this->baseUrl = \trim($this->featureContext->getBaseUrl(), "/");
@@ -3096,28 +3090,27 @@ class SpacesContext implements Context {
}
}
/**
* @When /^public downloads the folder "([^"]*)" of space "([^"]*)" from the last created public link of "([^"]*)" using the resource id$/
* @param string $resource
* @param string $space
* @param string $owner
*
* @return void
* @throws GuzzleException
*/
public function publicDownloadsTheFolderFromTheLastCreatedPublicLink(string $resource, string $space, string $owner)
{
$token = $this->featureContext->getLastPublicShareToken();
$resourceId = $this->getFolderId($owner, $space, $resource);
$queryString = 'public-token='.$token.'&id='.$resourceId;
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->featureContext->getBaseUrl() . '/archiver?' . $queryString,
'',
'',
'',
)
);
}
/**
* @When /^public downloads the folder "([^"]*)" of space "([^"]*)" from the last created public link of "([^"]*)" using the resource id$/
*
* @param string $resource
* @param string $space
* @param string $owner
*
* @return void
* @throws GuzzleException
*/
public function publicDownloadsTheFolderFromTheLastCreatedPublicLink(string $resource, string $space, string $owner) {
$token = $this->featureContext->getLastPublicShareToken();
$resourceId = $this->getFolderId($owner, $space, $resource);
$queryString = 'public-token=' . $token . '&id=' . $resourceId;
$this->featureContext->setResponse(
HttpRequestHelper::get(
$this->featureContext->getBaseUrl() . '/archiver?' . $queryString,
'',
'',
'',
)
);
}
}