steps refactoring

This commit is contained in:
v.scharf
2026-07-09 12:53:28 +02:00
parent 9efc71d42e
commit 26faeafa72
35 changed files with 1150 additions and 957 deletions

View File

@@ -27,6 +27,8 @@ use Psr\Http\Message\ResponseInterface;
use TestHelpers\WebDavHelper;
use TestHelpers\HttpRequestHelper;
use TestHelpers\BehatHelper;
use Behat\Step\Then;
use Behat\Step\When;
require_once 'bootstrap.php';
@@ -126,10 +128,6 @@ class SearchContext implements Context {
}
/**
* @When user :user searches for :pattern using the WebDAV API
* @When user :user searches for :pattern and limits the results to :limit items using the WebDAV API
* @When user :user searches for :pattern using the WebDAV API requesting these properties:
* @When user :user searches for :pattern and limits the results to :limit items using the WebDAV API requesting these properties:
*
* @param string $user
* @param string $pattern
@@ -139,6 +137,10 @@ class SearchContext implements Context {
* @return void
* @throws Exception|GuzzleException
*/
#[When('user :user searches for :pattern using the WebDAV API')]
#[When('user :user searches for :pattern and limits the results to :limit items using the WebDAV API')]
#[When('user :user searches for :pattern using the WebDAV API requesting these properties:')]
#[When('user :user searches for :pattern and limits the results to :limit items using the WebDAV API requesting these properties:')]
public function userSearchesUsingWebDavAPI(
string $user,
string $pattern,
@@ -153,7 +155,6 @@ class SearchContext implements Context {
}
/**
* @Then file/folder :path in the search result of user :user should contain these properties:
*
* @param string $path
* @param string $user
@@ -162,6 +163,7 @@ class SearchContext implements Context {
* @return void
* @throws Exception
*/
#[Then('file/folder :path in the search result of user :user should contain these properties:')]
public function fileOrFolderInTheSearchResultShouldContainProperties(
string $path,
string $user,
@@ -216,7 +218,6 @@ class SearchContext implements Context {
}
/**
* @Then /^the search result should contain these (?:files|entries) with highlight on keyword "([^"]*)"/
*
* @param TableNode $expectedFiles
* @param string $expectedContent
@@ -225,6 +226,7 @@ class SearchContext implements Context {
*
* @throws Exception
*/
#[Then('/^the search result should contain these (?:files|entries) with highlight on keyword "([^"]*)"/')]
public function theSearchResultShouldContainEntriesWithHighlight(
TableNode $expectedFiles,
string $expectedContent
@@ -253,8 +255,6 @@ class SearchContext implements Context {
}
/**
* @When /^user "([^"]*)" searches for "([^"]*)" inside (folder|space) "([^"]*)" using the WebDAV API$/
* @When /^user "([^"]*)" searches for "([^"]*)" inside (folder) "([^"]*)" in space "([^"]*)" using the WebDAV API$/
*
* @param string $user
* @param string $pattern
@@ -265,6 +265,8 @@ class SearchContext implements Context {
* @return void
* @throws Exception|GuzzleException
*/
#[When('/^user "([^"]*)" searches for "([^"]*)" inside (folder|space) "([^"]*)" using the WebDAV API$/')]
#[When('/^user "([^"]*)" searches for "([^"]*)" inside (folder) "([^"]*)" in space "([^"]*)" using the WebDAV API$/')]
public function userSearchesInsideFolderOrSpaceUsingWebDavAPI(
string $user,
string $pattern,