[full-ci] deleted unused step definitions (#1639)

* deleted unused step definitions

* fix flaky tests. rearange ine numbers
This commit is contained in:
Viktor Scharf
2025-10-10 11:34:43 +02:00
committed by GitHub
parent ba7aad174f
commit c916528788
4 changed files with 9 additions and 117 deletions

View File

@@ -1012,60 +1012,6 @@ trait Sharing {
}
}
/**
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions (\d+))?$/
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with user "([^"]*)" with permissions "([^"]*)"$/
*
* @param string $sharer
* @param string $filepath
* @param string $sharee
* @param string|int|string[]|int[] $permissions
*
* @return void
* @throws Exception
*/
public function userHasSharedFileWithUserUsingTheSharingApi(
string $sharer,
string $filepath,
string $sharee,
$permissions = null
): void {
$response = $this->createAUserShare(
$sharer,
$filepath,
$this->getActualUsername($sharee),
$permissions
);
$this->theHTTPStatusCodeShouldBe(200, "", $response);
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
}
/**
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with the administrator(?: with permissions (\d+))?$/
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with the administrator with permissions "([^"]*)"$/
*
* @param string $sharer
* @param string $filepath
* @param string|int|string[]|int[] $permissions
*
* @return void
*/
public function userHasSharedFileWithTheAdministrator(
string $sharer,
string $filepath,
$permissions = null
): void {
$admin = $this->getAdminUsername();
$response = $this->createAUserShare(
$sharer,
$filepath,
$this->getActualUsername($admin),
$permissions
);
$this->theHTTPStatusCodeShouldBe(200, "", $response);
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
}
/**
* @When /^the user shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
* @When /^the user shares (?:file|folder|entry) "([^"]*)" with user "([^"]*)" with permissions "([^"]*)" using the sharing API$/
@@ -1177,33 +1123,6 @@ trait Sharing {
}
}
/**
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with group "([^"]*)" with permissions "([^"]*)"$/
* @Given /^user "([^"]*)" has shared (?:file|folder|entry) "([^"]*)" with group "([^"]*)"(?: with permissions (\d+))?$/
*
* @param string $user
* @param string $filepath
* @param string $group
* @param string|int|string[]|int[] $permissions
*
* @return void
*/
public function userHasSharedFileWithGroupUsingTheSharingApi(
string $user,
string $filepath,
string $group,
$permissions = null
) {
$response = $this->createAGroupShare(
$user,
$filepath,
$group,
$permissions
);
$this->theHTTPStatusCodeShouldBe(200, "", $response);
$this->ocsContext->theOCSStatusCodeShouldBe("100,200", "", $response);
}
/**
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)"(?: with permissions (\d+))? using the sharing API$/
* @Then /^user "([^"]*)" should not be able to share (?:file|folder|entry) "([^"]*)" with (user|group) "([^"]*)" with permissions "([^"]*)" using the sharing API$/

View File

@@ -2851,39 +2851,6 @@ class SpacesContext implements Context {
);
}
/**
* @Given /^user "([^"]*)" has shared a space "([^"]*)" with settings:$/
*
* @param string $user
* @param string $spaceName
* @param TableNode $tableNode
*
* @return void
* @throws GuzzleException
*/
public function userHasSharedSpace(
string $user,
string $spaceName,
TableNode $tableNode
): void {
$rows = $tableNode->getRowsHash();
$response = $this->shareSpace($user, $spaceName, $rows);
$expectedHTTPStatus = "200";
$this->featureContext->theHTTPStatusCodeShouldBe(
$expectedHTTPStatus,
"Expected response status code should be $expectedHTTPStatus",
$response
);
$expectedOCSStatus = "200";
Assert::assertEquals(
$expectedOCSStatus,
$this->ocsContext->getOCSResponseStatusCode(
$response
),
"Expected OCS response status code $expectedOCSStatus"
);
}
/**
* @Given user :user has unshared a space :spaceName shared with :recipient
*

View File

@@ -3,9 +3,9 @@
#### [REPORT request without remote.php returns empty result (only with dav/spaces path)](https://github.com/owncloud/ocis/issues/10329)
- [apiContract/sharesReport.feature:43](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L43)
- [apiContract/sharesReport.feature:68](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L68)
- [apiContract/sharesReport.feature:134](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L134)
- [apiContract/sharesReport.feature:164](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L164)
- [apiContract/sharesReport.feature:84](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L84)
- [apiContract/sharesReport.feature:150](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L150)
- [apiContract/sharesReport.feature:180](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/sharesReport.feature#L180)
- [apiContract/spacesReport.feature:16](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/spacesReport.feature#L16)
- [apiContract/spacesReport.feature:35](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/spacesReport.feature#L35)
- [apiContract/spacesReport.feature:55](https://github.com/opencloud-eu/opencloud/blob/main/tests/acceptance/features/apiContract/spacesReport.feature#L55)

View File

@@ -21,6 +21,7 @@ Feature: sharing
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
And user "Brian" has a share "textfile0.txt" synced
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -47,6 +48,8 @@ Feature: sharing
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
And user "Brian" has a share "textfile1.txt" synced
And user "Brian" has a share "textfile0.txt" synced
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile1.txt" using the provisioning API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -73,6 +76,8 @@ Feature: sharing
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
And user "Brian" has a share "textfile0.txt" synced
And user "Brian" has a share "textfile1.txt" synced
When user "Brian" gets all the shares shared with him that are received as file "/Shares/textfile0.txt" using the provisioning API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"
@@ -94,6 +99,7 @@ Feature: sharing
| shareType | group |
| permissionsRole | Viewer |
And using SharingNG
And user "Brian" has a share "textfile0.txt" synced
When user "Brian" gets all the shares shared with him using the sharing API
Then the OCS status code should be "<ocs-status-code>"
And the HTTP status code should be "200"