[tests-only][full-ci]Added GDPR export for quota update, export another users GDPR (#6249)

* Added GDPR export for quota update, another user tries to export

* PR address
This commit is contained in:
Sagar Gurung
2023-05-10 11:37:13 +05:45
committed by GitHub
parent 1788406b52
commit 3e60706b30
2 changed files with 134 additions and 0 deletions

View File

@@ -2389,4 +2389,28 @@ class GraphContext implements Context {
$this->featureContext->getJSONSchema($schemaString)
);
}
/**
* @When user :user tries to export GDPR report of user :ofUser to :path using Graph API
*
* @param string $user
* @param string $ofUser
* @param string $path
*
* @return void
*
*/
public function userTriesToExportGdprReportOfAnotherUserUsingGraphApi(string $user, string $ofUser, string $path): void {
$credentials = $this->getAdminOrUserCredentials($user);
$this->featureContext->setResponse(
GraphHelper::generateGDPRReport(
$this->featureContext->getBaseUrl(),
$this->featureContext->getStepLineRef(),
$credentials['username'],
$credentials['password'],
$this->featureContext->getAttributeOfCreatedUser($ofUser, 'id'),
$path
)
);
}
}