Files
opencloud/tests/acceptance/features/coreApiShareOperationsToShares1/accessToShare.feature
T
Viktor Scharf 05b0830cbf test: wait for the share sync in the Given steps that create shares (#4158)
* test: wait for the share sync in the Given steps that create shares

Shares are synced (auto-accepted) asynchronously by the sharing service,
so the scenarios waited for it with "user ... has a share ... synced"
after each share. Where they didn't, the following steps could race with
it, e.g. a hide sent before the auto-accept was overwritten by it.

The Given steps that create user and group shares now wait until the
share is synced for each user it was sent to (the members of a group),
unless the user has auto-sync turned off. The "has a share ... synced"
steps that only followed such a Given step are removed, and the line
references of the expected failures are updated.

Assisted-by: Claude Code:claude-opus-5-5

* test: don't wait for the sync of a share with the role Denied

A share with the role Denied gives no access, so it never shows up in
the shared-with-me list of the sharee, and the wait for its sync timed
out.

Assisted-by: Claude Code:claude-opus-5-5
2026-11-29 10:42:57 +00:00

105 lines
4.4 KiB
Gherkin

@skipOnReva
Feature: sharing
As a user
I want to share resources with other users
So that they can have access to the resources
Background:
Given these users have been created with default attributes:
| username |
| Alice |
| Brian |
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt"
Scenario Outline: sharee can see the share
Given using OCS API version "<ocs-api-version>"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
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"
And the last share_id should be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
Scenario Outline: sharee can see the filtered share
Given using OCS API version "<ocs-api-version>"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | textfile1.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
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"
And the last share_id should be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
@issue-1257
Scenario Outline: sharee can't see the share that is filtered out
Given using OCS API version "<ocs-api-version>"
And user "Alice" has uploaded file with content "some data" to "/textfile1.txt"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has sent the following resource share invitation:
| resource | textfile1.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
And using SharingNG
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"
And the last share id should not be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |
@issue-1289
Scenario Outline: sharee can see the group share
Given using OCS API version "<ocs-api-version>"
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Alice" has sent the following resource share invitation:
| resource | textfile0.txt |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And using SharingNG
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"
And the last share_id should be included in the response
Examples:
| ocs-api-version | ocs-status-code |
| 1 | 100 |
| 2 | 200 |