[tests-only] Fix API test steps (#7457)

* add missing step defs

* fix steps

* update expected failure line
This commit is contained in:
Sawjan Gurung
2023-10-11 15:10:02 +05:45
committed by GitHub
parent 9e07f2f0d1
commit 383ad91815
5 changed files with 18 additions and 20 deletions
@@ -276,8 +276,17 @@ class AuthContext implements Context {
* @return void
* @throws Exception
*/
public function adminRequestsEndpoint(string $method, TableNode $table):void {
$this->adminRequestsEndpointsWithBodyWithPassword($method, null, null, null, $table);
public function theAdminRequestsTheseEndpointsWithMethod(string $method, TableNode $table):void {
$this->featureContext->verifyTableNodeColumns($table, ['endpoint']);
foreach ($table->getHash() as $row) {
$response = $this->requestUrlWithBasicAuth(
$this->featureContext->getAdminUsername(),
$row['endpoint'],
$method
);
$this->featureContext->setResponse($response);
$this->featureContext->pushToLastStatusCodesArrays();
}
}
/**