[full-ci] [tests-only] Add test for disable sync with non-existing resource (#8992)
* Added tests for disabling share sync of non-existent resource * Added tests for disabling share sync with empty resource id * Added tests for disabling share sync with not shared resource id * Changed status code as expected * Added issue tag
This commit is contained in:
@@ -1188,6 +1188,30 @@ class SharingNgContext implements Context {
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When user :user tries to disable share sync of a resource :resource using the Graph API
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
public function userTriesToDisableShareSyncOfResourceUsingTheGraphApi(string $user, string $resource):void {
|
||||
$shareSpaceId = FeatureContext::SHARES_SPACE_ID;
|
||||
$shareID = ($resource === 'nonexistent') ? WebDavHelper::generateUUIDv4() : $resource;
|
||||
$itemId = $shareSpaceId . '!' . $shareID;
|
||||
$response = GraphHelper::disableShareSync(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$this->featureContext->getActualUsername($user),
|
||||
$this->featureContext->getPasswordForUser($user),
|
||||
$itemId,
|
||||
$shareSpaceId
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^user "([^"]*)" should have sync (enabled|disabled) for share "([^"]*)"$/
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user