add test coverage for activities api for a file

This commit is contained in:
Salipa-Gurung
2024-07-25 14:51:18 +05:45
parent 3787092749
commit 065c4fa027
3 changed files with 149 additions and 0 deletions
@@ -2775,4 +2775,27 @@ class GraphContext implements Context {
)
);
}
/**
* @When /^user "([^"]*)" checks the activities for (?:folder|file) "([^"]*)" in space "([^"]*)" using the Graph API/
*
* @param string $user
* @param string $resource
* @param string $spaceName
*
* @return void
* @throws Exception
*
*/
public function userChecksTheActivitiesForResourceInSpaceUsingTheGraphAPI(string $user, string $resource, string $spaceName): void {
$resourceId = $this->featureContext->spacesContext->getResourceId($user, $spaceName, $resource);
$response = GraphHelper::getActivities(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$user,
$this->featureContext->getPasswordForUser($user),
$resourceId
);
$this->featureContext->setResponse($response);
}
}