mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
Merge pull request #10234 from owncloud/tests-limit-with-sort-activities
[tests-only][full-ci] add test to check api activities with limit and sort filter
This commit is contained in:
@@ -2805,7 +2805,7 @@ class GraphContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists the activities of (?:folder|file) "([^"]*)" from space "([^"]*)" using the Graph API/
|
||||
* @When /^user "([^"]*)" lists the activities of (?:folder|file) "([^"]*)" from space "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -2936,7 +2936,7 @@ class GraphContext implements Context {
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists the activities of (?:folder|file) "([^"]*)" from space "([^"]*)" with (depth|limit|sort) "([^"]*)" using the Graph API/
|
||||
* @When /^user "([^"]*)" lists the activities of (?:folder|file) "([^"]*)" from space "([^"]*)" with (depth|limit|sort) "([^"]*)" using the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
@@ -2979,6 +2979,39 @@ class GraphContext implements Context {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When /^user "([^"]*)" lists the activities of (?:folder|file) "([^"]*)" from space "([^"]*)" with (depth|limit) "([^"]*)" and sort "(asc|desc)" using the Graph API$/
|
||||
*
|
||||
* @param string $user
|
||||
* @param string $resource
|
||||
* @param string $spaceName
|
||||
* @param string $filterType
|
||||
* @param string $filterValue
|
||||
* @param string $sortType
|
||||
*
|
||||
* @return void
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function userListsTheActivitiesOfResourceFromSpaceWithDepthOrLimitAndSortUsingTheGraphApi(
|
||||
string $user,
|
||||
string $resource,
|
||||
string $spaceName,
|
||||
string $filterType,
|
||||
string $filterValue,
|
||||
string $sortType
|
||||
): void {
|
||||
$resourceId = $this->spacesContext->getResourceId($user, $spaceName, $resource);
|
||||
$response = GraphHelper::getActivities(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
$user,
|
||||
$this->featureContext->getPasswordForUser($user),
|
||||
$resourceId,
|
||||
[$filterType => $filterValue, 'sort' => $sortType],
|
||||
);
|
||||
$this->featureContext->setResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When the administrator gets federated users using the Graph API
|
||||
* @When user :user tries to get federated users using the Graph API
|
||||
|
||||
Reference in New Issue
Block a user