[tests-only] Minor local API test changes

This commit is contained in:
Phil Davis
2021-12-14 10:10:13 +05:45
parent cd732fcbbc
commit 5af08c516b
4 changed files with 10 additions and 21 deletions
+3 -13
View File
@@ -6,7 +6,7 @@ default:
apiAccountsHashDifficulty: apiAccountsHashDifficulty:
paths: paths:
- '%paths.base%/../features/apiAccountsHashDifficulty' - '%paths.base%/../features/apiAccountsHashDifficulty'
context: &common_ldap_suite_context context:
parameters: parameters:
ldapAdminPassword: admin ldapAdminPassword: admin
ldapUsersOU: TestUsers ldapUsersOU: TestUsers
@@ -34,12 +34,7 @@ default:
contexts: contexts:
- SpacesContext: - SpacesContext:
- OccContext: - OccContext:
- FeatureContext: &common_feature_context_params - FeatureContext: *common_feature_context_params
baseUrl: http://localhost:8080
adminUsername: admin
adminPassword: admin
regularUserPassword: 123456
ocPath: apps/testing/api/v1/occ
- CapabilitiesContext: - CapabilitiesContext:
- ChecksumContext: - ChecksumContext:
- FavoritesContext: - FavoritesContext:
@@ -54,12 +49,7 @@ default:
contexts: contexts:
- ArchiverContext: - ArchiverContext:
- OccContext: - OccContext:
- FeatureContext: &common_feature_context_params - FeatureContext: *common_feature_context_params
baseUrl: http://localhost:8080
adminUsername: admin
adminPassword: admin
regularUserPassword: 123456
ocPath: apps/testing/api/v1/occ
- CapabilitiesContext: - CapabilitiesContext:
- ChecksumContext: - ChecksumContext:
- FilesVersionsContext: - FilesVersionsContext:
@@ -38,7 +38,7 @@ class ArchiverContext implements Context {
/** /**
* @var FeatureContext * @var FeatureContext
*/ */
private $featureContext; private FeatureContext $featureContext;
/** /**
* @BeforeScenario * @BeforeScenario
@@ -80,7 +80,6 @@ class ArchiverContext implements Context {
case 'id': case 'id':
case 'ids': case 'ids':
return 'id=' . $this->featureContext->getFileIdForPath($user, $resource); return 'id=' . $this->featureContext->getFileIdForPath($user, $resource);
break;
case 'path': case 'path':
case 'paths': case 'paths':
return 'path=' . $resource; return 'path=' . $resource;
@@ -34,7 +34,7 @@ class RevaContext implements Context {
/** /**
* @var FeatureContext * @var FeatureContext
*/ */
private $featureContext; private FeatureContext $featureContext;
/** /**
* @BeforeScenario * @BeforeScenario
@@ -185,14 +185,14 @@ class SpacesContext implements Context {
* *
* @return array * @return array
*/ */
public function getSpaceByName(string $user, string $name): array { public function getSpaceByName(string $user, string $spaceName): array {
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi($user); $this->theUserListsAllHisAvailableSpacesUsingTheGraphApi($user);
$spaces = $this->getAvailableSpaces(); $spaces = $this->getAvailableSpaces();
Assert::assertIsArray($spaces[$name], "Space with name $name for user $user not found"); Assert::assertIsArray($spaces[$spaceName], "Space with name $spaceName for user $user not found");
Assert::assertNotEmpty($spaces[$name]["root"]["webDavUrl"], "WebDavUrl for space with name $name for user $user not found"); Assert::assertNotEmpty($spaces[$spaceName]["root"]["webDavUrl"], "WebDavUrl for space with name $spaceName for user $user not found");
return $spaces[$name]; return $spaces[$spaceName];
} }
/** /**
@@ -604,7 +604,7 @@ class SpacesContext implements Context {
* *
* @throws Exception|GuzzleException * @throws Exception|GuzzleException
*/ */
public function usertheSpaceShouldContainEntries( public function userTheSpaceShouldContainEntries(
string $user, string $user,
string $spaceName, string $spaceName,
string $shouldOrNot, string $shouldOrNot,