test: disable retry when sync disabled for a share

get default aut-sync setting
This commit is contained in:
Saw-jan
2024-07-08 09:44:48 +05:45
parent 04d7985487
commit 18d0eaa5c2
3 changed files with 43 additions and 9 deletions
@@ -359,6 +359,37 @@ class SettingsContext implements Context {
);
}
/**
* @param string $user
*
* @return bool
*
* @throws GuzzleException
* @throws Exception
*/
public function getAutoAcceptSharesSettingValue(string $user): bool {
$response = $this->sendRequestGetSettingsValuesList($user);
$this->featureContext->theHTTPStatusCodeShouldBe(
201,
"Expected response status code should be 201",
$response
);
$body = $this->featureContext->getJsonDecodedResponseBodyContent($response);
if (empty($body)) {
return true;
}
foreach ($body->values as $value) {
if ($value->identifier->setting === "auto-accept-shares") {
return $value->value->boolValue;
}
}
return true;
}
/**
* @When /^user "([^"]*)" lists values-list with headers using the Settings API$/
*