mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-30 08:50:49 -06:00
[full-ci] deleted unused step definitions (#1639)
* deleted unused step definitions * fix flaky tests. rearange ine numbers
This commit is contained in:
@@ -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$/
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user