[tests-only][full-ci] refactoring user creation Given steps from provisioning into GraphContext (#7019)

* refactored the user creation given statement from provisioning to graph api

added getUser steps that covers the steps for user with user light role

* added userlight step tests to check drive information and updated expected failure files

* added usercreation initiation code

* deleted seperate tests for user light role

* remove unnecesary changes

* add user not initialize step

* corrected the testcode

* moved the steps from graph to provisioning file

* fix creating single ldap user

* fix: user check method

* initialize user via graph

* addressing reviews

---------

Co-authored-by: Saw-jan <saw.jan.grg3e@gmail.com>
This commit is contained in:
Sabin Panta
2023-09-06 09:22:38 +05:45
committed by GitHub
co-authored by Saw-jan
parent 64bfdf24b5
commit 5efc3c51a1
11 changed files with 213 additions and 493 deletions
@@ -179,7 +179,7 @@ class AppConfigurationContext implements Context {
/**
* @return string
* @throws Exception
* @throws Exception|GuzzleException
*/
public function getAdminUsernameForCapabilitiesCheck():string {
if (\TestHelpers\OcisHelper::isTestingOnReva()) {
@@ -190,7 +190,7 @@ class AppConfigurationContext implements Context {
$adminUsername = "PseudoAdminForRevaTest";
$createdUsers = $this->featureContext->getCreatedUsers();
if (!\array_key_exists($adminUsername, $createdUsers)) {
$this->featureContext->createUser($adminUsername);
$this->featureContext->userHasBeenCreated(["userName" => $adminUsername]);
}
} else {
$adminUsername = $this->featureContext->getAdminUsername();