fix gherkin lint

This commit is contained in:
Viktor Scharf
2025-03-10 15:10:32 +01:00
parent ca729a23c2
commit 0db2145cef
9 changed files with 10 additions and 8 deletions
@@ -33,6 +33,7 @@ class UploadHelper extends Assert {
/** /**
* *
* @param string|null $baseUrl URL of OpenCloud * @param string|null $baseUrl URL of OpenCloud
* @param string|null $user
* @param string|null $password * @param string|null $password
* @param string|null $source * @param string|null $source
* @param string|null $destination * @param string|null $destination
@@ -750,7 +750,9 @@ class FeatureContext extends BehatVariablesContext {
*/ */
public function getStorageUsersRoot(): string { public function getStorageUsersRoot(): string {
$ocDataPath = getenv("OC_BASE_DATA_PATH") ? getenv("OC_BASE_DATA_PATH") : getenv("HOME") . '/.opencloud'; $ocDataPath = getenv("OC_BASE_DATA_PATH") ? getenv("OC_BASE_DATA_PATH") : getenv("HOME") . '/.opencloud';
return getenv("STORAGE_USERS_DECOMPOSED_ROOT") ? getenv("STORAGE_USERS_DECOMPOSED_ROOT") : $ocDataPath . "/storage/users"; return getenv("STORAGE_USERS_DECOMPOSED_ROOT")
? getenv("STORAGE_USERS_DECOMPOSED_ROOT")
: $ocDataPath . "/storage/users";
} }
/** /**
+1 -1
View File
@@ -192,7 +192,7 @@ class OCSContext implements Context {
) )
); );
} }
/** /**
* @Then /^the OCS status code should be "([^"]*)"$/ * @Then /^the OCS status code should be "([^"]*)"$/
* *
@@ -159,7 +159,7 @@ class OcConfigContext implements Context {
} else { } else {
$path = \realpath(\dirname(__FILE__) . "/../../" . $path); $path = \realpath(\dirname(__FILE__) . "/../../" . $path);
} }
$response = OcConfigHelper::reConfigureOc( $response = OcConfigHelper::reConfigureOc(
[ [
$configVariable => $path $configVariable => $path
+2 -2
View File
@@ -182,10 +182,10 @@ class SearchContext implements Context {
$property['value'], $property['value'],
$user $user
); );
if (is_object($fileResult)) { if (\is_object($fileResult)) {
$fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']); $fileResultProperty = $fileResult->xpath("d:propstat//" . $property['name']);
} else { } else {
throw new Exception("Expected fileResult to be an object, but found " . gettype($fileResult)); throw new Exception("Expected fileResult to be an object, but found " . \gettype($fileResult));
} }
if ($fileResultProperty) { if ($fileResultProperty) {
Assert::assertMatchesRegularExpression( Assert::assertMatchesRegularExpression(
@@ -37,7 +37,6 @@ class ShareesContext implements Context {
private FeatureContext $featureContext; private FeatureContext $featureContext;
private OCSContext $ocsContext; private OCSContext $ocsContext;
/** /**
* @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/ * @When /^user "([^"]*)" gets the sharees using the sharing API with parameters$/
* *
-1
View File
@@ -1654,7 +1654,6 @@ trait Sharing {
$this->setResponse($this->getAllShares($user, "?path=$path")); $this->setResponse($this->getAllShares($user, "?path=$path"));
} }
/** /**
* @Then /^the last share_id should be included in the response/ * @Then /^the last share_id should be included in the response/
* *
@@ -6,6 +6,7 @@ Feature: get applications
Background: Background:
Given user "Alice" has been created with default attributes Given user "Alice" has been created with default attributes
Scenario Outline: admin user lists all the groups Scenario Outline: admin user lists all the groups
Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API Given the administrator has assigned the role "<user-role>" to user "Alice" using the Graph API
When user "Alice" gets all applications using the Graph API When user "Alice" gets all applications using the Graph API
@@ -146,7 +146,7 @@ Feature: Email notification
Zum Ansehen hier klicken: %base_url%/files/shares/with-me Zum Ansehen hier klicken: %base_url%/files/shares/with-me
""" """
@issue-183 @issue-183
Scenario: group members get an email notification in their respective languages when someone shares a space with the group Scenario: group members get an email notification in their respective languages when someone shares a space with the group
Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API Given the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Carol" has been created with default attributes And user "Carol" has been created with default attributes